W3C home > Mailing lists > Public > xml-uri@w3.org > May 2000

Rules for absolutizing: was Re: Are *relative* URIs as namespace nemes considered harmful?

From: Jonathan Borden <jborden@mediaone.net>
Date: Tue, 16 May 2000 14:06:45 -0400
Message-ID: <05f801bfbf61$7f562c30$0a2e249b@Synapse>
To: <xml-uri@w3.org>
John Cowan wrote:

> Please explain the problem.  Every relative URI reference can be
> into an (absolute) URI plus a fragment-id, using a purely syntactic
> no Web lookup required.

    Agreed. This is a critical point.
> In other words, the namespace name "http://www.w3c.org/2000/foobar" can be
> declared as "xmlns:foobar='foobar'" from a document located at
> "http://www.w3.org/2000/demo.xml".
> The transformation from "foobar" to "http://www.w3c.org/2000/foobar" is
> syntactic and rule-bound, assuming that you know where the document was
> fetched from in the first place.

    I suppose the real question is what rules ought be applied to transform
a relative uri into an absolute uri:

a) ought the parent element's namespace be used as the base uri?
b) or rather does one consider the document *location* uri the base uri?

With (a)  the absolute uri does not depend on where the document was fetched


<this:root xmlns:root="http://www.wherever.org">
    <that:sub xmlns:sub="foo">
        <bar:whatever xmlns:bar="bar">
            <another:baz xmlns:another="../foo" />

 is equivalent to:

<this:root xmlns:root="http://www.wherever.org">
    <that:sub xmlns:sub="http://www.wherever.org/foo">
        <bar:whatever xmlns:bar="http://www.wherever.org/foo/bar">
            <that:baz />


> So you write your application in terms of namespace names which are
> URIs, possibly with fragment-ids as well, and you depend on absolutizing
> to match with namespace declarations that are relative URI references.

We need to properly define the process of absolutizing.

Jonathan Borden
Received on Tuesday, 16 May 2000 14:14:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:13:58 UTC