[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XML schema cos-nonambig problem


RE:  XML schema cos-nonambig problem
> However, if the complex type were changed to look as
> follows:
> 
> > >>       <xs:complexType name="contentiddef">
> > >> 		<xs:choice>
> > >> 			<xs:choice minOccurs="0" maxOccurs="unbounded">
> > >> 				<xs:element ref="x:externalid"/>
> > >> 				<xs:element ref="x:major"/>
> > >> 			</xs:choice>
> > >> 			<xs:choice minOccurs="0" maxOccurs="unbounded">
> > >> 				<xs:element ref="x:major"/>
> > >> 				<xs:element ref="x:minor"/>
> > >> 				<xs:element ref="x:version"/>
> > >> 			</xs:choice>
> > >> 		</xs:choice>
> > >> 	</xs:complexType>
> 
> the XML schema processor would know which choice set it is in when it
> encounters a "major" element because if it first encountered an
> "externalID" element (which must remain mandatory - as it is 
> above - in
> order for this to work) it knows that it must be in the first choice
> set; otherwise, it must be in the second.

I don't think so. The model here is ((e|ma)* | (ma|mi|v)*), and content
consisting of a single "ma" element would match either branch.

Michael Kay
http://www.saxonica.com/



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
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.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.