|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xalan.transformer.NumeratorFormatter
Converts enumerated numbers into strings, using the XSL conversion attributes. Having this in a class helps avoid being forced to extract the attributes repeatedly.
Nested Class Summary | |
(package private) class |
NumeratorFormatter.NumberFormatStringTokenizer
This class returns tokens using non-alphanumberic characters as delimiters. |
Field Summary | |
private static char[] |
m_alphaCountTable
Chars for converting integers into alpha counts. |
(package private) NumberFormat |
m_formatter
An instance of a NumberFormat |
(package private) NumeratorFormatter.NumberFormatStringTokenizer |
m_formatTokenizer
An instance of a Tokenizer |
(package private) Locale |
m_locale
Locale we need to format in |
(package private) TransformerImpl |
m_processor
An instance of a transformer |
private static DecimalToRoman[] |
m_romanConvertTable
Table to help in converting decimals to roman numerals. |
protected org.w3c.dom.Element |
m_xslNumberElement
The owning xsl:number element. |
Constructor Summary | |
(package private) |
NumeratorFormatter(org.w3c.dom.Element xslNumberElement,
TransformerImpl processor)
Construct a NumeratorFormatter using an element that contains XSL number conversion attributes - format, letter-value, xml:lang, digit-group-sep, n-digits-per-group, and sequence-src. |
Method Summary | |
protected String |
int2alphaCount(int val,
char[] table)
Convert a long integer into alphabetic counting, in other words count using the sequence A B C ... |
(package private) String |
long2roman(long val,
boolean prefixesAreOK)
Convert a long integer into roman numerals. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.w3c.dom.Element m_xslNumberElement
NumeratorFormatter.NumberFormatStringTokenizer m_formatTokenizer
Locale m_locale
NumberFormat m_formatter
TransformerImpl m_processor
private static final DecimalToRoman[] m_romanConvertTable
DecimalToRoman
private static final char[] m_alphaCountTable
TransformerImpl#int2alphaCount
Constructor Detail |
NumeratorFormatter(org.w3c.dom.Element xslNumberElement, TransformerImpl processor)
xslNumberElement
- The given xsl:number elementprocessor
- a non-null transformer instanceMethod Detail |
protected String int2alphaCount(int val, char[] table)
val
- Value to convert -- must be greater than zero.table
- a table containing one character for each digit in the radix
Note that the radix of the conversion is inferred from the size
of the table.
String long2roman(long val, boolean prefixesAreOK)
val
- Value to convert.prefixesAreOK
- true_ to enable prefix notation (e.g. 4 = "IV"),
false_ to disable prefix notation (e.g. 4 = "IIII").
DecimalToRoman
,
m_romanConvertTable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |