%20 characters in //xsl:result-document/@href
Posted: Fri Jul 28, 2006 11:25 am
I have a multiple-include master stylesheet with a bunch of xsl:result-document instructions writing a set of xml files to a basepath specified in a global variable.
<xsl:variable name="BASEPATH" select="'file:/C:/Dokumente%20und Einstellungen/myName/Eigene%20Dateien/myHTMLOutput'"/>
The out href for the xsl:result-document statement is later calculated in a local variable select inside a for-each loop, eg
<xsl:for-each select="/pages">
<xsl:variable name="myHref" as="xs:string" select="concat($BASEPATH,'/',@ID,'.html')"/>
<xsl:result-document href="{$myHref}" method="html">
[...]
</xsl:result-document>
</xsl:for-each>
The transformation from Oxygen 7.2. (selection: Saxon 8B) works only if $BASEPATH doesn't contain any space chars (%20). When I run the xslt debugger for the scenario, however, the output is as expected. The transformation also works, if I invoke [OxygenDir]/lib/Saxon8.jar from the commandline.
<xsl:variable name="BASEPATH" select="'file:/C:/Dokumente%20und Einstellungen/myName/Eigene%20Dateien/myHTMLOutput'"/>
The out href for the xsl:result-document statement is later calculated in a local variable select inside a for-each loop, eg
<xsl:for-each select="/pages">
<xsl:variable name="myHref" as="xs:string" select="concat($BASEPATH,'/',@ID,'.html')"/>
<xsl:result-document href="{$myHref}" method="html">
[...]
</xsl:result-document>
</xsl:for-each>
The transformation from Oxygen 7.2. (selection: Saxon 8B) works only if $BASEPATH doesn't contain any space chars (%20). When I run the xslt debugger for the scenario, however, the output is as expected. The transformation also works, if I invoke [OxygenDir]/lib/Saxon8.jar from the commandline.