- From: Lieve Laporte <lieve.laporte@uz.kuleuven.ac.be>
- Date: Wed, 28 Nov 2001 10:22:52 +0100
- To: <xmlschema-dev@w3.org>
Hello,
Can anyone help me with the following:
I have two xml documents that are quite similar, except for the presence of
one particular tag. I would like to use the same schema to validate both
these documents. Is there a way to make a schema conditional? Can I in some
way express that for instance if the document contains attribute value "x",
that a certain tag should be present, and if the document contains attribute
value "y", that it cannot contain that same tag?
example:
<actions name="access">
...
==> the document has to contain tag <tag>
...
</actions>
<actions name="settings">
...
==> the document may not contain tag <tag>
...
</actions>
In this case, can I express in the schema that if the value of name is
access, the <tag> should be present, and if the value of name is settings,
it shouldn't?
Thanks a lot,
Lieve
Received on Wednesday, 28 November 2001 04:22:55 UTC