Re: Permit (greedy) conflicting wildcards

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.
--
=============================================
Pete Cordell
Tech-Know-Ware Ltd
for XML to C++ data binding visit
http://www.tech-know-ware.com/lmx/
http://www.codalogic.com/lmx/
=============================================

Received on Tuesday, 20 March 2007 12:04:03 UTC