<?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>29197</bug_id>
          
          <creation_ts>2015-10-12 21:48:23 +0000</creation_ts>
          <short_desc>[XQuery] 3.19 on validate expression mischaracterizes XSD 1.1</short_desc>
          <delta_ts>2015-10-16 21:31:28 +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.1</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>editorial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="C. M. Sperberg-McQueen">cmsmcq</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</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>123667</commentid>
    <comment_count>0</comment_count>
    <who name="C. M. Sperberg-McQueen">cmsmcq</who>
    <bug_when>2015-10-12 21:48:23 +0000</bug_when>
    <thetext>Section 3.19 of XQuery 3.1 says, under list item 4.b. [1]:

    If validation mode is lax and the root element information item 
    has neither a top-level element declaration nor an xsi:type attribute, 
    [XML Schema 1.0] or [XML Schema 1.1] defines the recursive checking 
    of children and attributes as optional. During processing of an 
    XQuery validate expression, this recursive checking is required.

This is true as regards XSD 1.0 but false as regards XSD 1.1, which requires such recursive checking in its definition of lax validation [2] and which mentions the change in its appendix H.1.12 [3], item 3:

    ·Lax assessment· ... now requires that the [children] and [attributes] 
    of the element be assessed as well. In XSD 1.0 and in earlier drafts, 
    lax assessment was optional and did not require the recursive assessment 
    of [children] and [attributes].


[1] http://www.w3.org/TR/xquery-31/#id-validate
[2] http://www.w3.org/TR/xmlschema11-1/structures.diff-1.0.html#key-lva
[3] http://www.w3.org/TR/xmlschema11-1/structures.diff-1.0.html#ch_sva

The simplest fix I see is to delete &quot;or [XML Schema 1.1]&quot; from the offending sentence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123748</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2015-10-16 21:31:28 +0000</bug_when>
    <thetext>Fixed in today&apos;s internal working draft.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>