![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - optional, but at least one required [Thread Next] Re: optional, but at least one requiredTo: bkbonner@-----.--- Date: 1/5/2006 11:33:00 AM
Hello Brian,
You can write the content model as:
(a, b?, c?) | (b, c?) | c
<xs:complexType>
<xs:choice>
<xs:sequence>
<xs:element ref="a"/>
<xs:element ref="b" minOccurs="0"/>
<xs:element ref="c" minOccurs="0"/>
</xs:sequence>
<xs:sequence>
<xs:element ref="b"/>
<xs:element ref="c" minOccurs="0"/>
</xs:sequence>
<xs:element ref="c"/>
</xs:choice>
</xs:complexType>
Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
www.---.com
Brian Bonner wrote:
> Hello,
>
> Is there a way through restrictions or xmlschema in general to create
> the following criteria?
>
> <options>
> <a></a>
> <b></b>
> <c></c>
> </options>
>
> where the rule is that a, b and c are all optional, but at least one
> of a, b or c is required.
>
> Thanks.
>
> Brian
>
>
From mike@s... Thu Jan 05 10:03:33 2006
Received: from maggie.w3.org ([ | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
