This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 1313 - Incompatibility when copying document nodes
Summary: Incompatibility when copying document nodes
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 2.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL: http://lists.w3.org/Archives/Member/w...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-09 19:09 UTC by Michael Kay
Modified: 2005-07-14 18:47 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2005-05-09 19:09:11 UTC
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
Comment 1 Michael Kay 2005-05-12 17:27:15 UTC
We agreed that we can live with this incompatibility but need to document it.
Comment 2 Michael Kay 2005-07-14 18:46:29 UTC
The spec has now been updated to record this incompatibility.