Re: [xsl] should document-uri work like this?

Subject: Re: [xsl] should document-uri work like this?
From: Fred Christian <fredc@xxxxxxxxxxxxxx>
Date: Mon, 3 Jan 2011 12:34:33 -0800
(Michael wrote)
> in which case the answer is to use
> document($relative, /)
> or
> doc(resolve-uri($relative, base-uri(/)))

Awesome thanks. I think I had tried one of those. Knowing what should
work was a great encouragement to keep reading and trying. I
simplified the xslt and discovered I was in the context of a variable
holding intermediate XML instead of the actual source XML which kept
base-uri(/) from working as show in your example.

Using this concept solved my problem and I set $baseuri at the top as a global.
 doc(resolve-uri($relative, $baseuri))

Also I was out of my office where my (your) XSLT book was, so I was
struggling while learning this new set of functions.

> ... suggestions that you want to resolve it relative to the
> base output URI. I can't think of a reason why...

I am merging new content into existing content which has XML
available, so my output file paths could be used to find input files.
In my case I have made a separate program to put the base new input
xml file in the same place as the output so I was able to use either.

Thanks again,
Fred

Current Thread