[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: How is this part of the XSLT specification to be interp
Jeni Tennison >To summarise some ways of putting documentation in a stylesheet that >currently work, then: > >1. using 'extension elements' I tried the stuff below and I started falling over processors. xt is 'lax' on error reporting (user problem view) Saxon gets fussy and starts asking for the class file to process the doc namespace stuff. I'm still guessing that the end game is to either include/exclude documentation from the running stylesheet, rather than produce a seperate 'documentation ' suite for a stylesheet? Any offers of a better example (preferably that runs under Saxon/Xalan). =======xml======= <Tasks> <Task><Desc>Task1</Desc><Owner>Steve</Owner></Task> <Task><Desc>Task2</Desc><Owner>Mike</Owner></Task> <Task><Desc>Task3</Desc><Owner>Dave</Owner></Task> <Task><Desc>Task4</Desc><Owner>Steve</Owner></Task> <Task><Desc>Task5</Desc><Owner>Mike</Owner></Task> <Task><Desc>Task9</Desc><Owner>Mike</Owner></Task> <Task><Desc>Task9</Desc><Owner>Fred</Owner></Task> <Task><Desc>Task9</Desc><Owner>Joe</Owner></Task> </Tasks> =========xsl============= <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="Test Documentation" version="1.0" extension-element-prefixes="doc" exclude-result-prefixes="doc" > <xsl:param name="documentation" /> <doc:title>Documentation for test stylesheet</doc:title> <doc:version>Version draft 0.a</doc:version> <xsl:template match="/"> <!-- <xsl:if test="$documentation"> <doc:title>Documentation for test stylesheet</doc:title> <doc:version>Version draft 0.a</doc:version> </xsl:if> --> <xsl:apply-templates/> </xsl:template> <xsl:template match="Tasks"> <html> <head> <title>foo</title> </head> <body> <doc:el>Tasks</doc:el> <xsl:apply-templates/> </body> </html> </xsl:template> <xsl:template match="Task"> <h1>Task</h1> <xsl:apply-templates/> </xsl:template> <xsl:template match="Desc"> <p><xsl:apply-templates/></p> </xsl:template> <xsl:template match="Owner"> <doc:p>Owner is: <xsl:value-of select="."/></doc:p> <p><xsl:apply-templates/></p> </xsl:template> </xsl:stylesheet> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|