xsl-list
[Top] [All Lists]

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

2009-02-11 09:41:17

On Feb 11, 2009, at 4:51 AM, Owen Rees wrote:

--On Tuesday, February 10, 2009 11:53:24 -0500 Robert Koberg wrote:

I want to get the path to the parent directory of the XML used as the
source in a transformation.

Even if an absolute URI is known for the document supplied as the source, the concept of 'parent directory' is not necessarily well defined with respect to that URI.

What are you expecting to be able to do with the string you are generating?

I want to resolve references to other documents the are relative to the source XML. E.g.

<div>
  <p>blah</p>
  <include ref="blah.xml"/>
</div>
...
match="include"
<xsl:apply-templates select="doc(concat($parent-dir, '/', @ref))/*"/>

What do you see as the problem?

-Rob

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--