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

Choice of sub-element or character-data in an element

From: Arshad Noor <arshad.noor@strongauth.com>
Date: Sat, 21 Jun 2008 16:43:30 -0700
Message-ID: <485D9222.8080102@strongauth.com>
To: xmlschema-dev@w3.org
Choice of sub-element or character-data in an element

How is it possible to define an XSD to allow an element to
either contain custom sub-elements, or a fixed string?

For example, I would like to be able to do the following:

<ElementA>
    <ElementB>
       <ElementC>Some value</ElementC>
       <ElementD>Another value</ElementD>
    </ElementB>
</ElementA>

or

<ElementA>
    <ElementB>Any</ElementB>
</ElementA>

I'm not sure how to use <xsd:choice> to define this?  Thanks
for any suggestions.

Arshad Noor
StrongAuth, Inc.
Received on Monday, 23 June 2008 01:39:04 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
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-2007 All Rights Reserved.