namespace extensions

"[email protected]" <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Message-ID <[email protected]>
Hi,

i'm struggling with the following problem.
I've created an xsl file to transform my xml but need javascript functions to display certain values in a specific way.

Until now I've only tried to view the site using IE6.x (I know I know...)
but I need to be able to get it working in FireFox as well...

Now here's the problem:

I use an extension in xsl to be able to run javascript (namespace extension) :
namespace = xmlns:msxsl="ur:schemas-microsoft-com:xslt" ...

I was wondering ... is there an equivalent that I could use for the Mozilla/FireFox browser??

Let me list an example as I'm using it now:

<xml><dvd title="TestTitle"></xml>

<xsl:stylesheet 
     version="1.0" 
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:msxsl="urn:schemas-microsoft-com:xslt"
     xmlns:xslscript="myJavaScript">

  <msxsl:script language="javascript" implements-prefix="xslscript"> 
    <![CDATA[
      function toUpper(value) {
        return value != null ? value.toUpperCase() : "";
      }
    ]]>
  </msxsl:script>

  <xsl:template match="/">
    <html>
      <body>
        <xsl:value-of select="xslsript:toUpper(string(dvd/@title))"/>
      </body>
    </html>
  </xsl:template>

</xsl:stylesheet>


IE: works fine
FireFox: Error During XSLT transformation: An unknow XPath extension function was called. -> Leaving out the call to the xslscript:toUpper transforms the xml (without the desired functionality)


If reply-ing to this mail, please keep in mind that this is just an example. In the real application, I need to use some serious JavaScript and not just a toUpperCase ;)


So?
Does anybody know how I can fix this?

Thanks in Advance,
Greetz, LeS.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.