W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2003

Re: block, blockDefault

From: Alain Andrieux <aa_vrac@hotmail.com>
Date: Mon, 25 Aug 2003 09:44:57 -0700
Cc: <xmlschema-dev@w3.org>
Message-ID: <Law9-OE40azAGSw5Zha0002b6f8@hotmail.com>

> > Can I use the derived type as the type of an element which is a
> > of an element defined in a base type derived by restriction?
> Sorry, I can't make sense of this -- you can use any type _you_ define
> legally as the type defn of any of your own elements, or as the base
> for other types you define.  All you can't do is use them where the
> original base type (with the 'block' attribute' was expected.

What I have in mind is, using a very simplified declaration:

in schema A:

<schema targetNamespace="nsA" blockDefault="#all" [...] //note the
blockDefault here
<complexType name="Customer">
          <element name="address" type="Address"

<complexType name="Address">


in schema B, importing schema A:

<schema targetNamespace="nsB"
<import [...] location=schemaB/>
<complexType name="MyCustomer">
     <restriction base="nsA:Customer">
             <element name="address" type="MyAddress"  //type restriction

<complexType name="MyAddress">
    <restriction base="nsA:Address">
Received on Monday, 25 August 2003 15:34:26 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:03 UTC