<?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>29149</bug_id>
          
          <creation_ts>2015-09-24 09:09:27 +0000</creation_ts>
          <short_desc>[XSLT30] XTDE0420 on attributes/namespaces in document nodes</short_desc>
          <delta_ts>2015-10-29 12:42:27 +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 3.0</component>
          <version>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Abel Braaksma">abel.braaksma</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>123306</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-09-24 09:09:27 +0000</bug_when>
    <thetext>In section 5.8.1 Constructing Complex Content, we write in step 7

[ERR XTDE0420] It is a dynamic error if the result sequence used to construct the content of a document node contains a namespace node or attribute node.

However, in step 4 we write:

4. Any document node within the result sequence is replaced by a sequence containing each of its children, in document order.

So, after step 4 we have removed the document nodes. While I understand that this rule is here to prevent a document node to have namespace or attribute nodes, in an earlier step we have already removed any document nodes, resulting in this error never being thrown.

I think the effect is depth-first, which means that we can only reach step 4 after in a previous cycle we reached step 7 for the children. Perhaps we can swap these rules for clarity?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123309</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-09-24 21:44:09 +0000</bug_when>
    <thetext>XTDE0420 is about constructing document nodes, it applies when the containing instruction is xsl:document, xsl:result-document, or xsl:copy with the context item being a document node. This has nothing to do with whether the value of the sequence delivered by the sequence constructor contains any document nodes; furthermore replacing a document node by its children will never cause the sequence to contain attribute or namespace nodes because they cannot occur as children of a document node.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123311</commentid>
    <comment_count>2</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-09-25 02:22:57 +0000</bug_when>
    <thetext>Let&apos;s close this with no action. The ambiguity came from a recent scan through this section. We implemented it the way you describe it, so there are no practical implications.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>