xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dane Foster" <dfos...@equitytg.com>
Subject Schema Question
Date Wed, 08 Nov 2000 18:11:08 GMT
I know that most of the post to this list deal with Xerces and Xalan so this may not be the
place to ask this question.  If it's not please let me know.  Anyway, my question is this,
in the current Schema specification (..2000/10/XMLSchema), how do I specify that if an element
contains a particular attribute it's children must be a specific element?

Example:

Notes*: The myElement node's 'type' attribute can be one of two values "type1" or "type2".
 If the value is type1 then the root node(s) of the myElement sub-tree must be 'type-1-element'.
 If the value is type2 then the root node(s) of the myElement sub-tree must be 'type-2-element'.

<!--Scenario one-->
<myElement type="type1">
  <type-1-element>Element data goes here</type-1-element>
</myElement>


<!--Scenario two-->
<myElement type="type2">
  <type-2-element>Element data goes here</type-2-element>
</myElement>


Dane Foster


Mime
View raw message