[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xml-dev] Global or shared namespace?
If it's global it applies to everything, including any namespaces declared.
If it's shared it applies only to the namespaces it's shared with. I guess
that's what you'd call a namespace link (ln -s share andsharealike).
It's a typeof, it's not a typeof, it's a similar typeof (typesof nothing -
null, false, empty, 0).
It's undefined so it's a typeof undefined.
It can be really tough figuring out if something isn't there because it
isn't there to see. You really have to put something there to make the point
that nothing is there. What I don't see is the context. In the outake below
a lack thereof (namespace) can make something undefined. But I think, from
the orignal message by Eric van der List the context is not in code but in
describing it. In code I'd personally prefer to see a null rather than a ""
or a http://notanamespace/. I'll make it "" if I have to show someone it
isn't there because it looks alot better than null on the screen. But
sometimes, just to be clear I might say "The selection you made is invalid."
or "There is no whatever you asked for available." If it's a problem in some
particular context making an explicit declaration as below to ensure no
conflict seems like a good solution.
A problem would problem arise if someone said:
and someone else came along and said
But then someone could just as easily duplicate
by accidentally working at the same location and not reading the code. So if
the namespace is undefined and you define it, then someone else defines it
with the same definition but it means something different....
Or we could do the other extreme and
and give different names to the same thing.
All to make it clear there's nothing there.
What's needed is nice clear definition like the famous:
"If it's not internal, it's external."
by adding the third qualification
"If it's not explicit and it's not implicit, it's undefined."
From the XML Schema spec (3.4):
"The consequence of not declaring a target namespace in a schema is that the
definitions and declarations from that schema, such as USAddress and
purchaseOrder, are referenced without namespace qualification. In other
words there is no explicit namespace prefix applied to the references nor is
there any implicit namespace applied to the reference by default."
"In cases where a schema is designed without a target namespace, it is
strongly recommended that all XML Schema elements and types are explicitly
qualified with a prefix such as xsd: that is associated with the XML Schema
namespace (as in po.xsd). The rationale for this recommendation is that if
XML Schema elements and types are associated with the XML Schema namespace
by default, i.e. without prefixes, then references to XML Schema types may
not be distinguishable from references to user-defined types."
----- Original Message -----
From: "Ronald Bourret" <email@example.com>
Sent: Wednesday, November 28, 2001 6:39 AM
Subject: Re: [xml-dev] Global or shared namespace?
> Michael Kay wrote:
> > Just to add to the terminological morass, XPath 1.0 and XSLT 1.0 refer
> > such elements and attributes as having "an expanded name with a null
> > namespace URI".
> > Whether any distinction was intended between "a name with no namespace
> > and "a name with a null namespace URI", I really don't know!
> If there is, it's a bug.
> -- Ron
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> The list archives are at http://lists.xml.org/archives/xml-dev/
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>