OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] XML Schema: At Least One of X Elements Must Appear

[ Lists Home | Date Index | Thread Index ]

In general I don't think W3C XML Schema can satisfy your requirements but believe that there may be a work around for specific cases. Your example wasn't detailed enough to tell if your case is one where a work around is possible. Perhaps some sample XML or schema fragment? 

	-----Original Message----- 
	From: CHIUSANO, Joseph [mailto:JCHIUSANO@lmi.org] 
	Sent: Sun 8/18/2002 10:35 AM 
	To: 'Ken Sall'; CHIUSANO, Joseph; xml-dev@lists.xml.org 
	Cc: 
	Subject: RE: [xml-dev] XML Schema: At Least One of X Elements Must Appear
	
	

	Not sure how use of a wildcard can help here....would you be willing to provide more specifics? 

	> ************************************************************************** 
	>   Joseph M. Chiusano 
	>   Logistics Management Institute 
	>   2000 Corporate Ridge 
	>   McLean, VA 22102 
	>   Email: jchiusano@lmi.org 
	>   Tel: 571.633.7722 
	> ************************************************************************** 
	> 


	-----Original Message----- 
	From: Ken Sall [mailto:ken@sall.net] 
	Sent: Sunday, August 18, 2002 1:33 PM 
	To: CHIUSANO, Joseph; xml-dev@lists.xml.org 
	Subject: Re: [xml-dev] XML Schema: At Least One of X Elements Must 
	Appear 


	XML Schema: At Least One of X Elements Must AppearJoseph wrote> I am 99.9% 
	sure that there is no way to represent in XML Schema that "at least one of 
	the following X elements must appear in the XML document" - **am I 
	correct?** 

	How about: 

	         <xsd:any  minOccurs="0" maxOccurs="unbounded" > <!-- or 1 --> 
	          <!-- nest xsd:sequence or xsd:choice here --> 
	        </xsd:any> 

	- Ken Sall               kensall@comcast.net or ken@sall.net 
	- XML Consultant/Author  http://mywebpages.comcast.net/kensall/ 
	- XML Family of Specifications: A Practical Guide (just published) 
	- http://WDVL.Internet.com/Authoring/Languages/XML/XMLFamily/ 






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS