DOM/XSLT & func:script

JEDI_BC

Usenet Archive
Joined
Nov 30, 2004
Messages
1
Reaction score
0
hi,

I try hardly to use javascript functions in my XSL (exslt.org) using DOM/XSL (libxslt). It works on sablotron but it is too slow and cost too much cpu.

I am up to date on my software versions (under PHP):

domxml
DOM/XML enabled
DOM/XML API Version 20020815
libxml Version 20615
HTML Support enabled
XPath Support enabled
XPointer Support enabled
DOM/XSLT enabled
libxslt Version 1.1.12
libxslt compiled against libxml Version 2.6.15
DOM/EXSLT enabled
libexslt Version 0.8.3

Here an example :

XSL file :
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" >
<xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:func="http://exslt.org/functions" xmlns:gru="http://gru.fr/namespace" extension-element-prefixes="func" exclude-result-prefixes="gru"> <func:script implements-prefix="gru" language="javascript"> function foo { return "bar"; } </func:script> <xsl:template match="*"> <xsl:value-of select="gru:foo"/> </xsl:template> </xsl:stylesheet>

XML file :
<?xml version="1.0" encoding="ISO-8859-1"?>
<FOO>
<TOTO>plop</TOTO>
</FOO>

Xsltproc.exe give me these errors :
xmlXPathCompOpEval: function foo not found
XPath error : Unregistered function
xmlXPathCompiledEval: evaluation failed
runtime error: file gru.xsl line 19 element value-of
xsltValueOf: text copy failed
no result for gru.xml

any idea ?

Thanks

JEDI_BC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,208
Messages
3,104,802
Members
249,594
Latest member
henrywalsh

Latest Threads

Top