[
Lists Home |
Date Index |
Thread Index
]
----- Original Message -----
From: "Richard Tobin" <richard@cogsci.ed.ac.uk>
>
> >But it isn't just syntactic minimization. Named namespaces and default
> >namespaces are not they same.
>
> The default namespace isn't *unnamed*. The name of a namespace is
> its namespace URI. A default namespace is just one that you're using
> without a prefix in this document.
Sorry... namespaces identified by a prefix and default namespace (which does
not have a prefix) are not the same.
> > They have different semantics.
>
> Using the default namespace mechanism to refer to a namespace does not
> change the semantics of that namespace. The only difference is that
> there's one thing you can't do with no-prefix that you can do with a
> prefix, viz put an attribute in the namespace.
Two things. You also cannot use elements that do not belong to a namespace
as long as a default namespace is defined.
> <bar xmlns="http://example.org" xmlns:foo="http://example.org"
foo:att="1">
>
> The element bar and the attribute foo:att are in the same namespace,
> which happens to be the default namespace. There aren't two
> namespaces that could have different semantics, there's only one.
> There are two different *syntaxes*.
That's not what I meant. I am saying that
<bar xmlns="http://example.org" att="1">
and
<bar xmlns:foo="http://example.org" foo:att="1">
are not the same. Both lines employ the use of namespaces, but they result
in the overall XML having different semantics.
> If you're taking an old document - or set of documents - and giving it
> a namespace, you can usually choose not to require the attributes to
> be in a namespace, so using no prefix will be fine.
>
> To re-iterate what's been said several times before: whether
>
> <foo:bar att="123">
> and
> <foo:bar foo:att="123">
>
> are equivalent (and whether either is illegal) is a matter for the
> application. It's something you as an author have to *choose* when
> converting a non-namespaced vocabulary to use namespaces. If you
> choose to allow or require namespaced attributes, you won't be able
> to use the default namespace exclusively.
Which gets back into what Simon was saying (I think)...
Okay, I am backing down from this thread. I obviously view namespaces
differently that you and David (and probably many others). Something tells
me we could go on until we are each blue in the face and still be no more in
agreement than we are now. :)
---
Seairth Jacobs
seairth@seairth.com
|