Attached is a patch for webapp/stylesheets/documents/root2html.xsl that just ensures that the source in the documentation gets formatted as a listing rather than as continuous text. I've also taken the liberty of adding a little bit of CSS to improve the look, and changed the priorities on the XSLT matchers to remove the need to set priorities on many of the matchers. Feel free to use / alter or ignore as you see fit. Stuart.
Index: root2html.xsl =================================================================== RCS file: /home/cvspublic/xml-cocoon2/webapp/stylesheets/documents/root2html.xsl,v retrieving revision 1.4 diff -u -r1.4 root2html.xsl --- root2html.xsl 2001/07/16 19:25:53 1.4 +++ root2html.xsl 2001/07/19 08:58:13 @@ -28,7 +28,7 @@ </xsl:template> <xsl:template match="/root/sidebar"> - <table> + <table valign="top"> <xsl:apply-templates/> </table> </xsl:template> @@ -59,24 +59,30 @@ <xsl:apply-templates/> </xsl:template> -<xsl:template match="body//s1" priority="2"> +<xsl:template match="body//s1"> <h1><xsl:value-of select="@title"/></h1> <xsl:apply-templates/> </xsl:template> -<xsl:template match="body//s2" priority="2"> +<xsl:template match="body//s2"> <h2><xsl:value-of select="@title"/></h2> <xsl:apply-templates/> </xsl:template> -<xsl:template match="body//link" priority="2"> +<xsl:template match="body//link"> <a> <xsl:copy-of select="@href"/> <xsl:apply-templates/> </a> </xsl:template> -<xsl:template match="body//node()|body//@*"> +<xsl:template match="source"> + <listing style="color: green; font-size: 80%;"> + <xsl:apply-templates /> + </listing> +</xsl:template> + +<xsl:template match="body//node()|body//@*" priority="-1"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> @@ -90,6 +96,7 @@ </xsl:attribute> </xsl:for-each> </xsl:element> -</xsl:template> +</xsl:template> + </xsl:stylesheet>
------------------------------------------------------------------------- Stuart Roebuck [EMAIL PROTECTED] Lead Developer Java, XML, MacOS X, XP, etc. ADOLOS <http://www.adolos.com/>