SV: Permit (greedy) conflicting wildcards

>It says that under the current interpretation of XSD 1.1 the following 
>(slightly simplified from David's document) is illegal due to the 
>minOccurs="0" of middle name allowing the two adjacent wildcards to 
>conflict:

>    <xs:sequence>
>      <xs:element name="given" type="xs:string"/>
>      <xs:any namespace="##any" processContents="lax"
>              minOccurs="0" maxOccurs="unbounded"/>
>      <xs:element name="middle" type="xs:string" minOccurs="0"/>
>      <xs:any namespace="##any" processContents="lax"
>              minOccurs="0" maxOccurs="unbounded"/>
>      <xs:element name="family" type="xs:string"/>
>    </xs:sequence>


Well I would have thought that it should also be illegal because I wouldn't
know if any element name (other than given) is one of the unbounded any? Hmm,
i seem to remember somewhere a discussion as to whether or not an element in
a structure that was a known should cause the any from stopping, which I
guess this would be a case of, but I can't remember the outcome. At any rate
I think it's problematic. 



>It then says that new wording in XSD1.1 has been added to make the following
>legal:

>    <xs:sequence>
>      <xs:element name="given" type="xs:string"/>
>      <xs:any namespace="##any" processContents="lax"
>              minOccurs="0" maxOccurs="unbounded"/>
>      <xs:sequence minOccurs="0">
>          <xs:element name="middle" type="xs:string" />
>          <xs:any namespace="##any" processContents="lax"
>                minOccurs="0" maxOccurs="unbounded"/>
>      </xs:sequence>
>      <xs:element name="family" type="xs:string"/>
>    </xs:sequence>

I am personally averse to this. What parts of the new spec are this in?


>Replacing the xs:anys with xs:element declarations, UPAC wise I don't
>think the following would be legal:

>    <xs:sequence>
>      <xs:element name="given" type="xs:string"/>
>      <xs:element name="any" minOccurs="0" maxOccurs="unbounded"/>
>      <xs:sequence minOccurs="0">
>          <xs:element name="middle" type="xs:string" />
>          <xs:element name="any" minOccurs="0" maxOccurs="unbounded"/>
>      </xs:sequence>
>      <xs:element name="family" type="xs:string"/>
>    </xs:sequence>
I think this would be perfectly legal, I can see where the any element is
supposed to start and end with no difficulty I think and I think it can
certainly be coded to not have any nondeterminative results. 

>    <xs:sequence>
>      <xs:any namespace="##any" processContents="lax"
>              minOccurs="0" maxOccurs="unbounded"/>
>      <xs:any namespace="##any" processContents="lax"
>              minOccurs="0" maxOccurs="unbounded"/>
>      <xs:any namespace="##any" processContents="lax"
>              minOccurs="0" maxOccurs="unbounded"/>
>    </xs:sequence>

>they should be allowed to do it and it wouldn't be an error. 

I suppose this should also be allowed but not only do I doubt its usefulness
I doubt its implementation would be uniformly achieved.

Cheers,
Bryan Rasmussen

Received on Monday, 19 March 2007 09:27:43 UTC