W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2002

SimpleType, SimpleContent, Redefine

From: Bruno Chatel <bcha@chadocs.com>
Date: Wed, 20 Mar 2002 04:31:56 -0500 (EST)
Message-ID: <01ae01c1cff2$51706440$0600a8c0@chafou>
To: <xmlschema-dev@w3.org>
Cc: "patt" <pattar@tireme.fr>, <bcha@chadocs.com>
Hello,

I would like to know if the following compleType defintion is allowed:

<xs:complexType name="unit">
      <xs:simpleContent>
           <xs:extension base="xs:integer"/>
      </xs:simpleContent>
 </xs:complexType>

It seems to be equivalent than :

<xs:simpleType name="unit">
    <xs:restriction  base="xs:integer"/>
<xs:simpleType>

In fact, I want to define an "interface" of the unit type in order to redefine it :
(with the first unit complexType def)

 <xs:redefine schemaLocation="unit.xsd">
      <xs:complexType name="unit">
           <xs:simpleContent>
                <xs:extension base="unit">
                     <xs:attribute name="otherVal" type="xs:integer" use="required"/>
                </xs:extension>
           </xs:simpleContent>
      </xs:complexType>
 </xs:redefine>

This redefinition seems to be forbiden (xsv error : Basing a type on itself is forbidden).
This error is raised only when I try to redefine a complexType with a simpleContent.
A redefine of a complexType (with a complexContent) using the same name seems
to be correct ....

Thanks in advance

Regards


-- bruno --
Bruno Chatel
Tel : (+33)[0] 4 96 11 14 57
Email : bcha@chadocs.com
----------------------------------------
Received on Thursday, 21 March 2002 12:03:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:30 GMT