From: Michael Smith Date: Thu, 20 Oct 2005 13:48:49 +0000 (+0000) Subject: First shot at implementing table support in the manpages X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=02f0ba6ef94dacc4e58eb67cc920a97dd4280c59;p=docbook-dsssl First shot at implementing table support in the manpages stylesheet. This works well as-is for normal span-less tables. It even works for tables with colspans. But it does not yet even attempt to do anything for rowspans. It will take more work to add rowspan handling that. Not sure if it's worth the work, really. Note: This table support is implemented by do a first pass to process each table using the templates in the HTML stylesheet (which we import). We don't override any of the or or or , etc., table-markup templates, but we do override the block and inline templates for whatever the child content of the and instances. So we end up with a node that has "hybrid" output -- with table rows and cells marked up with HTML and tags, with with the child content marked up in roff. So we use exsl:node-set on that node and make a second-pass through all of it to replace the and parts with tbl(1) macros. Voila -- the end result is properly marked up tbl/roff output for the table. One nice thing about doing it this is that it supports both CALS and HTML table markup, without needing any conditional logic to deal with CALS separately. Because the first pass causes both the CALS and HTML source markup to be "normalized" into HTML. --- diff --git a/xsl/manpages/docbook.xsl b/xsl/manpages/docbook.xsl index 300815164..6524db28b 100644 --- a/xsl/manpages/docbook.xsl +++ b/xsl/manpages/docbook.xsl @@ -34,6 +34,7 @@ + 0 MANIFEST.man diff --git a/xsl/manpages/table.xsl b/xsl/manpages/table.xsl new file mode 100644 index 000000000..26503e7cd --- /dev/null +++ b/xsl/manpages/table.xsl @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + .TS + + allbox; + + + + + + + .\" ============================================== + .\" ROW + + + + + + + T{ + + T} + + + + + + + + + + + + + + + .TE + + .sp + + + + + + + + + + + + + + + cfB + + + + l + + + + + + + + + + + + + + + + + + + + + + + + + + + + . + + +