[Home] [By Thread] [By Date] [Recent Entries]
Abel Braaksma wrote:
There's an error in what I send above, it should of course be: 1)
2) file:/D:/Workspaces/Eclipse/etc/
3) file:/D:/Workspaces/Eclipse/etc/def/config/test.xmlFrom what I understand from you all is the following (nr have no bearing with the above numbers): 1. If you place xml:base on xsl:stylesheet of your containing stylesheet xslt file, and that base location does NOT have your stylesheet physically, document('') will fail. In this scenario, it is NOT possible to resolve the original XSLT file that the xslt processor was calling. 2. If you place xml:base only on places where needed, you can use a global parameter with static-base-uri() to make sure it will be resolved against the uri of the stylesheet. It will return the stylesheet url. 3. If you do not use xml:base at all, or when it points to a location where your current xslt file is located as well, both document-uri(document('')) and static-base-uri() will return the same result. Not sure I covered all scenarios. I am aware of URIResolver, or using the xslt as a parameter or as source document. I decided, for now, to put the name of the current xslt inside an entity reference. Not the best solution, I know, and it has to be repeated for each stylesheet, but good enough for the moment. Colin, Dimitre, Michael, David, Andrew: thanks for the valuable insights! Cheers, -- Abel Braaksma http://www.nuntia.com
|

Cart



