Re: Attribute with fixed value in derived types
Michael Kay <[email protected]> Wed, 27 Jun 2012 14:44:10 +0100
| Newsgroups | gmane.text.xml.schema.devel |
|---|---|
| Message-ID | <[email protected]> |
Something like this:
<xs:complexType name="type">
...
<xs:attribute ref="my:attr" use="required"/>
</xs:complexType>
<xs:complexType name="restrictedType">
...
<xs:attribute ref="my:attr" use="required" fixed="...."/>
</xs:complexType>
I then use it to define some elements with additional children:
<xs:element name="elem">
<xs:complexType>
<xs:complexContent>
<xs:extension base="my:restrictedType">
<xs:sequence>
...
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
Michael Kay
Saxonica