Is it possible to extend an element in XSD 1.1 based on another element's value?
For example:
<Field>
<Title>Text Field</Title>
<Type>Text</Type>
<Length>100</Length>
</Field>
<Field>
<Title>Date Field</Title>
<Type>Date</Type>
<Format>mm/dd/yyyy</Format>
<Field>
Both Field elements share common Title and Type elements.
For the Text Field, it can have a Length
element, but Date cannot.
The Date Field
can have Format
, but Text
cannot.
I'd like to extend both Text and Date fields, if possible, from a common type.
Note: I'm assuming the above is not possible in XSD 1.0
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…