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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   XML Schema: At Least One of X Elements Must Appear

[ Lists Home | Date Index | Thread Index ]
  • To: xml-dev@lists.xml.org
  • Subject: XML Schema: At Least One of X Elements Must Appear
  • From: "CHIUSANO, Joseph" <JCHIUSANO@lmi.org>
  • Date: Sun, 18 Aug 2002 13:16:36 -0400
  • Return-receipt-to: "CHIUSANO, Joseph" <JCHIUSANO@lmi.org>

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@lmi.org
  Tel: 571.633.7722
**************************************************************************






 

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

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