/** * Get a DecimalFormatManager to resolve the names of decimal formats used in calls * to the format-number() function. * * @return the decimal format manager for this static context, or null if named decimal * formats are not supported in this environment. */ public DecimalFormatManager getDecimalFormatManager() { return element.getCompilation().getPrincipalStylesheetModule().getDecimalFormatManager(); }
/** * Get a DecimalFormatManager to resolve the names of decimal formats used in calls * to the format-number() function. * * @return the decimal format manager for this static context, or null if named decimal * formats are not supported in this environment. */ public DecimalFormatManager getDecimalFormatManager() { return element.getCompilation().getPrincipalStylesheetModule().getDecimalFormatManager(); }
/** * Method supplied by declaration elements to add themselves to a stylesheet-level index * * @param decl the Declaration being indexed. (This corresponds to the StyleElement object * except in cases where one module is imported several times with different precedence.) * @param top the outermost XSLStylesheet element */ public void index(ComponentDeclaration decl, PrincipalStylesheetModule top) throws XPathException { prepareAttributes(); DecimalFormatManager dfm = getCompilation().getPrincipalStylesheetModule().getDecimalFormatManager(); if (name == null) { symbols = dfm.getDefaultDecimalFormat(); } else { try { StructuredQName formatName = makeQName(name); symbols = dfm.obtainNamedDecimalFormat(formatName); symbols.setHostLanguage(Configuration.XSLT, 30); } catch (XPathException err) { compileErrorInAttribute("Invalid decimal format name. " + err.getMessage(), "XTSE0020", "name"); } } }
/** * Method supplied by declaration elements to add themselves to a stylesheet-level index * * @param decl the Declaration being indexed. (This corresponds to the StyleElement object * except in cases where one module is imported several times with different precedence.) * @param top the outermost XSLStylesheet element */ public void index(ComponentDeclaration decl, PrincipalStylesheetModule top) throws XPathException { prepareAttributes(); DecimalFormatManager dfm = getCompilation().getPrincipalStylesheetModule().getDecimalFormatManager(); if (name == null) { symbols = dfm.getDefaultDecimalFormat(); } else { try { StructuredQName formatName = makeQName(name); symbols = dfm.obtainNamedDecimalFormat(formatName); symbols.setHostLanguage(Configuration.XSLT, 30); } catch (XPathException err) { compileErrorInAttribute("Invalid decimal format name. " + err.getMessage(), "XTSE0020", "name"); } } }
getDecimalFormatManager().checkConsistency();