Re: [xsl] XSL performance question: running count of attributes using axes and sum()

Subject: Re: [xsl] XSL performance question: running count of attributes using axes and sum()
From: Michael Ludwig <milu71@xxxxxx>
Date: Thu, 9 Apr 2009 23:35:13 +0200
mark bordelon schrieb am 09.04.2009 um 14:14:19 (-0700):
> 
> Lieber Michael,

:-)

> Anyway, this line is causing an error in Altova Spy:
> 
> <xsl:variable name="sums" select="exsl:node-set($sums-rtf)"/>
>
> "File Untitled4.xsl: XSL transformation failed Error in XPath
> expression: Unknown function - Name and number of arguments do
> not match any function signature in the static context -
> 'http://exslt.org/common:node-set'
> 
> Kannst Du mir bitte verklaeren, was ich woll falsch gemacht hab' ;-)

Lieber Mark,

it looks like the processor you're using with Altova doesn't
support the EXSLT node-set() function. I don't know if Altova
has a processor of their own, or if they use MSXML or Xalan or
whatever. The node-set() function is an indispensable add-on for
XSLT 1.0, because it is needed to convert the not very useful
so-called "result tree fragments" (or RTF) to full-fledged useful
node-sets, on which you can use the axes, which you can't on an
RTF, which only allows xsl:value-of and xsl:copy-of.

There is msxsl:node-set() for MSXML, xalan:nodeset() for Xalan,
exsl:node-set() for processor supporting EXSLT. You need to map
the prefix to the correct URI in any case. Should be solvable by
doing a web search. See also:

Support for the msxsl:node-set() Function
http://msdn.microsoft.com/en-us/library/hz88kef0(VS.71).aspx

xalan:nodeset()
http://xml.apache.org/xalan-j/extensionslib.html#nodeset

exsl:node-set()
http://exslt.org/exsl/functions/node-set/index.html

Michael Ludwig

Current Thread