Package net.sf.saxon.trans
Class DecimalFormatManager
java.lang.Object
net.sf.saxon.trans.DecimalFormatManager
DecimalFormatManager manages the collection of named and unnamed decimal formats, for use by the
format-number() function.
In XSLT 2.0, there is a single set of decimal formats shared by the whole stylesheet. In XQuery 3.0, however, each query module has its own set of decimal formats, and in XSLT 3.0 decimal formats are local to a package. The DecimalFormatManager to use is therefore linked from the format-number() call on the expression tree.
-
Constructor Summary
ConstructorsConstructorDescriptionDecimalFormatManager
(HostLanguage language, int languageLevel) create a DecimalFormatManager and initialise variables -
Method Summary
Modifier and TypeMethodDescriptionvoid
Check the consistency of all DecimalSymbols objects owned by this DecimalFormatManagerGet the names of all named decimal formats that have been registeredGet the default decimal-format.Get a named decimal-format registered using setNamedDecimalFormatGet a named decimal-format registered using setNamedDecimalFormat if it exists; create it if it does not
-
Constructor Details
-
DecimalFormatManager
create a DecimalFormatManager and initialise variables
-
-
Method Details
-
getDefaultDecimalFormat
Get the default decimal-format.- Returns:
- the default (unnamed) decimal format
-
getNamedDecimalFormat
Get a named decimal-format registered using setNamedDecimalFormat- Parameters:
qName
- The name of the decimal format- Returns:
- the DecimalSymbols object corresponding to the given name, if any or null if not set.
-
obtainNamedDecimalFormat
Get a named decimal-format registered using setNamedDecimalFormat if it exists; create it if it does not- Parameters:
qName
- The name of the decimal format- Returns:
- the DecimalSymbols object corresponding to the given name, if it exists, or a newly created DecimalSymbols object otherwise
-
getDecimalFormatNames
Get the names of all named decimal formats that have been registered- Returns:
- the collection of names
-
checkConsistency
Check the consistency of all DecimalSymbols objects owned by this DecimalFormatManager- Throws:
XPathException
- if any inconsistencies are found
-