FailedJoiner
Programmer
Hello world,
what I'm looking for is a way to write the portion of an XMLSchema document that describes a certain kind of elements.
These elements may have either a certain set of attributes, or another set of attributes, but neither both, nor some attributes from the first set and some attributes from the second set.
For example, here is how the XML document validated by the abovesaid XMLSchema could look like:
...
<create-replace-service number="0233873"/>
...
<create-replace-service type="email" dept="network"/>
...
As you can see, the create-replace-service is an element with no subelements, and it may have either an attribute called 'number', or two attributes called 'type' and 'dept'. The first option excludes the second one.
How can I describe this situation within the XMLSchema used to validate such an XML document? I know that this could be accomplished straighforwardly using <xsd:choice> and subelements instead of attributes, but I strongly need to use attributes.
Thank you for any help,
Alessio
what I'm looking for is a way to write the portion of an XMLSchema document that describes a certain kind of elements.
These elements may have either a certain set of attributes, or another set of attributes, but neither both, nor some attributes from the first set and some attributes from the second set.
For example, here is how the XML document validated by the abovesaid XMLSchema could look like:
...
<create-replace-service number="0233873"/>
...
<create-replace-service type="email" dept="network"/>
...
As you can see, the create-replace-service is an element with no subelements, and it may have either an attribute called 'number', or two attributes called 'type' and 'dept'. The first option excludes the second one.
How can I describe this situation within the XMLSchema used to validate such an XML document? I know that this could be accomplished straighforwardly using <xsd:choice> and subelements instead of attributes, but I strongly need to use attributes.
Thank you for any help,
Alessio