Package net.sf.saxon.serialize.codenorm
Class Normalizer
java.lang.Object
net.sf.saxon.serialize.codenorm.Normalizer
Implements Unicode Normalization Forms C, D, KC, KD.
Copyright (c) 1991-2005 Unicode, Inc.
For terms of use, see http://www.unicode.org/terms_of_use.html
For documentation, see UAX#15.
The Unicode Consortium makes no expressed or implied warranty of any kind, and assumes no liability for errors or omissions. No liability is assumed for incidental and consequential damages in connection with or arising out of the use of the information here.
The Unicode Consortium makes no expressed or implied warranty of any kind, and assumes no liability for errors or omissions. No liability is assumed for incidental and consequential damages in connection with or arising out of the use of the information here.
- Author:
- Mark Davis Updates for supplementary code points: Vladimir Weinstein & Markus Scherer Modified to remove dependency on ICU code: Michael Kay
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Normalization Form Selector(package private) static final int
Masks for the form selector(package private) static final int
Masks for the form selectorstatic final int
Normalization Form Selectorstatic final int
Normalization Form Selectorstatic final int
Normalization Form Selectorstatic final int
Normalization Form Selector -
Method Summary
Modifier and TypeMethodDescriptionstatic Normalizer
make
(int form, Configuration config) Create a normalizer for a given form: static synchronized factory methodnormalize
(CharSequence source) Normalizes text according to the chosen form
-
Field Details
-
COMPATIBILITY_MASK
static final int COMPATIBILITY_MASKMasks for the form selector- See Also:
-
COMPOSITION_MASK
static final int COMPOSITION_MASKMasks for the form selector- See Also:
-
D
public static final int DNormalization Form Selector- See Also:
-
C
public static final int CNormalization Form Selector- See Also:
-
KD
public static final int KDNormalization Form Selector- See Also:
-
KC
public static final int KCNormalization Form Selector- See Also:
-
NO_ACTION
public static final int NO_ACTIONNormalization Form Selector- See Also:
-
-
Method Details
-
make
Create a normalizer for a given form: static synchronized factory method- Parameters:
form
- the normalization form required: for exampleC
,D
config
- the Saxon configuration- Throws:
XPathException
- if normalization fails
-
normalize
Normalizes text according to the chosen form- Parameters:
source
- the original text, unnormalized- Returns:
- target the resulting normalized text
-