net.sf.saxon.s9api

Class WhitespaceStrippingPolicy

public class WhitespaceStrippingPolicy extends Enum<WhitespaceStrippingPolicy>

WhitespaceStrippingPolicy is an enumeration class defining the possible policies for handling whitespace text nodes in a source document.
Field Summary
static WhitespaceStrippingPolicyALL
The value ALL indicates that all whitespace-only text nodes are discarded.
static WhitespaceStrippingPolicyIGNORABLE
The value IGNORABLE indicates that whitespace text nodes in element-only content are discarded.
static WhitespaceStrippingPolicyNONE
The value NONE indicates that all whitespace text nodes are retained
static WhitespaceStrippingPolicyUNSPECIFIED
UNSPECIFIED means that no other value has been specifically requested.
static List<WhitespaceStrippingPolicy>VALUES
An immutable list containing the values comprising this enum class in the order they're declared.
Method Summary
List<WhitespaceStrippingPolicy>family()
Returns an immutable list containing the values comprising this enum class in the order they're declared.
static WhitespaceStrippingPolicyvalueOf(String name)
Static factory to return the enum constant pertaining to the given string name.

Field Detail

ALL

public static final WhitespaceStrippingPolicy ALL
The value ALL indicates that all whitespace-only text nodes are discarded.

IGNORABLE

public static final WhitespaceStrippingPolicy IGNORABLE
The value IGNORABLE indicates that whitespace text nodes in element-only content are discarded. Content is element-only if it is defined by a schema or DTD definition that does not allow mixed or PCDATA content.

NONE

public static final WhitespaceStrippingPolicy NONE
The value NONE indicates that all whitespace text nodes are retained

UNSPECIFIED

public static final WhitespaceStrippingPolicy UNSPECIFIED
UNSPECIFIED means that no other value has been specifically requested.

VALUES

public static final List<WhitespaceStrippingPolicy> VALUES
An immutable list containing the values comprising this enum class in the order they're declared. This field may be used to iterate over the constants as follows:
for(WhitespaceStrippingPolicy c : WhitespaceStrippingPolicy.VALUES)
    System.out.println(c);

Method Detail

family

public final List<WhitespaceStrippingPolicy> family()
Returns an immutable list containing the values comprising this enum class in the order they're declared. This instance method simply returns VALUES. Few programmers should have any need to use this method. It is provided for use by sophisticated enum-based data structures to prevent the need for reflective access to VALUES.

Returns: an immutable list containing the values comprising this enum class, in the order they're declared.

valueOf

public static final WhitespaceStrippingPolicy valueOf(String name)
Static factory to return the enum constant pertaining to the given string name. The string must match exactly an identifier used to declare an enum constant in this type.

Throws: IllegalArgumentException if this enum class has no constant with the specified name.