W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2000

using redefine

From: David Valera <dvalera@pcl-hage.nl>
Date: Fri, 22 Dec 2000 10:58:15 +0100
To: <xmlschema-dev@w3.org>
Message-ID: <D1F94D8C7C1FD111A5290020AF92B1B3B03A38@INTRASERVER>
hello,

I am looking at the possibilities of using redefine in an XML schema. What I
have seen from the primer, it is possible to add an element to a particular
complexType, like this:

<redefine
  schemaLocation="http://www.example.com/schemas/address.xsd">

  <!-- redefinition of Address -->
  <complexType name="ipo:Address">
   <complexContent>
     <extension base="ipo:Address">
      <sequence>
       <element name="country" type="string"/>
      </sequence>
     </extension>
   </complexContent>
  </complexType>

 </redefine>

My question is, is it also possible to 'remove' elements that are declared
in the ipo: Address. Lets say address is:


 <complexType name="Address">
  <sequence>
   <element name="name"   type="string"/>
   <element name="street" type="string"/>
   <element name="city"   type="string"/>
  </sequence>
 </complexType>

I would like to have the possibility of redefining Address so that it only
has two elements, 'name' and 'street'. element 'city' is no longer needed.
Is this possible using redefine or do I have to stick to the possibilities
of extension and restriction?

thanks,

David Valera
Received on Friday, 22 December 2000 04:57:26 GMT

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