Project

Profile

Help

usage of namespace xmlns:java="java"

Added by Anonymous about 17 years ago

Legacy ID: #4379342 Legacy Poster: Serge Emmanuel  (spagop)

Hallo all Saxon guru, I am making some performance enhancement in our project. The transformation in the project was made with XALAN and I have to change XALAN with saxon and then find out how fast is SAXON in comparison to XALAN during the transformation. Now I have a situation with java: extension of XALAN in SAXON. the usage of namespace xmlns:java="java" works fine with the XALAN and I can call usefull methods like lastOfIndex(), new(), toString(), subString(), etc ... But now I want to use this extension with SAXON, but this can not be supported. If somebody know, how I can do to support this namespace "xmlns:java="java" with SAXON oder maybe a compatible solution, that can work at the same time with XALAN and SAXON, that was be great the get this solution. here snapshot: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:java="java" xmlns:js="http://www.mozila.org/rhino" xmlns:lxslt="http://xml.apache.org/xslt" extension-element-prefixes="js" exclude-result-prefixes="java lxslt" version="2.0"> ... <xsl:template name="AnyName"> <xsl:for-each select="./anyThing"> <!-- create String object --> <xsl:variable name="varName" select="java:lang.String.new(@ref)"/> <xsl:variable name="poosition" select="java:lastIndexOf($newRef ,'#')+1" /> <!-- get the name substring --> <xsl:variable name="superName" select="java:substring($superRef, $superPos)" /> .... </xsl:for-each> ... <xsl:stylesheet/> Thanks for advance.


Replies (1)

RE: usage of namespace xmlns:java=&quot;java&quot; - Added by Anonymous about 17 years ago

Legacy ID: #4379471 Legacy Poster: Michael Kay (mhkay)

The exact rules for calling extension functions vary from one processor to another - they are not standardized. The rules for Saxon are given at http://www.saxonica.com/documentation/extensibility/functions.html With Saxon, the namespace you use always identifies the Java class, and the local name of the function identifies the method within that class. Michael Kay Saxonica

    (1-1/1)

    Please register to reply