Re: [xsl] Installing exslt for Saxon

Subject: Re: [xsl] Installing exslt for Saxon
From: Peter Flynn <peter@xxxxxxxxxxx>
Date: Sun, 28 Feb 2010 20:57:25 +0000
G. Ken Holman wrote:
At 2010-02-28 20:20 +0000, Peter Flynn wrote:
I think I have lost the plot here a little.

I need to use Saxon 9he from the command line under Ubuntu 9.10 for an XSLT 1.0 application which requires exsl:node-set. Saxon itself is working fine, but it's so long since I used it with exslt extensions that I can't remember where I got the code last time -- I looked at http://www.exslt.org but all the downloads seem to be samples and tests: no actual implementation of any functions. What am I missing here?

That EXSLT defines an interface ... the processor itself implements the interface.

That's what I thought, but apparently not...


$ cat peter.xsl
<?xml version="1.0" encoding="US-ASCII"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                xmlns:exslt="http://exslt.org/common";
                exclude-result-prefixes="exslt"
                version="1.0">

<xsl:template match="/">
  <xsl:variable name="x"><a><b/><c/></a></xsl:variable>

  <xsl:copy-of select="exslt:node-set($x)/*/*"/>
</xsl:template>

</xsl:stylesheet>
$ java -jar /usr/local/saxon/saxon9he.jar peter.xsl peter.xsl
Warning: at xsl:stylesheet on line 5 column 31 of peter.xsl:
  Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
Error on line 10 of peter.xsl:
  Cannot find a matching 1-argument function named {http://exslt.org/common}node-set()
Transformation failed: Run-time errors were reported
$

Something is going on here I don't understand.


I'm only running the Saxon 6.5.5 jar file ... nothing else is needed.

It looks from saxon.sourceforge.net that 9HE has dropped the extensions. Of course, if I'd been paying attention and Reading The Fine Documentation I would have seen that before :-)


Back to b9 for the moment...thanks.

///Peter

Current Thread