in src/xalanc/XPath/XPathExecutionContextDefault.cpp [646:702]
void XPathExecutionContextDefault::doFormatNumber(
double number,
const XalanDOMString& /* pattern */,
const XalanDecimalFormatSymbols* theDFS,
XalanDOMString& theResult,
const XalanNode* context,
const Locator* locator)
{
if (DoubleSupport::isNaN(number) == true)
{
if (theDFS != 0)
{
theResult = theDFS->getNaN();
}
else
{
NumberToDOMString(number, theResult);
}
}
else if (DoubleSupport::isNegativeInfinity(number) == true)
{
if (theDFS != 0)
{
theResult = theDFS->getMinusSign();
theResult += theDFS->getInfinity();
}
else
{
NumberToDOMString(number, theResult);
}
}
else if (DoubleSupport::isPositiveInfinity(number) == true )
{
if (theDFS != 0)
{
theResult = theDFS->getInfinity();
}
else
{
NumberToDOMString(number, theResult);
}
}
else
{
const GetCachedString theGuard(*this);
warn(
XalanMessageLoader::getMessage(
theGuard.get(),
XalanMessages::FunctionIsNotImplemented_1Param,
"format-number()"),
context,
locator);
NumberToDOMString(number,theResult);
}
}