W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2012

Re: Attribute with fixed value in derived types

From: Michael Kay <mike@saxonica.com>
Date: Wed, 27 Jun 2012 14:44:10 +0100
Message-ID: <4FEB0E2A.9080901@saxonica.com>
To: Florent Georges <lists@fgeorges.org>
CC: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Something like this:

     <xs:complexType name="type">
        <xs:attribute ref="my:attr" use="required"/>

     <xs:complexType name="restrictedType">

       <xs:attribute ref="my:attr" use="required" fixed="...."/>
    I then use it to define some elements with additional children:

     <xs:element name="elem">
          <xs:extension base="my:restrictedType">

Michael Kay
Received on Wednesday, 27 June 2012 13:44:37 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:20 UTC