<?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>20949</bug_id>
          
          <creation_ts>2013-02-11 15:17:07 +0000</creation_ts>
          <short_desc>validate type xs:untyped</short_desc>
          <delta_ts>2013-03-19 16:52:20 +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.0</component>
          <version>Last Call 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>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="John Snelson">john.snelson</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>82904</commentid>
    <comment_count>0</comment_count>
    <who name="John Snelson">john.snelson</who>
    <bug_when>2013-02-11 15:17:07 +0000</bug_when>
    <thetext>Validation as a type defers to the XML Schema specification. However, the XML Schema specification does not define xs:untyped, so it appears to be undefined what happens in that case.

XSLT decided in bug 17480 to make this case analogous to validation=&quot;strip&quot; - which gets rid of all type annotations.

A similar problem exists with &quot;validate type xs:untypedAtomic&quot;. The XSLT WG decided to check that the validated element also has simple content in this case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84632</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2013-03-19 16:50:23 +0000</bug_when>
    <thetext>I would like to merge these rules into bullet point 3 of 3.18 Validate Expressions:

* If validation mode is strict, the validated element must have a top-level element declaration in the effective schema, and must conform to this declaration.
* If validation mode is lax, the validated element must conform to its top-level element declaration if such a declaration exists in the effective schema. If validation mode is lax and there is no top-level element declaration for the element, and the element has an xsi:type attribute, then the xsi:type attribute must name a top-level type definition in the effective schema, and the element must conform to that type.
* If a type name is specified in the validate expression, no attempt is made to locate an element declaration matching the name of the validated element; the element can have any name, and its content is validated against the named type. If the type name is xs:untyped, all elements will receive the type annotation xs:untyped, and all attributes will receive the type annotation xs:untypedAtomic. If the type name is xs:untypedAtomic, it checks that the node has no children, and the node receives the type annotation xs:untypedAtomic.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84633</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2013-03-19 16:52:20 +0000</bug_when>
    <thetext>The Working Group has agreed to resolve this as specified in comment #1.

Editorial reminder: fix &quot;it checks&quot;.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>