net.sf.saxon.value
Class Whitespace

java.lang.Object
  extended bynet.sf.saxon.value.Whitespace

public class Whitespace
extends java.lang.Object

This class provides helper methods and constants for handling whitespace


Field Summary
static int COLLAPSE
           
static int PRESERVE
          The values PRESERVE, REPLACE, and COLLAPSE represent the three options for whitespace normalization.
static int REPLACE
           
 
Method Summary
static java.lang.CharSequence applyWhitespaceNormalization(int action, java.lang.CharSequence value)
          Apply schema-defined whitespace normalization to a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRESERVE

public static final int PRESERVE
The values PRESERVE, REPLACE, and COLLAPSE represent the three options for whitespace normalization. They are deliberately chosen in ascending strength order; given a number of whitespace facets, only the strongest needs to be carried out.

See Also:
Constant Field Values

REPLACE

public static final int REPLACE
See Also:
Constant Field Values

COLLAPSE

public static final int COLLAPSE
See Also:
Constant Field Values
Method Detail

applyWhitespaceNormalization

public static java.lang.CharSequence applyWhitespaceNormalization(int action,
                                                                  java.lang.CharSequence value)
Apply schema-defined whitespace normalization to 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