switch (numberType)
{
case 'A' :
if (m_alphaCountTable == null)
{
XResourceBundle thisBundle;
thisBundle =
(XResourceBundle) XResourceBundle.loadResourceBundle(
org.apache.xml.utils.res.XResourceBundle.LANG_BUNDLE_NAME, getLocale(transformer, contextNode));
char[] alphabet;
alphabet = (char[]) thisBundle.getObject(org.apache.xml.utils.res.XResourceBundle.LANG_ALPHABET);
m_alphaCountTable = alphabet;
}
int2alphaCount(listElement, m_alphaCountTable, formattedNumber);
break;
case 'a' :
if (m_alphaCountTable == null)
{
XResourceBundle thisBundle;
thisBundle =
(XResourceBundle) XResourceBundle.loadResourceBundle(
org.apache.xml.utils.res.XResourceBundle.LANG_BUNDLE_NAME, getLocale(transformer, contextNode));
char[] alphabet;
alphabet = (char[]) thisBundle.getObject(org.apache.xml.utils.res.XResourceBundle.LANG_ALPHABET);
m_alphaCountTable = alphabet;
}
FastStringBuffer stringBuf = StringBufferPool.get();
try
{
int2alphaCount(listElement, m_alphaCountTable, stringBuf);
formattedNumber.append(
stringBuf.toString().toLowerCase(
getLocale(transformer, contextNode)));
}
finally
{
StringBufferPool.free(stringBuf);
}
break;
case 'I' :
formattedNumber.append(long2roman(listElement, true));
break;
case 'i' :
formattedNumber.append(
long2roman(listElement, true).toLowerCase(
getLocale(transformer, contextNode)));
break;
case 0x3042 :
{
XResourceBundle thisBundle;
thisBundle = (XResourceBundle) XResourceBundle.loadResourceBundle(
org.apache.xml.utils.res.XResourceBundle.LANG_BUNDLE_NAME, new Locale("ja", "JP", "HA"));
if (letterVal != null
&& letterVal.equals(Constants.ATTRVAL_TRADITIONAL))
formattedNumber.append(tradAlphaCount(listElement, thisBundle));
else //if (m_lettervalue_avt != null && m_lettervalue_avt.equals(Constants.ATTRVAL_ALPHABETIC))
formattedNumber.append(
int2singlealphaCount(
listElement,
(char[]) thisBundle.getObject(org.apache.xml.utils.res.XResourceBundle.LANG_ALPHABET)));
break;
}
case 0x3044 :
{
XResourceBundle thisBundle;
thisBundle = (XResourceBundle) XResourceBundle.loadResourceBundle(
org.apache.xml.utils.res.XResourceBundle.LANG_BUNDLE_NAME, new Locale("ja", "JP", "HI"));
if ((letterVal != null)
&& letterVal.equals(Constants.ATTRVAL_TRADITIONAL))
formattedNumber.append(tradAlphaCount(listElement, thisBundle));
else //if (m_lettervalue_avt != null && m_lettervalue_avt.equals(Constants.ATTRVAL_ALPHABETIC))
formattedNumber.append(
int2singlealphaCount(
listElement,
(char[]) thisBundle.getObject(org.apache.xml.utils.res.XResourceBundle.LANG_ALPHABET)));
break;
}
case 0x30A2 :
{
XResourceBundle thisBundle;
thisBundle = (XResourceBundle) XResourceBundle.loadResourceBundle(
org.apache.xml.utils.res.XResourceBundle.LANG_BUNDLE_NAME, new Locale("ja", "JP", "A"));
if (letterVal != null
&& letterVal.equals(Constants.ATTRVAL_TRADITIONAL))
formattedNumber.append(tradAlphaCount(listElement, thisBundle));
else //if (m_lettervalue_avt != null && m_lettervalue_avt.equals(Constants.ATTRVAL_ALPHABETIC))
formattedNumber.append(
int2singlealphaCount(
listElement,
(char[]) thisBundle.getObject(org.apache.xml.utils.res.XResourceBundle.LANG_ALPHABET)));
break;
}
case 0x30A4 :
{
XResourceBundle thisBundle;
thisBundle = (XResourceBundle) XResourceBundle.loadResourceBundle(
org.apache.xml.utils.res.XResourceBundle.LANG_BUNDLE_NAME, new Locale("ja", "JP", "I"));
if (letterVal != null
&& letterVal.equals(Constants.ATTRVAL_TRADITIONAL))
formattedNumber.append(tradAlphaCount(listElement, thisBundle));
else //if (m_lettervalue_avt != null && m_lettervalue_avt.equals(Constants.ATTRVAL_ALPHABETIC))
formattedNumber.append(
int2singlealphaCount(
listElement,
(char[]) thisBundle.getObject(org.apache.xml.utils.res.XResourceBundle.LANG_ALPHABET)));
break;
}
case 0x4E00 :
{
XResourceBundle thisBundle;
thisBundle = (XResourceBundle) XResourceBundle.loadResourceBundle(
org.apache.xml.utils.res.XResourceBundle.LANG_BUNDLE_NAME, new Locale("zh", "CN"));
if (letterVal != null
&& letterVal.equals(Constants.ATTRVAL_TRADITIONAL))
{
formattedNumber.append(tradAlphaCount(listElement, thisBundle));
}
else //if (m_lettervalue_avt != null && m_lettervalue_avt.equals(Constants.ATTRVAL_ALPHABETIC))
int2alphaCount(listElement,
(char[]) thisBundle.getObject(org.apache.xml.utils.res.XResourceBundle.LANG_ALPHABET),
formattedNumber);
break;
}
case 0x58F9 :
{
XResourceBundle thisBundle;
thisBundle = (XResourceBundle) XResourceBundle.loadResourceBundle(
org.apache.xml.utils.res.XResourceBundle.LANG_BUNDLE_NAME, new Locale("zh", "TW"));
if (letterVal != null
&& letterVal.equals(Constants.ATTRVAL_TRADITIONAL))
formattedNumber.append(tradAlphaCount(listElement, thisBundle));
else //if (m_lettervalue_avt != null && m_lettervalue_avt.equals(Constants.ATTRVAL_ALPHABETIC))
int2alphaCount(listElement,
(char[]) thisBundle.getObject(org.apache.xml.utils.res.XResourceBundle.LANG_ALPHABET),
formattedNumber);
break;
}
case 0x0E51 :
{
XResourceBundle thisBundle;
thisBundle = (XResourceBundle) XResourceBundle.loadResourceBundle(
org.apache.xml.utils.res.XResourceBundle.LANG_BUNDLE_NAME, new Locale("th", ""));
if (letterVal != null
&& letterVal.equals(Constants.ATTRVAL_TRADITIONAL))
formattedNumber.append(tradAlphaCount(listElement, thisBundle));
else //if (m_lettervalue_avt != null && m_lettervalue_avt.equals(Constants.ATTRVAL_ALPHABETIC))
int2alphaCount(listElement,
(char[]) thisBundle.getObject(org.apache.xml.utils.res.XResourceBundle.LANG_ALPHABET),
formattedNumber);
break;
}
case 0x05D0 :
{
XResourceBundle thisBundle;
thisBundle = (XResourceBundle) XResourceBundle.loadResourceBundle(
org.apache.xml.utils.res.XResourceBundle.LANG_BUNDLE_NAME, new Locale("he", ""));
if (letterVal != null
&& letterVal.equals(Constants.ATTRVAL_TRADITIONAL))
formattedNumber.append(tradAlphaCount(listElement, thisBundle));
else //if (m_lettervalue_avt != null && m_lettervalue_avt.equals(Constants.ATTRVAL_ALPHABETIC))
int2alphaCount(listElement,
(char[]) thisBundle.getObject(org.apache.xml.utils.res.XResourceBundle.LANG_ALPHABET),
formattedNumber);
break;
}
case 0x10D0 :
{
XResourceBundle thisBundle;
thisBundle = (XResourceBundle) XResourceBundle.loadResourceBundle(
org.apache.xml.utils.res.XResourceBundle.LANG_BUNDLE_NAME, new Locale("ka", ""));
if (letterVal != null
&& letterVal.equals(Constants.ATTRVAL_TRADITIONAL))
formattedNumber.append(tradAlphaCount(listElement, thisBundle));
else //if (m_lettervalue_avt != null && m_lettervalue_avt.equals(Constants.ATTRVAL_ALPHABETIC))
int2alphaCount(listElement,
(char[]) thisBundle.getObject(org.apache.xml.utils.res.XResourceBundle.LANG_ALPHABET),
formattedNumber);
break;
}
case 0x03B1 :
{
XResourceBundle thisBundle;
thisBundle = (XResourceBundle) XResourceBundle.loadResourceBundle(
org.apache.xml.utils.res.XResourceBundle.LANG_BUNDLE_NAME, new Locale("el", ""));
if (letterVal != null
&& letterVal.equals(Constants.ATTRVAL_TRADITIONAL))
formattedNumber.append(tradAlphaCount(listElement, thisBundle));
else //if (m_lettervalue_avt != null && m_lettervalue_avt.equals(Constants.ATTRVAL_ALPHABETIC))
int2alphaCount(listElement,
(char[]) thisBundle.getObject(org.apache.xml.utils.res.XResourceBundle.LANG_ALPHABET),
formattedNumber);
break;
}
case 0x0430 :
{
XResourceBundle thisBundle;
thisBundle = (XResourceBundle) XResourceBundle.loadResourceBundle(
org.apache.xml.utils.res.XResourceBundle.LANG_BUNDLE_NAME, new Locale("cy", ""));
if (letterVal != null
&& letterVal.equals(Constants.ATTRVAL_TRADITIONAL))
formattedNumber.append(tradAlphaCount(listElement, thisBundle));
else //if (m_lettervalue_avt != null && m_lettervalue_avt.equals(Constants.ATTRVAL_ALPHABETIC))
int2alphaCount(listElement,
(char[]) thisBundle.getObject(org.apache.xml.utils.res.XResourceBundle.LANG_ALPHABET),
formattedNumber);
break;
}
default : // "1"