- From: <bugzilla@jessica.w3.org>
- Date: Tue, 21 May 2013 15:28:50 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=22123
Bug ID: 22123
Summary: Last example of xsl:stream may yield other results
than expected
Classification: Unclassified
Product: XPath / XQuery / XSLT
Version: Member-only Editors Drafts
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P2
Component: XSLT 3.0
Assignee: mike@saxonica.com
Reporter: abel.braaksma@xs4all.nl
QA Contact: public-qt-comments@w3.org
The last example just before 19.2 is the following:
<xsl:transform version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:mode name="delete-ednotes" streamable="yes" on-no-match="deep-copy"/>
<xsl:template name="main">
<xsl:stream href="book.xml">
<xsl:apply-templates mode="delete-ednotes"/>
</xsl:stream>
</xsl:template>
<xsl:template match="ednote" mode="delete-ednotes"/>
</xsl:transform>
The text explains that this will remove any ednote elements. However, I think
it only removes ednote when it is the root element of book.xml. The reason
being that the effective mode deep-copies all nodes that are not matched, which
means that when a match is not found, the whole subtree it copied and not
processed further.
I think the correction should be to change deep-copy to shallow-copy and the
result of the transformation will be what it should be: ednote elements are
removed.
--
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Tuesday, 21 May 2013 15:28:55 UTC