- From: <bugzilla@jessica.w3.org>
- Date: Sat, 20 Jul 2013 15:00:42 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=22740
Bug ID: 22740
Summary: xsl:fork example doesn't produce the described results
Classification: Unclassified
Product: XPath / XQuery / XSLT
Version: Member-only Editors Drafts
Hardware: All
OS: All
Status: NEW
Severity: trivial
Priority: P2
Component: XSLT 3.0
Assignee: mike@saxonica.com
Reporter: abel.braaksma@xs4all.nl
QA Contact: public-qt-comments@w3.org
The description for the second example under xsl:fork:
"The requirement is to output a copy of the input document in which (a) the
note elements have been removed,..."
does not fit the code provided:
<xsl:mode on-no-match="deep-copy" streamable="yes"/>
<xsl:template match="note"/>
<xsl:template match="/*">
<xsl:fork>
<xsl:sequence>
<xsl:apply-templates/>
</xsl:sequence>
<xsl:sequence>
<footnote>
<p>Removed <xsl:value-of select="count(.//note)"/>
note elements.</p>
</footnote>
</xsl:sequence>
</xsl:fork>
</xsl:template>
The example uses deep-copy, which prevents processing of any children below
/*/*, which means that nested note-elements will be part of the output. To
remove the note elements and to keep anything else, the line
<xsl:mode on-no-match="deep-copy" streamable="yes"/>
should be changed into
<xsl:mode on-no-match="shallow-copy" streamable="yes"/>
Abel
PS: this error is similar to
https://www.w3.org/Bugs/Public/show_bug.cgi?id=22123, but that was in another
example.
--
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Saturday, 20 July 2013 15:00:44 UTC