Re: On GRDDL and XML Documents [#issue-base-param]

On Fri, 25 Aug 2006, Dan Connolly wrote:

> Oh?!? you mean XSLT _does_ have a feature for this built in?
> Let me re-read this http://www.w3.org/TR/xslt#base-uri ... no...
> darn. That just says "Every node also has an associated URI called its
> base URI" but it doesn't tell me how to get at the dang thing.
> What a tease. ;-)

Well, it does actually. It says 'the base URI of the document node is the 
URI of the document entity'.

The XML base spec is pretty specific about how this is determined.  Before 
reading that particular section I had always 'assumed' that it was 
bad form to have relative URI w/out an xml:base or where the Base URI wasn't 
expected to be the URI of the document itself (which would coincide with 
the location it was loaded from).

The explicit order of the rules for determining the base URI puts any 
mechanism where the base URI is specified 'by the context of the 
application' at the bottom:

    1. The base URI is embedded in the document's content.
    2. The base URI is that of the encapsulating entity (message, document, or none).
    3. The base URI is the URI used to retrieve the entity.
    4. The base URI is defined by the context of the application.

> If the source document explicitly gives its own base (using xml:base
> or <base href="...">) then life is simple. But what about documents
> that don't? How are GRDDL transformations written in XSLT to deal
> with relative URI references in such documents, if not with
> a base/Source parameter?

Following the rules for determining a base URI, I would think the GRDDL 
transformations should use the URI of the source document first *before* 
having one specified within the XSLT.

Chimezie Ogbuji
Lead Systems Analyst
Thoracic and Cardiovascular Surgery
Cleveland Clinic Foundation
9500 Euclid Avenue/ W26
Cleveland, Ohio 44195
Office: (216)444-8593
ogbujic@ccf.org

Received on Saturday, 26 August 2006 15:19:45 UTC