Getting the stylesheet directory from within the XSL file- for configureable xml location

Tags: xslt xslt-2.0

I have a xsl file for an xml. The location of the the xml files should be configurable (that's done by configuring the href path to stylesheet in the xml) but the xsl is using some images and some othe javaScript files and need to hav teh path to them. The path is right near the stylesheet file so once I can get the xsl directory I can ge to them. for example: in my xml I have:?xml-stylesheet type="text/xsl" href=".\Files\Style\test.xsl"> I want from within the xsl to point to ".\Files\Style" for the images' location Hoe can I do this


Here is an XSLT 1.0 solution (XSLT 2.0 has much more powerful features for string processing, such as regular expressions):

This video can help you solving your question :)
By: admin