Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Ignore Order while validating XSD

From: Eduardo Oliveira <eduardo.oliveirared@-----.--->
To: "C. M. Sperberg-McQueen" <cmsmcq@---.--->, xmlschema-dev@--.---
Date: 1/26/2009 12:08:00 PM
You=B4re completly write.
I=B4d detected this problem.
To fix it, I group my fields in a group tag and use it before and after the
"a" element, for instance.
It is because I have so many fields to repeat in the code as the present
example...
Even, I have a problem because I can not limit the repeating size because
the elements are inside an unbounded size choice element, isn=B4t it?
Another problem I had is using xs:all inside the xs:group cause an error. I=
s
it not possible?

Thanks again, and sorry my mistake!

Eduardo

2009/1/26 C. M. Sperberg-McQueen <cmsmcq@a...>

>
> On 26 Jan 2009, at 04:55 , Eduardo Oliveira wrote:
>
>  Hello Mr. Sperberg-McQueen!
>>
>> That=B4s ok! Your solution run as I expected it to run!
>>
>> I just took the freedom to make a little change to reduce the code size,
>> setting the element "a"=B4s maxOccurs="unbounded", eliminating the sec=
ond
>> block  as below!
>>
>> Thanks a lot!
>>
>> Eduardo
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
>> elementFormDefault="qualified">
>>  <xs:element name="root">
>>    <xs:complexType >
>>      <xs:sequence>
>>        <xs:choice minOccurs="0" maxOccurs="unbounded">
>>          <xs:element name="b"/>
>>          <xs:element name="c"/>
>>          <xs:element name="x"/>
>>        </xs:choice>
>>        <xs:element name="a" maxOccurs="unbounded"/>
>>      </xs:sequence>
>>    </xs:complexType>
>>  </xs:element>
>> </xs:schema>
>>
>
> This is fine, if you do not mind the sequence
>
>  <b/><b/><a/><b/>
>
> being rejected.  I didn't have the impression, from the sketches using
> choice and all, that the 'a' element was required to be the last one,
> or that 'b', 'c', and 'x' were forbidden to appear after the 'a'. But
> if that doesn't trouble you, then yes, the second choice can be dropped.
>
> --
>  C. M. Sperberg-McQueen, W3C XML Activity
>  http://www.w3.org/People/cmsmcq
>  http://cmsmcq.com/mib/
>  http://www.balisage.net/
>
>
>
>


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent