<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>2268</bug_id>
          
          <creation_ts>2005-09-19 17:10:04 +0000</creation_ts>
          <short_desc>xsl:apply-imports errors XTDE0560 and XTDE0565 seem to be duplicates</short_desc>
          <delta_ts>2005-09-28 14:45:17 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XSLT 2.0</component>
          <version>Last Call drafts</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anton Lapounov">antonl</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>6341</commentid>
    <comment_count>0</comment_count>
    <who name="Anton Lapounov">antonl</who>
    <bug_when>2005-09-19 17:10:05 +0000</bug_when>
    <thetext>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 &quot;and the current
template rule is not null&quot;.

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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6365</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2005-09-20 13:42:15 +0000</bug_when>
    <thetext>I&apos;m inclined to agree with you: error 0565 is redundant because 0560 will always
trigger first.

Michael Kay (personal response)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6367</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2005-09-20 13:59:51 +0000</bug_when>
    <thetext>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)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6433</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2005-09-24 22:38:08 +0000</bug_when>
    <thetext>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 &quot;current template&quot; and the column headed
&quot;Initial setting&quot;, change &quot;the initial template&quot; to &quot;if a named template is
specified as the entry point to the transformation, then null; otherwise the
initial template&quot;

Michael Kay
XSLT 2.0 editor</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6546</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2005-09-28 14:44:47 +0000</bug_when>
    <thetext>The XSL WG agreed this proposed text so the bug will now be closed.

Michael Kay
for the XSL WG</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>