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

Selective element based on attribute

From: <Muthuvelan.Swaminathan@dds.net>
Date: Thu, 4 Oct 2007 15:32:55 -0400
To: xmlschema-dev@w3.org
Message-ID: <OFB6FC1489.55A81CFC-ON8525736A.006ACA05-8525736A.006B5448@donovandata.com>
Selective element based on attribute
Hi  there,

How can I define an xsd for the following scenario?

<parenttag attr="add | del | chg">
     <childtag1>chidvalue1</childtag1>
     <childtag2>chidvalue2</childtag2>
     <childtag3>chidvalue3</childtag3>
</parenttag>

Is it possible to create an xsd where childtag3 will have a value null if 
the parenttag  attr equals add else a nonnull-String when the parenttag 
attr is del/chg?

Thanks
Muthu
Received on Friday, 5 October 2007 00:45:55 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.