<?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>16161</bug_id>
          
          <creation_ts>2012-02-29 16:58:25 +0000</creation_ts>
          <short_desc>disallowedSubst00503m3,4,5 should be invalid for XSD 1.1</short_desc>
          <delta_ts>2012-12-04 00:52:14 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Schema Test Suite</product>
          <component>Sun Tests</component>
          <version>2006-11-06</version>
          <rep_platform>All</rep_platform>
          <op_sys>Windows 3.1</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>decided</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andreas Meissl">am_spamfaenger</reporter>
          <assigned_to name="C. M. Sperberg-McQueen">cmsmcq</assigned_to>
          <cc>David_E3</cc>
    
    <cc>mike</cc>
          
          <qa_contact name="XML Schema Test Suite mailing list">public-xml-schema-testsuite</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>64730</commentid>
    <comment_count>0</comment_count>
    <who name="Andreas Meissl">am_spamfaenger</who>
    <bug_when>2012-02-29 16:58:25 +0000</bug_when>
    <thetext>In my opinion the expected result of the test cases disallowedSubst00503m3, disallowedSubst00503m4 and disallowedSubst00503m5 of set ElemDecl should be invalid for XSD 1.1 because they violate clause 4 of Schema Component Constraint: Element Declaration Properties Correct.

As described in http://www.w3.org/TR/xmlschema11-1/#key-val-sub-type a complex type definition S is validly substitutable for another complex type definition T if: &quot;S is validly derived from T subject to the blocking keywords in the union of K and T. {prohibited substitutions}, as defined in Type Derivation OK (Complex) (§3.4.6.5)&quot;

So in difference to XSD 1.0 this also considers the prohibited substitutions of T (i.e. the value of the block attribute of the complex type definition &quot;Type&quot; in the concrete examples).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66700</commentid>
    <comment_count>1</comment_count>
    <who name="David Ezell">David_E3</who>
    <bug_when>2012-04-13 15:52:42 +0000</bug_when>
    <thetext>Needs further research.
Once the test suite is in its new location this research will be easier.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66704</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-04-13 17:04:32 +0000</bug_when>
    <thetext>I agree with Andreas. The spec has been deliberately changed. In XSD 1.0 you were allowed to say that Member1 is in the substitution group of Head, but saying this had no effect, so the instance is invalid. In XSD 1.1 we&apos;ve changed it so instead of being ineffective, it&apos;s an error. (Saxon issues a warning at schema processing time; the code that issues this warning carries a comment which could be interpreted as slanderous.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66913</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-04-20 22:41:28 +0000</bug_when>
    <thetext>As far as I can see the same reasoning also makes the following invalid:

disallowedSubst00105m
disallowedSubst00106m2
disallowedSubst00501m2
disallowedSubst00502m3
disallowedSubst00502m4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66916</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-04-20 22:53:50 +0000</bug_when>
    <thetext>To try and sum up my reading of the current rules in ordinary English:

(a) if you declare an element M as being in the substitution group of H, and H
blocks substitution, that&apos;s not in itself an error, it just means M can&apos;t be
substituted for H.

(b) however, if the type of M is not substitutable for the type of H, perhaps
because either H or the type of H blocks substitution (or
restriction|extension, if the type of M is a restriction|extension), that is an
error - it makes the schema invalid. This is the case that has changed since
1.0.

I suppose it&apos;s pointless to ask why the distinction?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67059</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-04-25 20:17:05 +0000</bug_when>
    <thetext>Other affected tests in the Microsoft ElementDecl test set:

elemT062
elemT063
elemT064
elemT065
elemT066
elemT077</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67108</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-04-26 14:33:19 +0000</bug_when>
    <thetext>Test msData/additional/addB114.xsd has the same problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67323</commentid>
    <comment_count>7</comment_count>
    <who name="David Ezell">David_E3</who>
    <bug_when>2012-05-04 16:22:58 +0000</bug_when>
    <thetext>Resolved: change the outcome of the listed tests to invalid for 1.1.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>