This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: How is this part of the XSLT specification to be interpreted?
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: How is this part of the XSLT specification to be interpreted?
- From: "Pawson, David" <DPawson at rnib dot org dot uk>
- Date: Wed, 21 Jun 2000 11:44:27 +0100
- Reply-To: xsl-list at mulberrytech dot com
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