Hi all,

I am trying to implement few XSL extension functions in Java and call them from my XSL template.

I discovered that the ExpressionContext interface is not available and so all the org.apache namespace (there is something like com.sum.org.apache...internal.ExpressionContext but the compiler refuses it).

Also discovered that no matter what the referenced FQCN is, the XSL process always tries to invoke methods in the java.lang.String class.

For example

<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  xmlns:xalan="http://xml.apache.org/xalan";
  xmlns:utils="com.acme.followed.by.this.garbage:@%...@#^#%#$"
  extension-element-prefixes="utils">


Then this one works by calling the java.lang.String.length method !

    <xsl:value-of select="utils:length('fff')" />

Regards,
Adrian.

Reply via email to