Re: Order indicators in the .xsd file

Ah yes, I was looking at the restrictions on xs:all cardinality itself, not 
the elements within it.  Panic over!!!

Thanks.

So in summary, for XSD 1.1 you can do:

<xs:all>
    <xs:element ref="a" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element ref="b" minOccurs="0" />
</xs:all>

but you can't in XSD1.0.

Pete Cordell
Codalogic Ltd
Interface XML to C++ the easy way using C++ XML
data binding to convert XSD schemas to C++ classes.
Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com
for more info
----- Original Message ----- 
From: "Michael Kay" <mike@saxonica.com>
To: "Pete Cordell" <petexmldev@codalogic.com>
Cc: <xmlschema-dev@w3.org>
Sent: Wednesday, October 17, 2012 4:16 PM
Subject: Re: Order indicators in the .xsd file


> OK, some of the restrictions were lifted but not all.
>
> Essentially, you still can't mix all/sequence/choice in the same content 
> model. So if you use xs:all, it has to be at the top level and can itself 
> only occur once. But the element and wildcard particles within xs:all can 
> now have arbitrary minOccurs and maxOccurs values.
>
> Michael Kay
> Saxonica
>
> On 17/10/2012 16:04, Pete Cordell wrote:
>> Original Message From: "Michael Kay"
>>> On 17/10/2012 15:35, Pete Cordell wrote:
>>>> Can't believe they didn't fix the restrictions on xs:all in XSD 
>>>> 1.1!!!!!! :-(
>>>>
>>> They did.
>>
>> I'm looking at:
>>
>> http://www.w3.org/TR/xmlschema11-1/#declare-contentModel
>>
>> It says:
>>
>> <all
>>  id = ID
>>  maxOccurs = (0 | 1) : 1
>>  minOccurs = (0 | 1) : 1
>>  {any attributes with non-schema namespace . . .}>
>>  Content: (annotation?, (element | any | group)*)
>> </all>
>>
>> Am I looking at the wrong bit?
>>
>> Pete Cordell
>> Codalogic Ltd
>> Twitter: http://twitter.com/petecordell
>> Interface XML to C++ the easy way using C++ XML
>> data binding to convert XSD schemas to C++ classes.
>> Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com
>> for more info
>>
>>
>
> 

Received on Wednesday, 17 October 2012 15:33:44 UTC