DOM/XSLT & func:script

Discussion in 'XML' started by JEDI_BC, Nov 30, 2004.

  1. JEDI_BC

    JEDI_BC Guest

    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
    JEDI_BC, Nov 30, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CRON
    Replies:
    24
    Views:
    200,462
    Adrienne Boswell
    Jun 20, 2006
  2. Johnny
    Replies:
    3
    Views:
    443
    Robert Kern
    Aug 23, 2005
  3. Hari Sekhon
    Replies:
    0
    Views:
    496
    Hari Sekhon
    Jun 20, 2006
  4. Vinko Vrsalovic

    int func() v/s int func(void)

    Vinko Vrsalovic, Jan 21, 2005, in forum: C Programming
    Replies:
    14
    Views:
    1,287
    Villy Kruse
    Jan 24, 2005
  5. Alex Vinokur
    Replies:
    6
    Views:
    343
    Tor Rustad
    Nov 18, 2006
Loading...

Share This Page