public class FormatNumber2 extends SystemFunction implements XSLTFunction
operationargumentlocationId, staticPropertiesEVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD| Constructor and Description |
|---|
FormatNumber2() |
| Modifier and Type | Method and Description |
|---|---|
static java.math.BigDecimal |
adjustToDecimal(double value,
int precision)
Convert a double to a BigDecimal.
|
void |
checkArguments(StaticContext env)
Method called during static type checking
|
java.lang.String |
evaluateAsString(XPathContext context)
Evaluate in a context where a string is wanted
|
Item |
evaluateItem(XPathContext c)
Evaluate in a general context
|
void |
fixup(DecimalSymbols dfs)
Fixup: this is a callback from the DecimalFormatManager used once the xsl:decimal-format
element is identified
|
Expression |
preEvaluate(StaticContext env)
preEvaluate: this method suppresses compile-time evaluation by doing nothing.
|
addContextDocumentArgument, computeCardinality, computeSpecialProperties, display, getDetails, getErrorCodeForTypeErrors, getItemType, getRequiredType, main, makeSystemFunction, setDetails, useContextItemAsDefaultcheckArgumentCount, getArguments, getDisplayName, getFunctionNameCode, getNumberOfArguments, iterateSubExpressions, optimize, promote, replaceSubExpression, setArguments, setFunctionNameCode, simplify, simplifyArguments, typeCheckadoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, getCardinality, getColumnNumber, getConstructType, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getInstructionInfo, getIntrinsicDependencies, getLineNumber, getLocationId, getLocationProvider, getParentExpression, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasBadParentPointer, iterate, markTailFunctionCalls, process, resetStaticProperties, setLocationId, setParentExpression, setParentExpression, suppressValidation, typeErrorpublic void checkArguments(StaticContext env) throws XPathException
SystemFunctioncheckArguments in class SystemFunctionXPathExceptionpublic void fixup(DecimalSymbols dfs)
public Expression preEvaluate(StaticContext env) throws XPathException
preEvaluate in class FunctionCallXPathExceptionpublic java.lang.String evaluateAsString(XPathContext context) throws XPathException
evaluateAsString in interface ExpressionevaluateAsString in class ComputedExpressioncontext - The context in which the expression is to be evaluatedXPathException - if any dynamic error occurs evaluating the
expressionpublic Item evaluateItem(XPathContext c) throws XPathException
evaluateItem in interface ExpressionevaluateItem in class ComputedExpressionc - The context in which the expression is to be evaluatedXPathException - if any dynamic error occurs evaluating the
expressionpublic static java.math.BigDecimal adjustToDecimal(double value,
int precision)
value - the double to be convertedprecision - 2 for a double, 1 for a float