Page 1 of 1

Extension Functions

Posted: Fri Jul 13, 2012 3:36 pm
by BillMoo
Hi,

I have an XSLT that uses:

Code: Select all

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xalan="http://xml.apache.org/xslt"
xmlns:myNS="xalan://moo.utilities.SysInfo"
exclude-result-prefixes="xs myNS xalan" >
<xsl:output method="xml" indent="yes" xml:space="default" encoding="UTF-8" />
<xsl:param name="lastDateUsed" />
<xsl:variable name="System" select="myNS:new($lastDateUsed)" />
However, when I try to make use of it using Saxon EE:

Code: Select all

<status build='{myNS:getBuild($System)}'/>
I get an error saying :
Cannot find a matching 1-argument function named {xalan://moo.utilities.SysInfo}getBuild()

or using Saxon 6.5.5 I get :

The URI xalan://moo.utilities.SysInfo does not identify an external Java class

The weird thing is this worked three weeks ago, but since then I've upgraded to oXygen 14 and moved my XSL and XML files to their own directories. So I tried moving the jar file in to my XML dir, the XSL dir but nothing works anymore!

As this worked before I am now quite confused. Is anyone able to help me?

--
Bill

Re: Extension Functions

Posted: Tue Jul 17, 2012 6:12 pm
by adrian
Hi,

Considering the namespace, that's probably a Xalan extension. So I'd try to use the Xalan transformer instead of Saxon EE or Saxon 6.5.5.

Regards,
Adrian