- From: Alain Andrieux <aa_vrac@hotmail.com>
- Date: Mon, 25 Aug 2003 09:44:57 -0700
- Cc: <xmlschema-dev@w3.org>
> > Can I use the derived type as the type of an element which is a restriction > > 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"> <sequence> <element name="address" type="Address" </sequence> </complexType> <complexType name="Address"> [...] </complexType> </schema> in schema B, importing schema A: <schema targetNamespace="nsB" <import [...] location=schemaB/> <complexType name="MyCustomer"> <restriction base="nsA:Customer"> <sequence> <element name="address" type="MyAddress" //type restriction </sequence> </restriction> </complexType> <complexType name="MyAddress"> <restriction base="nsA:Address"> [...] <restriction> </complexType> </schema>
Received on Monday, 25 August 2003 15:34:26 UTC