W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2007

Re: Permit (greedy) conflicting wildcards

From: Pete Cordell <petexmldev@tech-know-ware.com>
Date: Tue, 20 Mar 2007 11:53:22 -0000
Message-ID: <00c001c76ae7$c1487790$c900a8c0@Codalogic>
To: <noah_mendelsohn@us.ibm.com>
Cc: <xmlschema-dev@w3.org>

Original Message From: <noah_mendelsohn@us.ibm.com>

> Pete Cordell writes:
>> ...
> Yes.  Without wanting to speak for the workgroup, because I don't think
> we've formally decided whether to include this, there is at least some
> chance that Schema 1.1 will have an additional variant of wildcard.  The
> syntax may be along the following lines:
>    <xs:sequence>
>      <xs:element name="given" type="xs:string"/>
>      <xs:any notQName="##defined" processContents="skip"
>              minOccurs="0" maxOccurs="unbounded"/>
>      <xs:element name="middle" type="xs:string"/>
>      <xs:any notQName="##defined" processContents="skip"
>              minOccurs="0" maxOccurs="unbounded"/>
>      <xs:element name="family" type="xs:string"/>
>    </xs:sequence>
> The idea would be that the wildcard would not allow any element for which
> an element declaration existed anywhere in the schema.  So, the second
> "given" in your example below would be rejected.
> <given>abc</given>
> <middle>abs</middle>
> <given>ag</given>
> <family>jhjh</family>
> The theory is that since you knew about the element <given>, if you wanted
> to allow it after <middle>, you could have said so;  those wildcards are
> for things you >don't< know about.  I suggest that the nuances of this
> feature probably shouldn't be debated until the WG decides whether to
> propose it, and if so in what form.  I just thought you might want to know
> that things like this are under consideration.

Thanks Noah.

This seems an eminently sensible justification to me, and I would imagine 
what many people would expect.  What is the justification for the currently 
specified set of rules?

To me, I think many people would be surprised that the rules allowed the 
example instance above to be valid.  When doing language design, "No 
surprises" seems like a good mantra.

Thanks again,

Pete Cordell
Tech-Know-Ware Ltd
for XML to C++ data binding visit
Received on Tuesday, 20 March 2007 12:04:03 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:41 UTC