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

XML Schema: At Least One of X Elements Must Appear

  • To: xml-dev@l...
  • Subject: XML Schema: At Least One of X Elements Must Appear
  • From: "CHIUSANO, Joseph" <JCHIUSANO@l...>
  • Date: Sun, 18 Aug 2002 13:16:36 -0400
  • Return-receipt-to: "CHIUSANO, Joseph" <JCHIUSANO@l...>

x elements
Title: XML Schema: At Least One of X Elements Must Appear

Hello,

I am creating an XML schema from an EDI transaction.  In some cases, there is a qualifier/data element pair such as:

REF01   - Qualifier
REF02   - Data

So for example, if REF01= "FS", then REF02 represents "Final Sequence Number", etc.  Additionally, the REF01 and REF02 are listed as mandatory in the IG, meaning that at least one of the possible REF01 qualifier values must be represented in the transaction.

Having said that, I have chosen to not use qualifiers in the schema - rather, to create distinct elements for each possible qualifier value ("FinalSequenceNumber", etc.).  Here's my question:

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?**  (I know that Schematron can be used for this, as well as RNG)  In other words, I don't believe that with the above approach (and using XML Schema) I can satisfy the requirement that "at least one of the possible REF01 qualifier values must be represented in the transaction".  I want to be 100% sure before I tell a client this.

Thanks in advance,
Joe Chiusano
LMI

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



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.