Overriding of a fixed value

Dear XML-Schema users,

I have a question about overriding fixed values.

Consider the following complex type definition:

<xs:complexType name="type0">
  <xs:simpleContent>
    <xs:extension base="int"/>
  </xs:simpleContent>
  <xs:attribute name="description" fixed="a description"/>
</xs:complexType>

Now, I want to express a type called type1 in an XML schema, such that
type1 
is an inheritance type of type0 and type1 overrides the (fixed) value of
the 
attribute 'desc' of type0. 

A straightforward solution would be:

<xs:complexType name="type1">
  <xs:simpleContent>
    <xs:restriction base="type0"/>
  </xs:simpleContent>
  <xs:attribute name="description" fixed="another description"/>
</xs:complexType>

However, this seems not to be correct because the following XML document
that
contains an element ('x') of type1 is not a correct instance:

<x>
  3
</x> <-- unexpected character literal

I am using the msv-20010910 validator.

Does anyone know if it is possible to express overriding of (fixed)
attribute 
values in an XML Schema? An if so, how I can do it?

Thanks in advance,

Maikel Jansen.

Received on Saturday, 8 December 2001 15:33:02 UTC