<?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>6168</bug_id>
          
          <creation_ts>2008-10-16 16:04:27 +0000</creation_ts>
          <short_desc>Interaction of notQName=&quot;##defined&quot; with processContents</short_desc>
          <delta_ts>2008-10-30 13:24:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Schema</product>
          <component>Structures: XSD Part 1</component>
          <version>1.1 only</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WORKSFORME</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="Michael Kay">mike</reporter>
          <assigned_to name="C. M. Sperberg-McQueen">cmsmcq</assigned_to>
          
          
          <qa_contact name="XML Schema comments list">www-xml-schema-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>22184</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2008-10-16 16:04:27 +0000</bug_when>
    <thetext>In an element or attribute wildcard, using notQName=&quot;##defined&quot; together with processContents=&quot;lax&quot; or processContents=&quot;strict&quot; would seem to be meaningless.

Shouldn&apos;t it be banned?

Alternatively, should the functionality be delivered through a new value for processContents rather than through the notQName attribute?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22188</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2008-10-17 08:48:03 +0000</bug_when>
    <thetext>Further thoughts on this. There now seem to be four ways of controlling what happens when a wildcard matches/does not match a global element/attribute declaration:

strict: validate if defined, error if not

lax: validate if defined, untyped if not

skip: untyped if defined, untyped if not

notQName=defined: error if defined, untyped if not

One practical implication of making this a fourth option on processContents (let&apos;s say processContents=&quot;undeclared&quot;) would be that it would affect the rules for wildcard intersection and union. Currently the rules for attribute groups with multiple wildcards are pretty strange: you get the intersection of the allowed namespaces, but the processContents of the first wildcard. Moving the notQName=defined so it became a processContents option wouldn&apos;t suddenly set the world to rights on this, but it would ensure that you don&apos;t end up with crazy combinations like processContents=&quot;strict&quot; notQName=&quot;##defined&quot;.

(I&apos;m not sure where this leaves notQName=&quot;##definedSibling&quot;, however - that&apos;s another carbuncle, if you ask me.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22197</commentid>
    <comment_count>2</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2008-10-17 16:51:01 +0000</bug_when>
    <thetext>Using &quot;processContents&quot; for the &quot;not-in-schema&quot; wildcard support was one possibility the WG considered, because its interaction with global declarations is like the opposite of &quot;strict&quot;. The WG decided not to do it. We may be able to recover the reasoning by fishing through the minutes.

One way to look at the interaction between {namespace constraint} and {process contents} is that the former controls what to match, and the latter controls what to do after the match. For &quot;not-in-schema&quot; wildcard, one could argue that the test should fail at the &quot;match&quot; step, which makes {namespace constraint} (hence notQName) a better choice.

Also note that &quot;strict&quot; = &quot;can be validated (against a declaration or a type)&quot; != &quot;matches a global declaration&quot;. i.e. having an xsi:type would satisfy strict (and lax), without a matching global element declaration.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22285</commentid>
    <comment_count>3</comment_count>
    <who name="C. M. Sperberg-McQueen">cmsmcq</who>
    <bug_when>2008-10-29 22:16:08 +0000</bug_when>
    <thetext>The WG discussed this issue at some length during the ftf today.

After discussion, those present felt that the initial proposition in
the issue description is not really true: the meaning of a strict
not-in-schema wildcard is unusual and unlikely to be widely needed,
but it does have a well-defined meaning: it does not match any element
declared in the schema, and if it does match an element (which will be
one not defined in the schema), either there is an xsi:type on the
element, or the parent will be invalid.

The difference between this and an imaginary wildcard with
processContents=&quot;undeclared&quot; is also visible in the interaction with
open content:  if &apos;e&apos; is declared in the schema, then 

  &lt;xs:any notQName=&quot;##defined&quot;/&gt;

does not match an instance of &apos;e&apos;, which means the &apos;e&apos; may be matched
by the open content particle, whereas

  &lt;xs:any processContents=&quot;undeclared&quot;/&gt;

would match an &apos;e&apos; and prevent it matching the open content particle.

We concluded that the right way to class this bug report is as
&apos;WORKSFORME&apos;.

Michael, please review this decision and its rationale and communicate your
judgement in the usual way.  Thanks.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22290</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2008-10-30 13:24:39 +0000</bug_when>
    <thetext>I think this rationale exposes the severe lack of orthogonality in the design of this construct; but lack of orthogonality is not a bug (and is nothing new to XSD) so I will accept the resolution.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>