You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Artur Lorincz <ar...@kiq.com> on 2002/11/01 10:22:15 UTC

EXSLT math functions

Hello,

I would like to use the "sqrt" EXSLT math function from Xalan. I looked
briefly at some of the xalan sources and I would guess that this function
should be implemented in the ExsltMath.java from "org/apache/xalan/lib".

I am thinking of the following implementation:

public static XObject sqrt(XObject operand)
{
 return new XNumber(Math.sqrt(operand.num());
}

Could you please tell me
 1. If the above implementation is correct?
 2. how can I link this implementation into the xalan's framework, so that I
can use the sqrt function in the stylesheets?

thank you,
Artur L.