Re: [xslt] exslt functions problem
- From: Graham Seaman <graham seul org>
- To: xslt gnome org
- Subject: Re: [xslt] exslt functions problem
- Date: Mon, 25 Feb 2002 17:09:41 -0500 (EST)
Hi Heiko,
On Mon, 25 Feb 2002, Heiko W. Rupp wrote:
> Graham Seaman wrote:
>
> > which is otherwise perfectly well behaved with XSLT (and works ok with
> > http://exslt.org/common) I get the error message:
> >
> > Failed to register module data: http://exslt.org/functions
>
> Could it be, that Apache is not loading the exslt Library (libexslt)?
> What does the Apache error log say here?
>
No, that isn't the problem: exsl:object-type() and exsl:node-set()
work fine from Apache, so I assume it must be finding the libraries. And
Apache accepts:
xmlns:exsl="http://exslt.org/common"
without complaining at all; it only complains about:
xmlns:func="http://exslt.org/functions"
The sequence of error messages I get in the Apache error log is:
Failed to register module data: http://exslt.org/functions
xmlXPathCompOpEval: function testfunc not found
Error xpath.c:9306: Unregistered function
My libexslt is version 0.7.4;
/usr/include/libexslt/exslt.h includes the line:
#define EXSLT_FUNCTIONS_NAMESPACE ((const xmlChar *)
"http://exslt.org/functions")
>
I've appended the test file I'm using below (when run from the command
line this generates:
Input type was: RTF;
changed to: node-set;
passed through func: node-set
I asumme it's me doing something silly; but just to reassure me, are
other people out there using libexslt/XML::LibXSLT/Apache?
Thanks
Graham
----------------------------------------------------
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:exsl="http://exslt.org/common"
xmlns:func="http://exslt.org/functions"
extension-element-prefixes="exsl func"
exclude-result-prefixes="exsl func"
>
<xsl:variable name="tree">
<a>
<b>
<c>
<d />
</c>
</b>
</a>
</xsl:variable>
<func:function name="func:testfunc">
<xsl:param name="tree"/>
<func:result select="exsl:object-type(exsl:node-set($tree))"/>
</func:function>
<xsl:template match="/">
<xsl:call-template name="test"/>
</xsl:template>
<xsl:template name="test">
Input type was: <xsl:value-of select="exsl:object-type($tree)" />;
changed to: <xsl:value-of select="exsl:object-type(exsl:node-set($tree))" />;
passed through func: <xsl:variable name="my-type" select="func:testfunc($tree)"/>
<xsl:value-of select="$my-type"/>
</xsl:template>
</xsl:stylesheet>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]