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 2268 - xsl:apply-imports errors XTDE0560 and XTDE0565 seem to be duplicates
Summary: xsl:apply-imports errors XTDE0560 and XTDE0565 seem to be duplicates
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 2.0 (show other bugs)
Version: Last Call drafts
Hardware: All All
: P3 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: 2005-09-19 17:10 UTC by Anton Lapounov
Modified: 2005-09-28 14:45 UTC (History)
0 users

See Also:


Attachments

Description Anton Lapounov 2005-09-19 17:10:05 UTC
A clarification is needed for errors XTDE0560 and XTDE0565. Section 6.7 contains
the following note:

//These rules ensure that when xsl:apply-imports or xsl:next-match is called,
the context item is the same as when the current template rule was invoked, and
is always a node.//

I think this note should mention one additional constraint "and the current
template rule is not null".

Now let us consider two different dynamic errors described in this section:

//[ERR XTDE0560] It is a non-recoverable dynamic error if xsl:apply-imports or
xsl:next-match is evaluated when the current template rule is null.

[ERR XTDE0565] It is a non-recoverable dynamic error if xsl:apply-imports or
xsl:next-match is evaluated when there is no context item or when the context
item is not a node.//

Taking into account the note above, these two errors seem to be identical: if
CTR is not null, then the context item is guaranteed to exist and be a node.
Comment 1 Michael Kay 2005-09-20 13:42:15 UTC
I'm inclined to agree with you: error 0565 is redundant because 0560 will always
trigger first.

Michael Kay (personal response)
Comment 2 Michael Kay 2005-09-20 13:59:51 UTC
Looking at this again, I see there is actually a situation in which there is a
current template [rule] but no context node: namely, during execution of the
initial template if this is selected by name when the transformation is
initiated. Since apply-imports makes no sense in this case, I think this
situation is illogical; the initial template should become the current template
[rule] only if it is selected by virtue of an implicit apply-templates on the
initial context node.

Michael Kay (personal response)
Comment 3 Michael Kay 2005-09-24 22:38:08 UTC
The WG agreed to fix this, subject to agreeing final text proposed by the editor.

The proposed fix is:

(a) In 6.7, delete ERR XTDE0565.

(b) In 5.4.4, in the row headed "current template" and the column headed
"Initial setting", change "the initial template" to "if a named template is
specified as the entry point to the transformation, then null; otherwise the
initial template"

Michael Kay
XSLT 2.0 editor
Comment 4 Michael Kay 2005-09-28 14:44:47 UTC
The XSL WG agreed this proposed text so the bug will now be closed.

Michael Kay
for the XSL WG