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 7624 - [XSLT 2.0] xsl:copy when there is no context item
Summary: [XSLT 2.0] xsl:copy when there is no context item
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 2.0 (show other bugs)
Version: Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-15 07:40 UTC by Michael Kay
Modified: 2010-07-15 09:06 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2009-09-15 07:40:16 UTC
There is no explicit statement in the spec that it is an error to use xsl:copy when there is no context item.

Clearly this should be an error. The question is, what error? In many cases the error can be detected statically, though in a few cases this may not be possible (e.g. within a named template). xsl:number handles this by making it a type error (XTTE0990). Oddly, however, using select="." when there is no context item is a dynamic error rather than a type error (XPDY0002).

Pending a decision on this, I am creating a test case (copy903err) in which the expected error code is the new code XTTE0945.
Comment 1 Michael Kay 2010-05-13 16:51:26 UTC
Agreed that this should be type error XPDY0002; an erratum will be drafted to that effect.
Comment 2 Sharon Adler 2010-05-14 17:14:35 UTC
On May 13, 2010 the XSL WG agreed that this should become an erratum and that the bug should be closed.
Comment 3 Michael Kay 2010-06-18 11:12:02 UTC
I believe that comment #1 captures the decision incorrectly - the note was written in haste during a meeting, and the agreed error code should be the type error XTTE0945 not the dynamic error XPDY0002.
Comment 4 Michael Kay 2010-07-15 09:06:02 UTC
This will be erratum E44.