Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: using xs:choice inside xs:all

From: George Cristian Bina <george@---------.--->
To: Mahesh Vittal <mvittal@-----.--->
Date: 1/10/2006 2:10:00 PM
Hi Mahesh,

You cannot have xs:choice inside of xs:all.
I think it may be possible to write the content model to match your 
requirements with choice and sequence but that may be complex.
If Schematron does not scare you :) then you may use Schematron embedded 
rules to enforce your constraints and relax the content model in the XML 
Schema to a choice between your possible elements.

Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
www.---.com


Mahesh Vittal wrote:
> Hi ,
> 
> I am trying for an XML Schema which would achieve the following 
> functionality...
> 
> [1]  Atleast one or both of "element1" or "element2" can occur
> [2]  Atleast one or a combination of <element3>....<element5>
> [3]  <element1> ....<element<5> can occur in any order.
> 
> <Root-element>
>    <element1>a</element1>
>    <element2>b</element2>
>    <element3>c<element3>
>    <element4>d<element4>
>    <element5>e<element5>
> </Root-element>
> 
> I was able to achieve [1] & [2] by using a <xs:choice 
> maxOccurs="unbounded"> for the two sets of elements and arrange it 
> inside a <xs:sequence> but the functionality I want is without ordering. 
> Any help on this is appreciated.
> 
> Regards,
> Mahesh
> 
> 
> 
> 

From skits@m... Wed Jan 11 00:21:30 2006
Received: from lisa.w3.org 


transparent
Print
Mail
Digg
delicious
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