[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Referring to stylesheet itself, possible in XSLT 1.0,

Subject: Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Tue, 17 Oct 2006 01:58:32 +0200
 Referring to stylesheet itself
Hi List,

I want to retrieve the name of the xslt file that is currently processing something for purposes of logging and tracing.

In XSLT 1.0 you could do document('') to retrieve the xslt stylesheet document itself, and as a result you could do some funny things transforming oneself. In XSLT 2.0, there is resolve-uri() and document-uri(), the second of which takes a document or node as reference, but it is not possible to use document('') (with empty string) to refer to the current xslt file, it will throw an error. Is there a way to get the current xslt file with XSLT 2.0?

Suppose there is a way, will that method be interfered by a possible xml:base on the xsl:stylesheet element? With XSLT 1.0, it has the effect that document('') tries to find a (?) document at the level of the xml:base attribute.

Any ideas are welcome. Thanks in advance.

Cheers,
-- Abel Braaksma
  http://www.nuntia.com

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.