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

Re: Wrapped around the axle: Refining and extending structures across namespaces

From: Jeni Tennison <jeni@jenitennison.com>
Date: Mon, 31 Dec 2001 20:48:22 +0000
Message-ID: <1681337833.20011231204822@jenitennison.com>
To: Mike_Leditschke@nemmco.com.au
CC: xmlschema-dev@w3.org
Hi Mike,

> Now if I derive by extension in ns2 a new type from the above type
> and add two more locally declared elements, and declare a
> <Substitution> element based on this new type and in a substitution
> group with <Head>, but this time use an elementFormDefault of
> unqualified.
> In my instance doc,  would I end up with
> <ns2:Substitution>
>   <ns1:El1/>
>   <ns1:El2/>
>   <ns1:El3/>
>   <El4/>
>   <El4/>
> </ns2:Substitution>

Yes. The initial elements are qualified, so you look at the target
namespace of the schema in which they are declared to work out what
their namespace is (i.e. ns1). The elements that you add with the
extension are unqualified, so not in a namespace.

> Your comment that "form doesn't apply to types" would suggest the
> second and that the creator of the substitution element can subvert
> the intentions of the designer of the original head type in terms of
> qualification style in this case.

Sorry that what I said was confusing - something about your question
made me think you thought types could themselves be qualified or

The namespace for an element depends on its form (attribute or
inherited from elementFormDefault) and the target namespace of the
schema in which it is declared. You cannot change the namespace of an
element in a derived type.



Jeni Tennison
Received on Tuesday, 1 January 2002 04:52:37 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:54 UTC