W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2001

redefinition of schema components

From: <afo@zurich.ibm.com>
Date: Mon, 29 Jan 2001 11:38:57 +0100
To: www-xml-schema-comments@w3.org
Message-ID: <C12569E3.003A80C8.00@d12mta01.de.ibm.com>



Hi,

I have two  of questions on how schema redefinition works.

1/
First, section 6.2.2 of Part I  says  ?The definitions within the  redefine
element itself are restricted to be redefinitions of components from the
redefined schema document? Does this mean that we cannot redefine
components which originally come from  included or  redefined schema
documents of the considered redefined schema document? In other words is
the following example valid?

In A.xsd:
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" >
     <xsd:redefine schemaLocation=?B.xsd?>
          <xsd:simpleType name=?C?>
               <xsd:restriction base=?C?>
                    <!-- etc -->
               </xsd:restriction>
          </xsd:simpleType>
     </xsd:redefine>
     <xsd:simpleType name=?A?>
          <xsd:restriction base=?xsd:string?/>
     </xsd:simpleType>
</xsd:schema>

In B.xsd
<xsd:chema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema">
     <xsd:include schemaLocation=?C.xsd?/>
     <xsd:simpleTypename=?B?>
          <xsd:restriction base=?xsd:string?/>
     </xsd:simpleType>
</xsd:schema>

In C.xsd
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema">
     <xsd:simpleTypename=?C?>
          <xsd:restriction base=?xsd:string?/>
     </xsd:simpleType>
</xsd:schema>


2/
Second,  section 6.2.2 of Part 1 says ?The modifications have a pervasive
impact, that is, only the redefined components are used, even when
referenced from other incorporated components, whether redefined themselves
or not.? Does this pervasive impact also affect components define neither
inside the redefine element nor inside the redefined schema document but
which come from included or redefined schema documents  used by the
considered redefined schema document? Here is a example of this case:

In A.xsd
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema">
     <xsd:redefine schemaLocation=?B.xsd?>
          <xsd:simpleType name=?B?>
               <xsd:restriction base=?B?>
                    <!-- etc -->
               </xsd:restriction>
          </xsd:simpleType>
     </xsd:redefine>
     <xsd:simpleType name=?A?>
          <xsd:restriction base=?xsd:string?/>
     </xsd:simpleType>
</xsd:schema>

In B.xsd
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema">
     <xsd:include schemaLocation=?C.xsd?/>
     <xsd:simpleTypename=?B?>
          <xsd:restriction base=?xsd:string?/>
     </xsd:simpleType>
</xsd:schema>

In C.xsd
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema">
     <xsd:include schemaLocation=?B.xsd?/>
     <xsd:simpleTypename=?C?>
          <xsd:restriction base=?B?/>
     </xsd:simpleType>
</xsd:schema>

The  XML Schema corresponding to the schema document located at A.xsd
contains simpleType C. Here is my question: what is the basetype of
 this type ? SimpleType B as defined in B.xsd or the redefined version
located at A.xsd? [ I hope the right answer is SimpleType B as defined in
B.xsd]

     Thank you for your help.

     Achille Fokoue
Received on Monday, 29 January 2001 05:39:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:49 GMT