xsl-list
[Top] [All Lists]

RE: [xsl] Can an xsl file know it's own name dynamically?

2009-12-03 10:22:43

Can an XSL file know it's own name dynamically?


In XSLT 2.0 the function call static-base-uri() should give you a good
approximation.

Reservations are:

(a) the base URI might not be the same as the document URI if there are
xml:base attributes or if multiple XML entities are used

(b) it all depends on the user invoking the transformation in such a way
that the document URI is known - for example in JAXP if the stylesheet input
is supplied as a StreamSource wrapping an InputStream with no SystemId set,
then there's no chance.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 


--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>