[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: DOCBOOK-APPS: [Norman Walsh <ndw@nwalsh.com>] Re: Segmentedlist - helpneeded
Oops. Meant to send this to the list as well.
- From: Norman Walsh <ndw@nwalsh.com>
- To: John Ebbinghaus <ebbinghaus@tia.dk>
- Date: 28 Nov 2001 09:42:57 -0500
/ John Ebbinghaus <ebbinghaus@tia.dk> was heard to say: | Any examples of how to display a segmentedlist as a table would be | appreciated. This'll do it for HTML: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"> <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/> <xsl:template match="segmentedlist"> <xsl:call-template name="anchor"/> <xsl:apply-templates select="title"/> <table border="0"> <thead> <tr> <xsl:apply-templates select="segtitle"/> </tr> </thead> <tbody> <xsl:apply-templates select="seglistitem"/> </tbody> </table> </xsl:template> <xsl:template match="segmentedlist/title"> <p><b><xsl:apply-templates/></b></p> </xsl:template> <xsl:template match="segtitle"> <th><xsl:apply-templates/></th> </xsl:template> <xsl:template match="seglistitem"> <tr> <xsl:apply-templates/> </tr> </xsl:template> <xsl:template match="seg"> <td><xsl:apply-templates/></td> </xsl:template> </xsl:stylesheet> | I found the following statements in the descriptions for children of | segmentedlist: | "Each Seg is a cell in the body of the table" | "Each SegListItem is a row in the table" | "Each SegTitle is a column heading" | "The first SegTitle goes with the first Seg in each SegListItem, the | second with the second..." | | Which is fine if one had but an example. <segmentedlist><title>State Capitals</title> <segtitle>State</segtitle> <segtitle>Capital</segtitle> <seglistitem><seg>Alabama</seg><seg>Montgomery</seg></seglistitem> <seglistitem><seg>Alaska</seg><seg>Anchorage</seg></seglistitem> <seglistitem><seg>Arkansas</seg><seg>Little Rock</seg></seglistitem> </segmentedlist> :-) | Am I stuck with a work-around, and if so, for how long? I would have | thought that DocBook, being THE framework for technical | documentation, would have this indispensable list type in place long | ago... So much of technical documentation IS lists such as these! I don't believe I have ever seen this type used. If you have some real examples, I'd love to see them. Be seeing you, norm P.S. I'll add a parameter to format segmented lists as tables for the next release. -- Norman Walsh <ndw@nwalsh.com> | I'm NOT in denial! http://www.oasis-open.org/docbook/ | Chair, DocBook Technical Committee |
Be seeing you, norm -- Norman Walsh <ndw@nwalsh.com> | You look wise. Pray correct that http://nwalsh.com/ | error.--Charles Lamb
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC