|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.servlet.view.xslt.FormatHelper
public abstract class FormatHelper
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.
AbstractXsltView
Nested Class Summary | |
---|---|
static class |
FormatHelper.XsltFormattingException
Deprecated. Exception thrown in case of formatting failure. |
Constructor Summary | |
---|---|
FormatHelper()
Deprecated. |
Method Summary | |
---|---|
static String |
currency(double amount,
Locale locale)
Deprecated. Format a currency amount in a given locale. |
static String |
currency(double amount,
String language,
String country)
Deprecated. Format a currency amount for a given language and country. |
static Node |
dateTimeElement(long time)
Deprecated. Creates a formatted-date node with system default Locale |
static Node |
dateTimeElement(long time,
Locale locale)
Deprecated. Creates a formatted-date node with the given Locale |
static Node |
dateTimeElement(long time,
String language,
String country)
Deprecated. Creates a formatted-date node with the given ISO language and country strings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FormatHelper()
Method Detail |
---|
public static Node dateTimeElement(long time, String language, String country)
Locale
will be used.
time
- the time in ms since the epoch that should be used to obtain
the formatted datelanguage
- the two character language code required to construct a
java.util.Locale
country
- the two character country code required to construct a
java.util.Locale
public static Node dateTimeElement(long time)
Locale
time
- the time in ms since the epoch that should be used to obtain
the formatted date
public static Node dateTimeElement(long time, Locale locale)
Locale
time
- the time in ms since the epoch that should be used to obtain
the formatted datelocale
- the java.util.Locale
to determine the date formatting
public static String currency(double amount, Locale locale)
amount
- the currency value to formatlocale
- the java.util.Locale
to use to format the amount
String
representing the amountpublic static String currency(double amount, String language, String country)
amount
- the currency value to formatlanguage
- the two character language code required to construct a
java.util.Locale
country
- the two character country code required to construct a
java.util.Locale
String
representing the amount
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |