XSD: how to override simpleType data type, for example. from xs: string to xs: integer

I am trying to expand and adapt an external xsd scheme (fixml standard). I need to change the data type of some elements, not touching the original schema, but redefining it; but found it extremely cumbersome.

What exists:

fields-base.xsd

<xs:simpleType name="LastUpdateTime_t">
           <xs:restriction base="UTCTimestamp">
<xs:simpleType>

what I want:

<xs:simpleType name="LastUpdateTime_t">
           <xs:restriction base="xs:string">
<xs:simpleType>

What I tried (but could not):

<xs:redefine schemaLocation="fields-base.xsd">
            <xs:simpleType name="LastUpdateTime_t">
              <xs:restriction base="xs:string" />
            </xs:simpleType>
 </xs:redefine>

Books and the network also seem to have helped too much, so I'm starting to doubt if this is theoretically possible at all.

+5
source share
1 answer

As far as I can tell, this is impossible.

The only override that I could make validation in XMLSpy was:

<xs:redefine schemaLocation="fields-base.xsd"> 
        <xs:simpleType name="LastUpdateTime_t"> 
          <xs:restriction base="LastUpdateTime_t" /> 
        </xs:simpleType> 
</xs:redefine> 

That is, the new restriction should be based on a basic restriction.

, XMLSpy .

XML W3C:

[] simpleType [] complexType grand- [] · · of ;

( XMLSpy ).

, , . .

+4

All Articles