W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2007

RE: Selective element based on attribute

From: Michael Kay <mike@saxonica.com>
Date: Fri, 5 Oct 2007 09:29:14 +0100
To: <Muthuvelan.Swaminathan@dds.net>, <xmlschema-dev@w3.org>
Message-ID: <01fb01c80729$d05cb7d0$6401a8c0@turtle>
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


From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org] On
Behalf Of Muthuvelan.Swaminathan@dds.net
Sent: 04 October 2007 20:33
To: xmlschema-dev@w3.org
Subject: Selective element based on attribute

Hi  there, 

How can I define an xsd for the following scenario? 

<parenttag attr="add | del | chg"> 

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? 

Received on Friday, 5 October 2007 08:29:24 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:44 UTC