Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Selective element based on attribute

From: "Michael Kay" <mike@--------.--->
To: <Muthuvelan.Swaminathan@---.--->, <xmlschema-dev@--.--->
Date: 10/5/2007 10:29:00 AM
Not in XML Schema 1.0 (a well-known restriction, which is lifted in XML
Schema 1.1, currently available as a last-call working draft.)
 
Michael Kay
http://www.saxonica.com/


  _____  

From: xmlschema-dev-request@w... [mailto:xmlschema-dev-request@w...] On
Behalf Of Muthuvelan.Swaminathan@d...
Sent: 04 October 2007 20:33
To: xmlschema-dev@w...
Subject: 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



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent