W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2013

[Bug 22123] New: Last example of xsl:stream may yield other results than expected

From: <bugzilla@jessica.w3.org>
Date: Tue, 21 May 2013 15:28:50 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-22123-523@http.www.w3.org/Bugs/Public/>

            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:template match="ednote" mode="delete-ednotes"/>


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

You are receiving this mail because:
You are the QA Contact for the bug.
Received on Tuesday, 21 May 2013 15:28:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:43 UTC