[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
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
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,
**************************************************************************
|
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
|