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


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] targetNamespace and default namespace

On 9/29/2016 11:26 AM, Michael Kay wrote:
On 29 Sep 2016, at 16:07, Thomas Passin<list1@tompassin.net>

I have always understood that the elementFormDefault only applies
to the way that the element names are written*in the schema*;  if
there is a target namespace specified, then all elements defined
in the schema (and not otherwise namespaced or referenced) must
be in that namespace in an instance document, unrelated to the
value of elementFormDefault.

No, that's incorrect. If you specify form="unqualified", or by
implication elementFormDefault="unqualified", which is its default
value, then local element declarations describe elements whose names
are in no namespace.
Ah... I have probably in practice absorbed that bit without noticing ... thanks.

Probably doesn't help Rusty, though.


Chapter and verse: XSD 1.0 part 1 §3.3.2,

Element information items ·validated· by a top-level declaration must
be qualified with the {target namespace} of that declaration (if this
is ·absent·, the item must be unqualified). Control over whether
element information items ·validated· by a local declaration must be
similarly qualified or not is provided by the form [attribute], whose
default is provided by the elementFormDefault [attribute] on the
enclosing <schema>, via its determination of {target namespace}.

which says that if form=unqualified (explicitly or implicitly) the
element information item to be validated must be unqualified, which
is XSD's way of saying it must be in no namespace.

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS