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