Awesome... meaning xalan ignores the http:// part and works only with the my.own.extension to find the package, right?
Also, I have read in an article<http://www.ibm.com/developerworks/library/x-xalanextensions.html>that XSLT processors should have some optimization on extension functions, assuming these functions should not have any side effect and always return the same value when some parameter is passed. This assumed, the optimization would cache the results of last calls and their parameters, and our functions wouldn't be called as many times we thought them would be called. My questions are: does xalan have this optimization, and, if so, is there any way to "deactivate" it? Thank you very much, Fausto. On Fri, Oct 24, 2008 at 9:20 AM, Christine Li <[EMAIL PROTECTED]> wrote: > > Hi, Fausto > > You can use your own namespace for extension functions. For example, the > following stylesheet should work if you have the > my.own.extension.ExtensionImpl in the correct classpath. > <xsl:stylesheet > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > version="1.0" > xmlns:own="*http://my.own.extension* <http://my.own.extension/>" > exclude-result-prefixes="own"> > <xsl:template match="/"> > <xsl:value-of select="own:ExtensionImpl.new()"/></p> > </xsl:template> > </xsl:stylesheet> > > Christine Li > XML Transformation > IBM Toronto Lab > Tel: (905)413-2601 > Email: [EMAIL PROTECTED] > > > *Fausto <[EMAIL PROTECTED]>* > > 24/10/2008 08:35 AM > To > xalan-j-users@xml.apache.org cc > Subject > Java extensions namespaces > > > > > Hi all, > > I am not sure I did understand well how the extension namespaces works on > xalan-j, because I have not found a way to define my own namespace for the > extentions. > > Like having "*http://my.own.extension* <http://my.own.extension/>" > namespace for the class my.own.extension.ExtensionImpl. > > Only way I have seen to use extensions is having a xalan prefix to * > http://xml.apache.org/xalan/java* > <http://xml.apache.org/xalan/java>namespace, and use > xalan:full.qualified.className.method to access the > extension function, or declare a component for the extension element. > > I hope I'm wrong and I haven't just seen the way of doing that. And I need > the http:// on the namespace. > > Any clues? > > -- > > Obrigado, > Fausto. > -- Obrigado, Fausto.