OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Namespace: what's the correct usage?



----- Original Message -----
From: "Jonathan Borden" <jborden@mediaone.net>
To: "Martin Gudgin" <marting@develop.com>; "Kohsuke KAWAGUCHI"
<kohsukekawaguchi@yahoo.com>; <xml-dev@lists.xml.org>
Sent: Saturday, May 19, 2001 11:41 PM
Subject: RE: Namespace: what's the correct usage?


> Martin Gudgin wrote:
> > [MJG]
> > The piece you are missing is that the default value of
> > elementFormDefault is
> > 'unqualified'
> >
>
> I didn't miss that. What I don't understand is how this value would be
> _different_ for the "person" and "given" element decls given the
definition
> in the rec. i.e. none of the elements should be qualified. that's ok by
me,
> all I am saying is that they should all be in the same namespace (and I am
> considering elements in no namespace to be in the 'same' namespace).

OK, then the piece you're missing is that global element declarations (
those that are children of a schema element ) are in the targetNamespace
regardless of the value of elementFormDefault. Local element declarations
( those that are *not* children of a schema element ) are only in the
targetNamespace if they are themselves annotated with form='qualified' or,
if they do not have a form attribute, the elementFormDefault attribute on
the ancestor schema element has the value 'qualified'

The relevant bits of the spec are in 3.3.2[1]. There are two descriptions of
the {target namespace} property; one for element declarations that have
schema as a parent;

The ·actual value· of the targetNamespace [attribute] of the parent <schema>
element information item, or ·absent· if there is none.

and another for element declarations that are part of complex type
defintions;

If form is present and its ·actual value· is qualified, or if form is absent
and the ·actual value· of elementFormDefault on the <schema> ancestor is
qualified, then the ·actual value· of the targetNamespace [attribute] of the
parent <schema> element information item, or ·absent· if there is none,
otherwise ·absent·.

Regards

Martin

[1] http://www.w3.org/TR/xmlschema-1/#declare-element