crossley 01/11/21 05:56:02 Added: documentation/stylesheets doclist2document.xsl Log: New stylesheet for "List of docs". Revision Changes Path 1.1 xml-cocoon2/documentation/stylesheets/doclist2document.xsl Index: doclist2document.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:import href="copyover.xsl"/> <xsl:template match="doclist"> <document> <header> <title>List of all documentation</title> </header> <body> <p> This complete list shows, at-a-glance, how all of the documentation fits together. The side-panel of each page is used to reach relevant documents, according to its location in the hierarchical documentation. </p> <anchor id="issues"/> <note>FIXME: many of the links are busted, because the first transformation does not have available the path info (e.g. userdocs/concepts/). We only have a relative URI available (e.g. catalog.html). One way to fix that would be to add a "uri" attribute to the <book> element in each book.xml (sounds hack). Another possibility: can a variable be passed via each map:part ? </note> <note>The documentation/sitemap.xmap defines the aggregation and transformations for match=doclist </note> <xsl:apply-templates/> </body> </document> </xsl:template> <xsl:template match="book"> <s1 title="{@title}"> <xsl:apply-templates/> </s1> </xsl:template> <xsl:template match="menu[position()=1]"> <xsl:apply-templates/> </xsl:template> <xsl:template match="menu"> <p><strong><xsl:value-of select="@label"/></strong></p> <ul> <xsl:apply-templates/> </ul> </xsl:template> <xsl:template match="menu-item | external"> <xsl:if test="not(@type) or @type!='hidden'"> <xsl:if test="@label!='Main' and @label!='User Documentation'"> <li><xsl:value-of select="@label"/> (<link href="#issues">link coming soon</link> for <code>href=<xsl:value-of select="@href"/></code>) </li> <!-- <li><link href="{@href}"><xsl:value-of select="@label"/></link></li> --> </xsl:if> </xsl:if> </xsl:template> <xsl:template match="node()|@*" priority="-1"/> </xsl:stylesheet>
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]