java.lang.Object
org.apache.xalan.xslt.NumeratorFormatter
- class NumeratorFormatter
- extends java.lang.Object
Converts enumerated numbers into strings, using the XSL conversion attributes.
Having this in a class helps avoid being forced to extract the attributes repeatedly.
|
Constructor Summary |
(package private) |
NumeratorFormatter(org.w3c.dom.Element xslNumberElement,
XSLTEngineImpl 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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_xslNumberElement
protected org.w3c.dom.Element m_xslNumberElement
m_formatTokenizer
NumeratorFormatter.NumberFormatStringTokenizer m_formatTokenizer
m_locale
java.util.Locale m_locale
m_formatter
java.text.NumberFormat m_formatter
m_processor
XSLTEngineImpl m_processor
m_romanConvertTable
private static final DecimalToRoman[] m_romanConvertTable
- Table to help in converting decimals to roman numerals.
- See Also:
XSLTEngineImpl#DecimalToRoman,
XSLTEngineImpl#long2roman
m_alphaCountTable
private static final char[] m_alphaCountTable
- Chars for converting integers into alpha counts.
- See Also:
XSLTEngineImpl#int2alphaCount
NumeratorFormatter
NumeratorFormatter(org.w3c.dom.Element xslNumberElement,
XSLTEngineImpl 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.
processAttributes
void processAttributes(org.w3c.dom.Node contextNode)
throws XSLProcessorException,
java.net.MalformedURLException,
java.io.FileNotFoundException,
java.io.IOException
- Process the attributes of the node with number formatting
attributes. I'd like to
do this at construction time, but I have to do it every
time because the elements may have attribute templates embedded
in them, and so must be processed only when the node is
actually called.
TODO: Can I just do NumeratorFormatter.processAttributes up front now?
int2alphaCount
protected java.lang.String int2alphaCount(int val,
char[] table)
- Convert a long integer into alphabetic counting, in other words
count using the sequence A B C ... Z AA AB AC.... etc.
long2roman
java.lang.String long2roman(long val,
boolean prefixesAreOK)
- Convert a long integer into roman numerals.