Re: [xsl] Saxon9, XMLSpy2009, and result-document href=

Subject: Re: [xsl] Saxon9, XMLSpy2009, and result-document href=
From: Jesper Tverskov <jesper.tverskov@xxxxxxxxx>
Date: Wed, 28 Oct 2009 14:29:46 +0100
I often make solutions that work in both AltovaXML and Saxon.

In the following example I load a file as unpassed text, and need to
get hold of the filename. To make a solution that works both in Saxon
and AltovaXML, I do this:

<xsl:variable name="unparsed" select="unparsed-text(document-uri(.))"/>
<!-- The next four varaibles are preparations to make it easier to
modify the name of the output file -->
<xsl:variable name="input-file" select="tokenize(document-uri(.),
<xsl:variable name="input-filename"
select="substring-before($input-file, '.')"/>
<xsl:variable name="input-path"
select="substring-before(document-uri(.), $input-filename)"/>
<xsl:variable name="input-extension"
select="substring-after($input-file, '.')"/>

It is line three that is important. I do this:
to make it work both in Saxon and AltovaXML.

Hope it can be of some help.


Jesper Tverskov

Current Thread