[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Sample tables with info
Folks, I've tested the attached doc with a db5 customization layer that allows info for HTML tables. The table looks as expected in XMLMind XXE, and is still functional in Syntext Serna (could not validate RNC...). As Paul mentioned, it should not be a problem in Arbortext. Gershon, et al, can you please try to test as well? Below is the RNC customization I used. Best regards, --scott start |= (db.set | db.book | db.divisions | db.components | db.navigation.components | db.section | db.para) | db.setindex # In the current DocBook schema (v5.0b9), info is not allowed in HTML Tables. It is redefined here to allow it. # This definition also includes Schematron assertions, which allow greater control over the content model. html.table.info = db._info div { db.html.table.attlist |= db.html.attrs & db.html.table.attributes & db.orient.attribute? & db.pgwide.attribute? & db.tabstyle.attribute? & db.floatstyle.attribute? db.html.table |= ## A formal (captioned) HTML table in a document [ s:pattern [ name = "Element exclusion" "\x{a}" ~ " " s:rule [ context = "db:table" "\x{a}" ~ " " s:assert [ test = "not(.//db:example)" "example must not occur in the descendants of table" ] "\x{a}" ~ " " ] "\x{a}" ~ " " ] s:pattern [ name = "Element exclusion" "\x{a}" ~ " " s:rule [ context = "db:table" "\x{a}" ~ " " s:assert [ test = "not(.//db:figure)" "figure must not occur in the descendants of table" ] "\x{a}" ~ " " ] "\x{a}" ~ " " ] s:pattern [ name = "Element exclusion" "\x{a}" ~ " " s:rule [ context = "db:table" "\x{a}" ~ " " s:assert [ test = "not(.//db:caution)" "caution must not occur in the descendants of table" ] "\x{a}" ~ " " ] "\x{a}" ~ " " ] s:pattern [ name = "Element exclusion" "\x{a}" ~ " " s:rule [ context = "db:table" "\x{a}" ~ " " s:assert [ test = "not(.//db:important)" "important must not occur in the descendants of table" ] "\x{a}" ~ " " ] "\x{a}" ~ " " ] s:pattern [ name = "Element exclusion" "\x{a}" ~ " " s:rule [ context = "db:table" "\x{a}" ~ " " s:assert [ test = "not(.//db:note)" "note must not occur in the descendants of table" ] "\x{a}" ~ " " ] "\x{a}" ~ " " ] s:pattern [ name = "Element exclusion" "\x{a}" ~ " " s:rule [ context = "db:table" "\x{a}" ~ " " s:assert [ test = "not(.//db:tip)" "tip must not occur in the descendants of table" ] "\x{a}" ~ " " ] "\x{a}" ~ " " ] s:pattern [ name = "Element exclusion" "\x{a}" ~ " " s:rule [ context = "db:table" "\x{a}" ~ " " s:assert [ test = "not(.//db:warning)" "warning must not occur in the descendants of table" ] "\x{a}" ~ " " ] "\x{a}" ~ " " ] s:pattern [ name = "Element exclusion" "\x{a}" ~ " " s:rule [ context = "db:table" "\x{a}" ~ " " s:assert [ test = "not(.//db:informaltable)" "informaltable must not occur in the descendants of table" ] "\x{a}" ~ " " ] "\x{a}" ~ " " ] ] element table { html.table.info?, db.html.table.attlist, db.html.table.model } } html.informaltable.info = db._info div { db.html.informaltable.attlist |= db.html.attrs & db.html.table.attributes db.html.informaltable |= ## An HTML table without a title element informaltable { html.informaltable.info?, db.html.informaltable.attlist, db.html.informaltable.model } } include "docbook-5.0CR1/rng/docbookxi.rnc" { start = notAllowed db.html.informaltable = notAllowed db.html.table = notAllowed db.html.informaltable.attlist = notAllowed db.html.table.attlist = notAllowed
<?xml version="1.0" encoding="UTF-8"?> <article version="5.0" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:db="http://docbook.org/ns/docbook"> <title>Table test</title> <section> <title>HTML with info</title> <table xml:id="ex.htmltable"> <info> <author><personname>Scott Hudson</personname></author> </info> <caption>Sample HTML Table</caption> <thead> <tr> <td>Head 1</td> <td>Head 2</td> </tr> </thead> <tbody> <tr> <td>Body 1</td> <td>Body 2</td> </tr> </tbody> </table> </section> <section> <title>CALS with info</title> <table xml:id="ex.calstable" frame='all'> <title>Sample CALS Table</title> <info> <author><personname>Scott Hudson</personname></author> </info> <tgroup cols='5' align='left' colsep='1' rowsep='1'> <colspec colname='c1'/> <colspec colname='c2'/> <colspec colname='c3'/> <colspec colnum='5' colname='c5'/> <thead> <row> <entry namest="c1" nameend="c2" align="center">Horizontal Span</entry> <entry>a3</entry> <entry>a4</entry> <entry>a5</entry> </row> </thead> <tfoot> <row> <entry>f1</entry> <entry>f2</entry> <entry>f3</entry> <entry>f4</entry> <entry>f5</entry> </row> </tfoot> <tbody> <row> <entry>b1</entry> <entry>b2</entry> <entry>b3</entry> <entry>b4</entry> <entry morerows='1' valign='middle'><para>Vertical Span</para></entry> </row> <row> <entry>c1</entry> <entry namest="c2" nameend="c3" align='center' morerows='1' valign='bottom'>Span Both</entry> <entry>c4</entry> </row> <row> <entry>d1</entry> <entry>d4</entry> <entry>d5</entry> </row> </tbody> </tgroup> </table> </section> </article>
begin:vcard fn:Scott Hudson n:Hudson;Scott org:Flatirons Solutions adr:Suite 200;;4747 Table Mesa Drive ;Boulder;CO;80305;USA email;internet:scott.hudson@flatironssolutions.com title:Consultant tel;work:303-542-2146 tel;fax:303-544-0522 tel;cell:303-332-1883 url:http://www.flatironssolutions.com version:2.1 end:vcard
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]