|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.isogen.saxoni18n.Saxoni18nService
Binds the relevant methods of the generic I18nService class to the Saxon's extension function API to provide a set of XSLT extension functions. These functions provide support for both static ("generated") text management and index configuration and collation management. These functions can be used independently. By default, the index configuration and static text database files are in a directory called "config/" under the directory specified in the com.innodata.i18n.home Java system variable. The default configuration files are:
Field Summary | |
static I18nService |
i18nServer
|
Constructor Summary | |
Saxoni18nService()
|
Method Summary | |
static java.lang.String |
constructTargetRelativePath(java.lang.String origPathStr,
java.lang.String targetBasePathStr)
|
static java.lang.String |
escapeUnicodeString(java.lang.String inStr)
|
static java.lang.String |
getAbsolutePath(java.lang.String basePath,
java.lang.String relativePath)
|
static java.lang.String |
getAttributeTranslation(SingletonNodeSet sns,
java.lang.String attname)
Returns translated presentation value for the specified attribute of the specified element. |
static java.lang.String |
getBaseName(java.lang.String inPath)
Returns the filename part of a file path, with no extension |
static java.util.Comparator |
getComparatorForLanguageCode(java.lang.String langCode)
Given an language code, returns a Comparator for that language. |
java.lang.Class |
getExtensionClass(java.lang.String localname)
Called by Saxon's extention element mechanism to request classes for extension elements. |
static java.lang.String |
getFileDir(java.lang.String filePath)
|
static java.lang.String |
getFilename(java.lang.String inPath)
Returns the filename part of a file path. |
static java.lang.String |
getGeneratedTextAfter(SingletonNodeSet sns)
Returns the text-after generated text for the element, if any. |
static java.lang.String |
getGeneratedTextBefore(SingletonNodeSet sns,
java.lang.String langCode)
Returns the text-before generated text for the element, if any. |
static java.lang.String |
getGeneratedTextForKeyAfter(java.lang.String key,
java.lang.String langCode)
Returns the text-before generated text for an arbitrary key, if any. |
static java.lang.String |
getGeneratedTextForKeyBefore(java.lang.String key,
java.lang.String langCode)
Returns the text-before generated text for an arbitrary key, if any. |
static java.lang.String |
getIndexGroupKey(java.lang.String langCode,
java.lang.String indexEntry)
Given an element with PCData content, returns the index group key string it should be grouped with. |
static java.lang.String |
getIndexGroupLabel(java.lang.String langCode,
java.lang.String groupKey)
Given the string key for an index group, returns the display label for that group. |
static java.lang.String |
getIndexGroupSortKey(java.lang.String langCode,
java.lang.String groupKey)
|
static java.lang.String |
getIndexRulesFileName()
Returns the filename used to load the index rules. |
static java.lang.String |
getParaGeneratedTextAfter(SingletonNodeSet sns)
Returns the text-after generated text for para elements. |
static java.lang.String |
getParaGeneratedTextBefore(SingletonNodeSet sns)
Returns the text-before generated text for para elements. |
static java.lang.String |
getRelativePath(java.lang.String filePath,
java.lang.String targetPath)
Returns the relative from targetPath to filePath. |
static java.lang.String |
getStaticTextDatabaseFileName()
Returns the filename used to load the static text database. |
static java.lang.String |
getTimeStamp()
Returns the current system date and time as a string. |
static java.lang.String |
getUrlPart(java.lang.String inUrl,
java.lang.String partName)
|
static java.lang.String |
getVersionAndRelease()
|
static void |
main(java.lang.String[] args)
|
static java.lang.String |
printIndexConfiguration(java.lang.String langCode)
|
static java.lang.String |
printIndexConfiguration(java.lang.String langCode,
boolean includeCollationRules)
|
static java.lang.String |
printStaticTextDatabase()
|
static boolean |
urlHasProtocol(java.lang.String inUrl)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static I18nService i18nServer
Constructor Detail |
public Saxoni18nService() throws javax.xml.transform.TransformerConfigurationException
Method Detail |
public java.lang.Class getExtensionClass(java.lang.String localname)
public static java.lang.String getGeneratedTextBefore(SingletonNodeSet sns, java.lang.String langCode) throws XPathException
sns
- Singleton Node Set, i.e., as provided by the "." expression.
XPathException
public static java.lang.String getGeneratedTextForKeyBefore(java.lang.String key, java.lang.String langCode) throws XPathException
key
- The string key to look up in the static text database.
XPathException
public static java.lang.String getGeneratedTextForKeyAfter(java.lang.String key, java.lang.String langCode) throws XPathException
key
- The string key to look up in the static text database.
XPathException
public static java.lang.String getParaGeneratedTextBefore(SingletonNodeSet sns) throws XPathException
XPathException
public static java.lang.String getGeneratedTextAfter(SingletonNodeSet sns) throws XPathException
sns
- Singleton Node Set, i.e., as provided by the "." expression.
XPathException
public static java.lang.String getParaGeneratedTextAfter(SingletonNodeSet sns) throws XPathException
XPathException
public static java.lang.String getAttributeTranslation(SingletonNodeSet sns, java.lang.String attname) throws XPathException
XPathException
public static java.lang.String getIndexGroupKey(java.lang.String langCode, java.lang.String indexEntry) throws XPathException
langCode
- Language code for the index configuration to use.indexEntry
- Index entry value to the get the group key for.
XPathException
public static java.lang.String getIndexGroupSortKey(java.lang.String langCode, java.lang.String groupKey) throws XPathException
XPathException
public static java.lang.String getIndexGroupLabel(java.lang.String langCode, java.lang.String groupKey) throws XPathException
XPathException
public static java.lang.String printStaticTextDatabase() throws XPathException
XPathException
public static java.lang.String printIndexConfiguration(java.lang.String langCode, boolean includeCollationRules) throws XPathException
XPathException
public static java.lang.String printIndexConfiguration(java.lang.String langCode) throws XPathException
XPathException
public static java.lang.String getFileDir(java.lang.String filePath)
public static java.lang.String getUrlPart(java.lang.String inUrl, java.lang.String partName) throws XPathException
XPathException
public static boolean urlHasProtocol(java.lang.String inUrl) throws XPathException
XPathException
public static java.lang.String escapeUnicodeString(java.lang.String inStr) throws XPathException
XPathException
public static java.lang.String constructTargetRelativePath(java.lang.String origPathStr, java.lang.String targetBasePathStr) throws XPathException
XPathException
public static java.lang.String getFilename(java.lang.String inPath) throws XPathException
inPath
-
XPathException
public static java.lang.String getBaseName(java.lang.String inPath) throws XPathException
inPath
-
XPathException
public static java.lang.String getTimeStamp()
public static java.lang.String getRelativePath(java.lang.String filePath, java.lang.String targetPath)
filePath
- The path the result is relative to. Must be an absolute path.targetPath
- The path the result is derived from. Must be an absolute path,
otherwise it is returned immediately.
public static java.lang.String getAbsolutePath(java.lang.String basePath, java.lang.String relativePath)
public static void main(java.lang.String[] args)
public static java.util.Comparator getComparatorForLanguageCode(java.lang.String langCode)
langCode
- language code, consisting of ISO 639 two-letter language
code and, optionally, an ISO 3166 country code, separated by a hyphen ("-"),
e.g., "ar", "zh-TW".
public static java.lang.String getVersionAndRelease()
public static java.lang.String getStaticTextDatabaseFileName()
public static java.lang.String getIndexRulesFileName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |