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

On Sat, 26 Aug 2006, Dan Connolly wrote:

>
> On Sat, 2006-08-26 at 11:19 -0400, Chimezie Ogbuji wrote:
> [...]
>> 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.
>
> I would love to do that. Please explain how. Please tell me exactly
> what I put in my XSLT transformation in order to get the URI of
> the source document.

What I normally do is use an empty relative URI.  For example, 
often when I want to transform XML to RDF and want to include in the 
RDF/XML, a statement about the source document, I do something like:

<xsl:template match='/'>
   <rdf:RDF>
     <owl:Ontology rdf:about=''>
       <rdf:label>This document is an OWL ontology</rdf:label>
     </owl:Ontology>
   </rdf:RDF>
</xsl:template>

Ofcourse, this sort of relies on the assumption that it's bad form to not 
give an explicit base URI in the source document but expect it to 
be something other than the URI of the source document.

> As far as I know, that information is not available to XSLT 
> transformations in any standard way. So it seems worthwhile standardize 
> a sort of kludge to make it available.

Sigh, yeah, and actually there have been proposals [1] to include this in EXSLT 1.0 - which is an indication that 
it really needs to be (or needed to be) a core mechanism of XSLT 1.0

>
> Perhaps an extension function is more elegant than a parameter,
> but I don't know how much trouble it is in practice.

The problem with an extension function is that you then become dependent 
on the processor implementation.  So, I guess I'm curious as to what 
scenarios demonstrate a need to resolve a URI fragment against a 
base other than the one 'assigned' by the initial XML processing (which has explicit rules to follow)?

[1] http://lists.fourthought.com/pipermail/exslt/2006-March/001417.html

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 20:48:02 UTC