W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2003

multiple elements with the same name

From: Andrew H McDowall <ahm@cs.stir.ac.uk>
Date: Thu, 25 Sep 2003 14:32:59 +0100 (BST)
Message-ID: <2543.>
To: xmlschema-dev@w3.org

I am fairly new the XML Schema and I am trying to define a schema that
offers a choice between elements with the same name but with different
attributes.  For example:

<if index="xs:integer" last="yes|no"/>


<if name="xs:string"/>


<if type="xs:string" not="xs:string"/>

Is this possible with XSD or do I need to embed some schematron?  Further
more would it be possible to define an abstract tpye <if/> and use the
above choice as a substitution group?


Andrew McDowall

The University of Stirling is a university established in Scotland by
charter at Stirling, FK9 4LA.  Privileged/Confidential Information may
be contained in this message.  If you are not the addressee indicated
in this message (or responsible for delivery of the message to such
person), you may not disclose, copy or deliver this message to anyone
and any action taken or omitted to be taken in reliance on it, is
prohibited and may be unlawful.  In such case, you should destroy this
message and kindly notify the sender by reply email.  Please advise
immediately if you or your employer do not consent to Internet email
for messages of this kind.
Received on Thursday, 25 September 2003 09:34:11 UTC

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