Fw: Namespaces

Oren Ben-Kiki oren at capella.co.il
Wed Feb 3 08:58:12 GMT 1999


Don Park <donpark at quake.net> wrote:
>I would like to recommend that we use James' document as the start of the
>"XML Namespaces FAQ" and build on it.  The question is not "can we
>understand it?" but "can my customers understand it?".

Excellent notion. While we are at it, here's a question which seems to be at
the heart of the issue and which, alas, James didn't address: global
attributes.

Andrew Laymen has made a pretty good case that they simply don't exist.
However most of the wrangling about namespaces seem to refer as to how they
are handled. If Andrew is wrong, I'd like to know why. If he's right, what
is the
debate about?

I note that this contradicts a sample which was not challenged by anyone:

<x xmlns:n1="http://www.w3.org"
     xmlns="http://www.w3.org" >
    <good a="1"     b="2" />
    <good a="1"     n1:a="2" />
  </x>

would have the equivalent (extended) Clark encoding
(http://www.jclark.com/xml/xmlns.htm)

<{http://www.w3.org}x xmlns:n1="http://www.w3.org"
                      xmlns="http://www.w3.org" >
    <{http://www.w3.org}good {{http://wwww.w3.org}good}a="1"
                             {{http://wwww.w3.org}good}b="2" />
    <{http://www.w3.org}good {{http://wwww.w3.org}good}a="1"
                             {http://www.w3.org}a="2" >
  </{http://www.w3.org}x>

>From reading Andrew's post I presumed it would be converted to:

<{http://www.w3.org}x xmlns:n1="http://www.w3.org"
                      xmlns="http://www.w3.org" >
    <{http://www.w3.org}good {{http://wwww.w3.org}good}a="1"
                             {{http://wwww.w3.org}good}b="2" />
    <{http://www.w3.org}good {{http://wwww.w3.org}good}a="1"

{{{http://www.w3.org}good}http://www.w3.org}a="2" >
  </{http://www.w3.org}x>

On what is the previous interpretation based? If the second one is correct,
wouldn't it solve all the issues? Take Mark's example of multiple use of
'id'. It would become immediately clear that the XSL pattern:

*/attribute(id)

Would match:

*/attribute({<any-element>}id)

While the pattern:

*/attribute(db:id)

Would match

*/attribute({{<any-element>}<db-namespace-uri}id)

This seems to neatly resolve the issue.

Of course, I could be talking utter nonsense here. That's why I'd appreciate
an addition to James' document which would clear this up.

Share & Enjoy,

    Oren Ben-Kiki



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