<?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>29952</bug_id>
          
          <creation_ts>2016-10-20 14:22:53 +0000</creation_ts>
          <short_desc>[QT3TS]  d1e78807, d1e78807b</short_desc>
          <delta_ts>2016-11-29 16:29: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>XQuery 3 &amp; XPath 3 Test Suite</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</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="Tim Mills">tim</reporter>
          <assigned_to name="O&apos;Neil Delpratt">oneil</assigned_to>
          <cc>mike</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>127880</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-10-20 14:22:53 +0000</bug_when>
    <thetext>The expected results for these are wrong.

Each uses a deep-equal, where the LHS is from document returned from a call to fn:transform, while the RHS is a &quot;matching&quot; expected result.

However, the nodes from the LHS use XSLT default validation mode &quot;strip&quot;, so come out as untyped, wherease the RHS elements are constructed as &quot;preserve&quot; so are typed.  This means the nodes aren&apos;t considered deep equal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128255</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-11-25 18:11:51 +0000</bug_when>
    <thetext>Note that these tests are in test set app/Walmsley.

I think Tim&apos;s argument is not quite accurate. On the XQuery side, an element node constructor may produce xs:untyped or xs:anyType depending on whether the processor supports the typed data feature. On the XSLT side, the two tests are different:

* the first test constructs a document node and returns it directly. The result is untyped.
* the second test returns the result of calling doc(). This delivers typed or untyped data depending on the setting of input-type-annotations, whose default is unspecified.

So it&apos;s actually implementation-defined on both sides of the fence.

But the more important question is whether two elements are deep equal if one of them is annotated as xs:anyType and the other as xs:untyped. Time suggests not. But my reading is that they are. The data model says: &quot;The properties of xs:untyped are the same as the properties of xs:anyType except for the base type and name. The base type of xs:untyped is xs:anyType.&quot; This means in particular that they have the same {variety} (specifically, mixed). fn:deep-equal() does not require nodes to have the same type annotation, so long as both type annotations have the same {variety}, and that condition is satisfied here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128262</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-11-29 16:29:58 +0000</bug_when>
    <thetext>Thw WG decided to close on the basis of comment #1</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>