<?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>9925</bug_id>
          
          <creation_ts>2010-06-14 16:53:50 +0000</creation_ts>
          <short_desc>wrong expected result in w3c_testsuite/XQuery/SchemaImport/SchemaImportProlog/modules-schema-context.xq</short_desc>
          <delta_ts>2010-07-06 15:42:37 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Query Test Suite</product>
          <component>XML Query Test Suite</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</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="Markos Zaharioudakis">markos_za</reporter>
          <assigned_to name="Mary Holstege">holstege</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>36172</commentid>
    <comment_count>0</comment_count>
    <who name="Markos Zaharioudakis">markos_za</who>
    <bug_when>2010-06-14 16:53:50 +0000</bug_when>
    <thetext>This report is about query w3c_testsuite/XQuery/SchemaImport/SchemaImportProlog/modules-schema-context.xq in XQTS_current.

In XQTS, the expected result is &lt;result&gt;true&lt;/result&gt;. But I think the query should return an error (XPTY0004), or at least accept this error as an alternative valid result. This is because the &quot;simple&quot; schema is not imported by the main query, so the type of the item returned by the use-schema() function is not in the in-scope type definitions of the main query. This type is needed to execute the instanceof expression.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36174</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-06-14 18:48:03 +0000</bug_when>
    <thetext>(personal response:)

The specification only requires the importing module to import the schema types used in the function signature, it is not required to import the types represented by the dynamic types of the actual return values. So I don&apos;t think this query is violating any rule in the specification, and therefore by definition it is a valid query. It would be very unfortunate if there were such a rule, because the function implementation is always at liberty to return values that are instances of a subtype of the declared result type, and the caller cannot know at compile time what these possible subtypes might be.

&quot;This type is needed to execute the instance of expression.&quot; True. But it&apos;s not needed at compile-time, only at run-time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36633</commentid>
    <comment_count>2</comment_count>
    <who name="Mary Holstege">holstege</who>
    <bug_when>2010-07-06 15:42:37 +0000</bug_when>
    <thetext>The WG considered this bug at the 2010-07-06 telcon and agreed to endorse the
view expressed in comment #1.  

If you are satisfied with this resolution, please mark the bug as CLOSED.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>