Re: [xsl] most efficient way to get XML source's parent dir path

Subject: Re: [xsl] most efficient way to get XML source's parent dir path
From: Owen Rees <owen.rees@xxxxxx>
Date: Wed, 11 Feb 2009 15:17:33 +0000
--On Wednesday, February 11, 2009 09:40:48 -0500 Robert Koberg wrote:

<xsl:apply-templates select="doc(concat($parent-dir, '/', @ref))/*"/>

There are XPath 2.0 functions specifically provided to do the job.


select="doc(resolve-uri(@ref,base-uri(.)))"

If you want relative references resolved as described in the W3C specifications, use these functions.

Relative reference resolution is not as simple as just replacing whatever follows the last '/'.

--
Owen Rees; speaking personally, and not on behalf of HP.
========================================================
Hewlett-Packard Limited.   Registered No: 690597 England
Registered Office:  Cain Road, Bracknell, Berks RG12 1HN

Current Thread