<?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>19479</bug_id>
          
          <creation_ts>2012-10-11 16:31:13 +0000</creation_ts>
          <short_desc>[QT3TS] CastAsNamespaceSensitiveType-2, 4</short_desc>
          <delta_ts>2012-11-08 14:43:50 +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>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</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>
          
          
          <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>76008</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-10-11 16:31:13 +0000</bug_when>
    <thetext>In CastAsNamespaceSensitiveType-2 and 5, there are mismatched &apos;)&apos; at the end of each test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78017</commentid>
    <comment_count>1</comment_count>
    <who name="O&apos;Neil Delpratt">oneil</who>
    <bug_when>2012-11-07 23:18:31 +0000</bug_when>
    <thetext>Bug in test case CastAsNamespaceSensitiveType-2 has been fixed by Michael Dyck. However, I Cannot see a problem with CastAsNamespaceSensitiveType-4 and CastAsNamespaceSensitiveType-5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78037</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-11-08 10:54:20 +0000</bug_when>
    <thetext>CastAsNamespaceSensitiveType-2 is fixed.  Thanks.

CastAsNamespaceSensitiveType-4 has a type check error:

      declare function local:clarkname($q as xs:NOTATION) as xs:string {
        $q
      };
      local:clarkname(xs:untypedAtomic(&quot;xs:integer&quot;))

$q is declared as an xs:NOTATION.  
The return type of the function is xs:string.
Function conversion rules cannot convert an xs:NOTATION into an xs:string.

Thus this test should expect XPTY0004, since this condition can be detected statically.

CastAsNamespaceSensitiveType-5 has a similar problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78038</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-11-08 10:55:23 +0000</bug_when>
    <thetext>I suspect that changing the function definition to:

declare function local:clarkname($q as xs:NOTATION) as xs:string {
        $q cast as xs:NOTATION
      };

will solve the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78041</commentid>
    <comment_count>4</comment_count>
    <who name="O&apos;Neil Delpratt">oneil</who>
    <bug_when>2012-11-08 12:57:52 +0000</bug_when>
    <thetext>(In reply to comment #2) 
&gt; Thus this test should expect XPTY0004, since this condition can be detected
&gt; statically.

According to the spec in Section 3.16:
In addition, the target type cannot be xs:NOTATION xs:anySimpleType, or xs:anyAtomicType [err:XPST0080]

Therefore, should the error code be XPST0090 instead of XPTY0004</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78042</commentid>
    <comment_count>5</comment_count>
    <who name="O&apos;Neil Delpratt">oneil</who>
    <bug_when>2012-11-08 13:03:06 +0000</bug_when>
    <thetext>I suspect the intended change to the function definition should be:
declare function local:clarkname($q as xs:NOTATION) as xs:string { 
        $q cast as xs:string
};

I have made the change to CastAsNamespaceSensitiveType-4 and CastAsNamespaceSensitiveType-5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78047</commentid>
    <comment_count>6</comment_count>
    <who name="O&apos;Neil Delpratt">oneil</who>
    <bug_when>2012-11-08 14:26:42 +0000</bug_when>
    <thetext>*** Bug 19480 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78050</commentid>
    <comment_count>7</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-11-08 14:43:50 +0000</bug_when>
    <thetext>Confirmed fixed.  Thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>