Re: [xsl] unparsed-text-available a file from the current OS directory

Subject: Re: [xsl] unparsed-text-available a file from the current OS directory
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Sun, 29 Aug 2010 21:37:40 +0100
if I use
<xsl:result-document href="boum.txt"> ...,

By default, boum.txt seems to get written to the "current" OS directory,

Actually, a relative URI reference here is resolved against the "base output URI", that is, against the URI of the principal result document. That might happen to be your OS current directory, or it might not.
but if I do
<xsl:if test="unparsed-text-available('boum.txt')"> ...
boum.txt seems to get resolved from the base-uri (e.g. the stylesheet directory path).


How can I have boum.text resolved from the current OS directory?

You'll either need to pass in the name of the current directory as a stylesheet parameter, or you'll need to use some kind of processor-specific mechanism. For example, in Saxon you could write an UnparsedTextURIResolver.

Michael Kay
Saxonica

Current Thread