But base-uri($node) doesn't return the base URI of the stylesheet, it
returns the base URI of the specified node (which in common cases will
be the the URI of the document containing that node).
To get the base URI of the current stylesheet module (or more strictly,
the base URI of the current expression in the stylesheet), use the
static-base-uri() function. (Different parts of a stylesheet module can
have different base URIs if you use xml:base, or if parts of the
stylesheet are contained in external entities).
There's no way to determine the base URI of the "currently executing
main stylesheet" unless you put a global variable in the principal
stylesheet module and bind it to static-base-uri() (and avoid using
xml:base or external entities, and ensure that the API via which the
stylesheet is loaded actually preserves the URI information...)
Michael Kay
Saxonica
On 28/06/2012 10:12, Abel Braaksma wrote:
Hi Andrew,
The current dir of the currently executing stylesheet. Every
xsl:function is contained in a stylesheet and the currently executing
main stylesheet is also known, so theoretically this "context" should
(could) be available.
Abel
On 28-6-2012 11:07, Andrew Welch wrote:
Hi Abel,
The reaon I ask is that I'd like to be able to find the current
dir from places where there is no context.
What current dir are you looking for when there is no context?
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--