Welcome! Log In Create A New Profile

Advanced

EXSLT func:function not registered for XSLT filter module

Kate F
July 13, 2013 06:22AM
Hi,

I'm trying to use EXSLT's <func:function> with nginx's xslt filter
module. The effect I think I'm seeing is that my functions are
seemingly ignored.

I made a test XSLT stylesheet:

iona% cat xsl/fish.xsl
<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:x="http://xml.elide.org/fish"
xmlns:func="http://exslt.org/functions"

extension-element-prefixes="func">

<func:function name="x:fish">
<func:result select="123"/>
</func:function>

<xsl:output method="text" encoding="utf-8"
media-type="plain/text"/>

<xsl:template match="/">
<xsl:value-of select="x:fish()"/>
<xsl:text>&#10;</xsl:text>
</xsl:template>

</xsl:stylesheet>

iona% xsltproc xsl/fish.xsl vhost/blog.libfsm.org/index.xhtml5
123
iona%

I would expect my <xsl:value-of select="x:fish()"/> there to give the
same result as under xsltproc. But running the same under nginx gives:

xmlXPathCompOpEval: function fish not found
XPath error : Unregistered function
xmlXPathCompiledEval: evaluation failed
runtime error: file /home/kate/svn/www/xsl/fish.xsl line 19 element value-of
XPath evaluation returned no result.

Looking at ngx_http_xslt_filter_module.c I see exsltRegisterAll() is
called, which is what should register libexslt's handler for
func:function and friends:

#if (NGX_HAVE_EXSLT)
exsltRegisterAll();
#endif

I know NGX_HAVE_EXSLT is defined because other EXSLT functions (such
as things in the date: and str: namespaces) work fine.

I'm using nginx 1.4.1, which is linked to the same libexslt as my xsltproc.

Any suggestions, please?

--
Kate

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

EXSLT func:function not registered for XSLT filter module

Kate F July 13, 2013 06:22AM

Re: EXSLT func:function not registered for XSLT filter module

Maxim Dounin July 15, 2013 01:34PM

Re: EXSLT func:function not registered for XSLT filter module

Kate F July 17, 2013 12:20PM

Re: EXSLT func:function not registered for XSLT filter module

Maxim Dounin July 19, 2013 08:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 152
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready