| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Xalan extension functions to provide date and currency formatting beyond the capabilities of XSLT 1.0 or 1.1.
Note that all extension functions are static. These extension functions must be declared to use this class.
Based on an example by Taylor Cowan.
| Inner Class Summary | |
public static class | FormatHelper.XsltFormattingException XsltFormattingException |
| Method Summary | |
static String | currency(double amount, Locale locale)Format a currency amount in a given locale. |
static String | currency(double amount, String language, String country)Format a currency amount for a given language and country. |
static Node | dateTimeElement(long time, String language, String country)Creates a formatted-date node with the given ISO language and country strings. |
static Node | dateTimeElement(long time)Creates a formatted-date node with system default Locale |
static Node | dateTimeElement(long time, Locale locale)Creates a formatted-date node with the given Locale |
| Method Detail |
public static String currency(double amount, Locale locale)
java.util.Locale to use to format the amountString representing the amountpublic static String currency(double amount, String language, String country)
java.util.Localejava.util.LocaleString representing the amountpublic static Node dateTimeElement(long time, String language, String country)
Locale will be used.java.util.Localejava.util.Localepublic static Node dateTimeElement(long time)
Localepublic static Node dateTimeElement(long time, Locale locale)
Localejava.util.Locale to determine the date formatting
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||