[Home] [By Thread] [By Date] [Recent Entries]

  • From: "David E. Cleary" <davec@p...>
  • To: "Fabrice DESRE - FT.BD/FTRD/DMI/GRI" <fabrice.desre@f...>,xml-dev@l...
  • Date: Wed, 05 Sep 2001 11:36:52 -0400



> -----Original Message-----
> From: desrefa@p...
>
> <xsd:complexType name="error.Type">
>    <xsd:attribute name="code">
>       <xsd:simpleType>
>          <xsd:restriction base="xsd:string">
> 	    <xsd:enumeration value="E_UNKNOWN_ERROR"/>
>             <xsd:enumeration value="E_FATAL_ERROR"/>
> 	 </xsd:restriction>
>       </xsd:simpleType>
>    </xsd:attribute>
> </xsd:complexType>
>
> This type is declared in a schema with a targetNamespace.
>
> What I need is to derive this base type in schemas that
> declares another targetNamespace, to add more enumeration
> values. The goal of course is to use the right type depending
> on the context.

Use a named simpletype for the base enumeration. Include or import this
definition into a schema that will be using it. Create a new simpletype with
the additional enumeration values. Set the attribute type to be a union of
the base enumeration and extended enumeration.

Dave


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member