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

[Bug 1313] New: Incompatibility when copying document nodes

From: <bugzilla@wiggum.w3.org>
Date: Mon, 09 May 2005 19:09:12 +0000
To: public-qt-comments@w3.org
Cc:
Message-Id: <E1DVDcu-0008QA-8A@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1313

           Summary: Incompatibility when copying document nodes
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
               URL: http://lists.w3.org/Archives/Member/w3c-xsl-
                    wg/2005Apr/0001.html
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 2.0
        AssignedTo: mike@saxonica.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


I reported this internally just before the LC draft was published; I'm repeating
it as a public comment for the purposes of issue tracking.

See the URL referenced.

Consider the following code, executed with a document node as the context node.

<a>
 <xsl:copy>
  <xsl:attribute name="x">5</xsl:attribute>
 </xsl:copy>
</a>

In 1.0, the xsl:copy does nothing other than to cause the xsl:attribute
instruction to be executed, so the result is <a x="5"/>

In 2.0, the xsl:copy causes a shallow copy of the document node to be made; the
xsl:attribute instruction then fails because you can't add an attribute node to
a document node.

My view is that we can live with this incompatibility, but we should document it.

Michael Kay
Received on Monday, 9 May 2005 19:09:20 UTC

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