|
[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
RE: xs:choice question...
Why
not just:
<xs:choice> <xs:sequence>
<xs:element name="A" minOccurs="1"/>
<xs:element name="B" minOccurs="0"/> </xs:sequence> <xs:element name="B"
minOccurs="1"/>
</xs:choice>
Hope
that helps,
Priscilla
-----------------------------------------------------------------
Priscilla
Walmsley
http://www.datypic.com/ Author, Definitive XML
Schema (Prentice Hall PTR)
Definitive XQuery (coming in 2006) -----------------------------------------------------------------
Hello, I have a schema that
needs to require 1 of 2 elements, but also allow for both of them. So if the
elements are A & B, then A alone is valid, B alone is valid, A & B are
valid, but ~A & ~B is invalid.
I tried the following..
<xs:choice>
<xs:sequence>
<xs:element name="A" minOccurs="1"/>
<xs:element name="B"
minOccurs="0"/>
</xs:sequence>
<xs:sequence>
<xs:element name="A" minOccurs="0"/>
<xs:element name="B"
minOccurs="1"/>
</xs:sequence>
</xs:choice>
But this is not working as it makes the model
non-deterministic. Is there a way to solve this?
Thanks for your time and kind regards, Brian Gentry
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
| RSS 2.0 |
 |
| Atom 0.3 |
 |
| |
Stylus Studio has published XML-DEV in RSS and ATOM formats,
enabling users to easily subcribe to the list from their preferred news reader application.
|
Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website.
they were not included by the author in the initial post. To view the content without the Sponsor Links please
click here.
|
|