W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2001

Re: Unanswered Questions - targetNamespace and form attributes

From: Jeff Rafter <jeffrafter@definedweb.com>
Date: Fri, 11 May 2001 10:38:14 -0700
Message-ID: <014c01c0da41$285b37d0$f181fea9@lazarus>
To: "Ian Stokes-Rees" <ijs@decisionsoft.com>
Cc: <xmlschema-dev@w3.org>
Ian,

I am going to attempt to answer but may be wrong--

> I have been reflecting on this comment with respect to the
> "form" attribute.  Is it true that anything with form="unqualified"
> (whether from an explicit form attribute or inherrited from the
> xxxxxFormDefault attribute on the schema element)
> is being defined into the null namespace rather than into the target
> namespace of the schema?

If by null you are indicating an absent namespace, yes.

> If this is the case, then is it correct to say that a single schema
> document may define elements and attributes into the null namespace,
> the target namespace of the schema document, or both?

Yes, essentially this is how attributes work in the general case.  They
commonly do not qualify their namespace though are still subject to
validation by a schema which declares them as unqualified attributes.
Essentially this is what the language of the structures document is driving
at wrt to symbol spaces.  Elements may work this way as well.

> Finally, for globally declared elements and attributes there is no
> concept of "form" since they can only be defined into the target
namespace,
> although that target namespace may be the null namespace.  Similarly,
> globally declared types and groups can only ever be defined into the
> target namespace.

I think that this is correct (but remember I am on a wing and a prayer here)
based on my reading of the primer samples (3.1, 3.2) however it seems
strange
to me.  It is necessary for documents which define multiple namespaces as
the
validation tool/person needs to know when a new namespace is starting--
however
in documents which use only one namespace it seems as though it should be
allowed-- of course the current solution is probably best-- that is after
all the whole
point of namespace aware validation I suppose.  The structures document does
specify this when defining the schema component details for attributes and
elements.
It delineates between global elements and local elements-- noting that the
only
difference is targetNamespace and scope handling.  Ultimately, yes [1].

[1] http://www.w3.org/TR/xmlschema-1/#declare-element (first Element
declaration section referring to global elements)

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

Regards,
Jeff Rafter
Defined Systems
http://www.defined.net
XML Development and Developer Web Hosting
Received on Friday, 11 May 2001 13:38:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:20 GMT