Re: [xslt] Problems using functions with xsl
- From: "William M. Brack" <wbrack mmm com hk>
- To: "The Gnome XSLT library mailing-list" <xslt gnome org>
- Subject: Re: [xslt] Problems using functions with xsl
- Date: Tue, 9 Nov 2004 00:23:28 +0800 (HKT)
Pedro Rocha said:
> Hi,
>
> I'm having problems using the extention functions with xsl.
>
> I've got the following error messages:
>
> xmlXPathCompOpEval: function testparam not found
> XPath error : Unregistered function
> xmlXPathCompiledEval: evaluation failed
> runtime error: file file:///c%3A/temp/xml/prueba.xsl line 234 element
> value-of
> xsltValueOf: text copy failed
>
> This is the xsl file:
> --------------------------------------------
> <?xml version='1.0'?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:func="http://exslt.org/functions"
> extension-element-prefixes="func"
> version="1.0">
>
> <func:function name="func:testparam">
> <xsl:param name="foo" select="'Test'"/>
> <xsl:param name="bar" select="concat($foo, ' succeeded')"/>
> <func:result select="$bar"/>
> </func:function>
>
> <xsl:template match="/">
> <xsl:value-of select="func:testparam()" />
> </xsl:template>
> </xsl:stylesheet>
> ---------------------------------------------
>
> I had a similar problem when I was trying to use the exslt str functions...
> it was because i didn't call the function exsltRegisterAll();
>
> Any clue?
>
> Thanks,
>
> Pedro
First, I really don't understand your error message - it says there was
trouble on line 234, but your posted stylesheet has less than 20 lines.
Second, when I try your posted stylesheet with the current release of
xsltproc, it seems to work with no problem:
wbrack bbrack work $ xsltproc --version
Using libxml 20615, libxslt 10109 and libexslt 807
xsltproc was compiled against libxml 20615, libxslt 10109 and libexslt 807
libxslt 10109 was compiled against libxml 20615
libexslt 807 was compiled against libxml 20615
wbrack bbrack work $ xsltproc bug.xsl bug.xsl
<?xml version="1.0"?>
Test succeeded
Could you please be more clear on this report?
Thanks,
Bill
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]