W3C home > Mailing lists > Public > www-tag@w3.org > July 2002

Re: On XPointer and the context-independence of URIs

From: Dan Connolly <connolly@w3.org>
Date: 18 Jul 2002 10:33:54 -0500
To: Norman Walsh <Norman.Walsh@Sun.COM>
Cc: www-tag@w3.org
Message-Id: <1027006435.27575.271.camel@dirk>

On Thu, 2002-07-18 at 10:03, Norman Walsh wrote:
> 
> 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().

Right, that's not the whole argument. The point is: the
base URI context dependency is known to everything that
knows about URI references. You can't introduce more
context without teaching all the URI software...
which is pretty much impossible.

You can deploy new sorts of things, like XPath
expressions, that have new forms of context
dependence. But you can't wedge XPaths in
where URI references belong without making
up the difference.


> 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?

They're analagous, but from a perspective of Web Architecture,
they're very different:

Web Architecture is extensible in a number of ways, but
to get off the ground requires that everybody agree on
URI syntax. i.e. we're going to use : to separate
the scheme name from the rest, we're going to use
.. and / ala unix, and such. By some accounts,
The Web *is* the community that has stipulated
to this syntax for global naming (... and which
community further went on to reward folks who
agree to this syntax by connecting it to lots
of useful clients, servers, and such ;-).

One could argue that relative URI syntax is just
sugar and isn't architecturally necessary.
But deployment of relative URI reference
syntax is sunk cost, so there's little point
in that argument. But if you're interested
in the counter-argument, Jim Gettys
provided quite a nice one:
  http://www.w3.org/DesignIssues/ModelConsequences


-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Thursday, 18 July 2002 11:33:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:47:09 GMT