Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Ignore Order while validating XSD

From: "C. M. Sperberg-McQueen" <cmsmcq@---.--->
To: Eduardo Oliveira <eduardo.oliveirared@-----.--->
Date: 1/26/2009 5:13:00 AM

On 26 Jan 2009, at 09:08 , Eduardo Oliveira wrote:

> ...
> 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?

Correct.  XSD 1.1 may be helpful to you here (so make sure your vendors
know you would like to see it supported), because it will allow you to
express

>
> Another problem I had is using xs:all inside the xs:group cause an  
> error. Is it not possible?

No, all-groups complicate matters a great deal when they are allowed
inside of other group types.  It's not the occurrence of xsd:all inside
the model group definition that is forbidden, but the use of that
defined all-group inside a sequence.  So what you want may be more like
this:


  <xsd:group name="bcx">
   <xsd:choice>
    <xsd:element ref="my:b" />
    <xsd:element ref="my:c" />
    <xsd:element ref="my:x" />
   </xsd:choice>
  </xsd:group>

  <xsd:complexType name="oliveira">
   <xsd:sequence>
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
     <xsd:group ref="my:bcx"/>
    </xsd:choice>
    <xsd:element ref="my:a" />
    <xsd:choice minOccurs="0" maxOccurs="unbounded">
     <xsd:element ref="my:a" />
     <xsd:group ref="my:bcx"/>
    </xsd:choice>
   </xsd:sequence>
  </xsd:complexType>

I hope this helps.


-- 
C. M. Sperberg-McQueen, W3C XML Activity
http://www.w3.org/People/cmsmcq
http://cmsmcq.com/mib/
http://www.balisage.net/



From bharathkr@h... Tue Jan 27 05:34:38 2009
Received: from bart.w3.org ([128.30.52


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