net.sf.saxon.value
public class Whitespace extends Object
Field Summary | |
---|---|
static int | ALL |
static int | COLLAPSE |
static int | IGNORABLE |
static int | NONE
The values NONE, IGNORABLE, and ALL identify which kinds of whitespace text node
should be stripped when building a source tree |
static int | PRESERVE
The values PRESERVE, REPLACE, and COLLAPSE represent the three options for whitespace
normalization. |
static int | REPLACE |
static int | UNSPECIFIED |
Method Summary | |
---|---|
static CharSequence | applyWhitespaceNormalization(int action, CharSequence value)
Apply schema-defined whitespace normalization to a string |
static boolean | containsWhitespace(CharSequence value)
Determine if a string contains any whitespace |
static boolean | isWhite(CharSequence content)
Determine if a string is all-whitespace
|
static boolean | isWhitespace(int ch)
Test whether a character is whitespace |
static CharSequence | removeAllWhitespace(CharSequence value)
Remove all whitespace characters from a string |
static CharSequence | removeLeadingWhitespace(CharSequence value)
Remove leading whitespace characters from a string |
Parameters: action the action to be applied: one of PRESERVE, REPLACE, or COLLAPSE value the value to be normalized
Returns: the value after normalization
Parameters: content the string to be tested
Returns: true if the supplied string contains no non-whitespace characters