On XPointer and the context-independence of URIs

In the course of discussing the QName finding, at the 15 July telcon,
I brought up the issue of requiring xmlns() in XPointer. The
requirement was greeted with immediate support on the basis of the
context-independence of URIs.

That is, an XPointer of this form:

  <x:p>
    <x:a href="#xpointer(//x:div[3])">the third div</x:a>
  </x:p>

was deemed inappropriate because it relied on in-scope namespace
declarations to determine the fully qualified name of x:div.

The "correct" XPointer by this reasoning is:

  <x:p>
    <x:a href="#xmlns(x=http://www.w3.org/1999/xhtml)
                xpointer(//x:div[3])">the third div</x:a>
  </x:p>

There's no question that the latter is context-independent and the
former is not, but I really think the requirement that all XPointers
have the latter form is going to hamper adoption of XPointer.

We already have context-dependent URIs in pointers:

  <a href="../chap2/index.html">Chapter Two</a>

so I don't see how context-independence by itself is an unassailable
argument for requiring xmlns(). Transforming a relative URI reference
into an absolute URI reference requires some understanding of the
current context (the base URI) and transforming a URI reference that
contains undeclared QNames into an absolute URI reference requires
some understanding of the current context (the in-scope namespaces).
Both transformations are unambiguous and amenable to automation.

How are these two cases not equivalent?

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@Sun.COM    | Decide, v.i. To succumb to the preponderance
XML Standards Architect | of one set of influences over another
Sun Microsystems, Inc.  | set.--Ambrose Bierce

Received on Thursday, 18 July 2002 11:03:24 UTC