public class CharacterMap
extends java.lang.Object
Constructor and Description |
---|
CharacterMap(java.lang.Iterable<CharacterMap> list)
Create a CharacterMap that combines a set of existing character maps.
|
CharacterMap(StructuredQName name,
IntHashMap<java.lang.String> map)
Create a CharacterMap from a raw map of integers to strings
|
Modifier and Type | Method and Description |
---|---|
void |
export(ExpressionPresenter out)
Write the character map to an export file
|
StructuredQName |
getName()
Get the name of the character map
|
java.lang.CharSequence |
map(java.lang.CharSequence in,
boolean insertNulls)
Expand all the characters in a string using this character mapping
|
public CharacterMap(StructuredQName name, IntHashMap<java.lang.String> map)
map
- the mapping of integer Unicode character codes to strings. This must not be subsequently changed.public CharacterMap(java.lang.Iterable<CharacterMap> list)
list
- the list of existing character maps. If the same character
is mapped by more than one map in the list, the last mapping takes
precedencepublic StructuredQName getName()
public java.lang.CharSequence map(java.lang.CharSequence in, boolean insertNulls)
in
- the input string to be mappedinsertNulls
- true if null (0) characters are to be inserted before
and after replacement characters. This is done to signal
that output escaping of these characters is disabled. The flag is set to true when writing
XML or HTML, but to false when writing TEXT.public void export(ExpressionPresenter out)
out
- the output destinationCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.