public void index(Declaration decl, PrincipalStylesheetModule top) throws XPathException
{
prepareAttributes();
DecimalSymbols d = makeDecimalFormatSymbols();
DecimalFormatManager dfm = getPreparedStylesheet().getDecimalFormatManager();
if (name==null) {
try {
dfm.setDefaultDecimalFormat(d, decl.getPrecedence());
} catch (XPathException err) {
compileError(err.getMessage(), err.getErrorCodeQName());
}
} else {
try {
StructuredQName formatName = makeQName(name);
try {
dfm.setNamedDecimalFormat(formatName, d, decl.getPrecedence());
} catch (XPathException err) {
compileError(err.getMessage(), err.getErrorCodeQName());
}
} catch (XPathException err) {
compileError("Invalid decimal format name. " + err.getMessage(), "XTSE0020");