| net.sf.saxon.functions.SystemFunction net.sf.saxon.functions.FormatNumber2
FormatNumber2 | public class FormatNumber2 extends SystemFunction implements XSLTFunction(Code) | | XSLT 2.0 implementation of format-number() function - removes the dependence on the JDK.
|
adjustToDecimal | public static BigDecimal adjustToDecimal(double value, int precision)(Code) | | Convert a double to a BigDecimal. In general there will be several BigDecimal values that
are equal to the supplied value, and the one we want to choose is the one with fewest non-zero
digits. The algorithm used is rather pragmatic: look for a string of zeroes or nines, try rounding
the number down or up as approriate, then convert the adjusted value to a double to see if it's
equal to the original: if not, use the original value unchanged.
Parameters: value - the double to be converted Parameters: precision - 2 for a double, 1 for a float the result of conversion to a double |
fixup | public void fixup(DecimalSymbols dfs)(Code) | | Fixup: this is a callback from the DecimalFormatManager used once the xsl:decimal-format
element is identified
|
preEvaluate | public Expression preEvaluate(StaticContext env) throws XPathException(Code) | | preEvaluate: this method suppresses compile-time evaluation by doing nothing.
We can't evaluate early because we don't have access to the DecimalFormatManager.
|
Fields inherited from net.sf.saxon.functions.SystemFunction | protected int operation(Code)(Java Doc)
|
|
|