Subject: Re: [xsl] 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 13:44:30 +0200 |
I understand, but it really just said "Transformation failed". Without any descriptive error, warning or whatever.That's a bit puzzling. Calling document() with a URI that doesn't exist is a
recoverable error.
This output: ------------ <?xml version="1.0" encoding="UTF-8"?> 1) file:/D:/Workspaces/Eclipse/etc/def/config/test.xslt 2) file:/D:/Workspaces/Eclipse/ect/def/config/test.xslt 3) file:/D:/Workspaces/Eclipse/etc/def/config/test.xml
With this stylesheet: --------------------- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xml:base="../.."> <xsl:template match="/"> 1) <xsl:value-of select="document-uri(document(''))"></xsl:value-of> 2) <xsl:value-of select="static-base-uri()"></xsl:value-of> 3) <xsl:value-of select="base-uri(.)"></xsl:value-of> </xsl:template> </xsl:stylesheet>
Try putting xml:base at the level of the stylesheet where you need it, e.g. on a template rule, and have a global variable
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Referring to stylesheet i, Abel Braaksma | Thread | Re: [xsl] Referring to stylesheet i, Abel Braaksma |
Re: [xsl] [XSLT 2.0] Checking that , bryan rasmussen | Date | RE: [xsl] [XSLT 2.0] Checking that , Michael Kay |
Month |