Namespace Prefix should be Purely Convienience

Jim Amsden jamsden at us.ibm.com
Wed Sep 9 20:35:39 BST 1998


Response below in <jra> elements.





owner-xml-dev at ic.ac.uk on 09/09/98 02:05:30 PM
Please respond to mct at foyt.indyrad.iupui.edu
To: xml-dev at ic.ac.uk
cc:
Subject: Namespace Prefix should be Purely Convienience



Jim Amsden <jamsden at us.ibm.com>


jm> The semantics should be on the local name and the namespace name
jm> with the prefix being a notional convenience

I agree.  The prefix should be "purely notational convenience."
Which makes me say: "Give us a way to write element tags with namespaces
but bypassing the prefix."

So, instead of

 xmlns:FOO="someUniqueString"
<FOO:DATE>

we could just write
<"someUniqueString":FOO>
....
<jra>
This generally wouldn't be convenient as the namespace name might be long as
well as contain characters that are not valid in a tag name. The prefix is OK
as long as it doesn't mean anything. Note that it's a little strange for an
attribute to define something about the element tag name. That is, the prefix
is always used before it is defined. Perhaps the attribute should specify the
namespaces for the content of the element, not the element itself. The document
root doesn't need a namespace because when used in that context, there can be
only one instance.
</jra>

and be done with the problem of prefix collisions!

I wish Namespaces didn't try to be so helpful!

jm> Note that I'm not implying that tag names are the concatenation of the
jm> namespace name and the local part of the tag name as specified by
jm> WebDAV semantics, only that two elements with the same namespace name
jm> and local name are treated as the same element type.

If you say
 "two elements with the same namespace name
        and local name are treated as the same element type.",

isn't this saying that, operationally, the "effective ELEMENT tag name"
is the concatenation of the namespace string and the local tag name?
<jra>
Yes, that's probably true in most cases, and is the WebDAV convention (an
application dependent interpretation of namesapces in order to eliminate
ambiguity). However, a client application could use the constituent parts of
the name in any way it wanted and apply some additional semantics. Like
checking to see if the local name is in the namespace, verifying the namespace
exists in some context, etc. Some of these semantics would be handled by the
DTD anyway though. For example, checking that the namespace scopes a local name
is the same thing as ensuring the element is defined in a DTD and is redundant.
</jra>



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)





xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list