<?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>8815</bug_id>
          
          <creation_ts>2010-01-25 19:03:50 +0000</creation_ts>
          <short_desc>[XSLT 2.0] Validation applied to nodes other than elements and attributes</short_desc>
          <delta_ts>2010-01-25 21:25:58 +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>Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</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="Michael Kay">mike</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          <cc>zongaro</cc>
          
          <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>31205</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-01-25 19:03:50 +0000</bug_when>
    <thetext>What happens when the user specifies the validation or type attributes on the xsl:copy or xsl:copy-of instructions, and the value returned by this instruction is a node other than an element or attribute node, or indeed an atomic value? The specification does not appear to answer this question.

I would propose:

(a) validation = (preserve | strip | lax) is a no-op: the validation attribute is ignored, and the supplied item is copied as-is.

(b) validation = strict causes a type error

(c) type = type-name causes a type error</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31206</commentid>
    <comment_count>1</comment_count>
    <who name="Henry Zongaro">zongaro</who>
    <bug_when>2010-01-25 21:07:30 +0000</bug_when>
    <thetext>I almost submitted this same bug report a few months ago, until I noticed that sections 11.9.1[1] and 11.9.2[2] state that the &apos;validation&apos; and &apos;type&apos; attributes are ignored when copying anything other than a document, element or attribute node.

In the paragraph following the second note in section 11.9.1, we have &quot;The optional attributes type and validation may be used on the xsl:copy instruction.... These attributes are ignored when copying an item that is not an element, attribute or document node.&quot;

In the paragraph following the bulleted list in section 11.9.2, we have &quot;The optional attributes type and validation may be used on the xsl:copy-of  instruction.... These attributes are applied individually to each element, attribute, and document node that is selected by the expression in the select attribute. These attributes are ignored when copying an item that is not an element, attribute or document node.&quot;

[1] http://www.w3.org/TR/xslt20/#shallow-copy
[2] http://www.w3.org/TR/xslt20/#copy-of</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31207</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-01-25 21:25:58 +0000</bug_when>
    <thetext>Thanks, Henry!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>