public class WhitespaceStrippingPolicy
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static WhitespaceStrippingPolicy |
ALL
The value ALL indicates that all whitespace-only text nodes are discarded.
|
static WhitespaceStrippingPolicy |
IGNORABLE
The value IGNORABLE indicates that whitespace text nodes in element-only content are
discarded.
|
static WhitespaceStrippingPolicy |
NONE
The value NONE indicates that all whitespace text nodes are retained.
|
static WhitespaceStrippingPolicy |
UNSPECIFIED
UNSPECIFIED means that no other value has been specifically requested.
|
Modifier | Constructor and Description |
---|---|
protected |
WhitespaceStrippingPolicy(StylesheetPackage pack)
Create a WhitespaceStrippingPolicy based on the xsl:strip-space and xsl:preserve-space declarations
in a given XSLT stylesheet package
|
Modifier and Type | Method and Description |
---|---|
protected SpaceStrippingRule |
getSpaceStrippingRule() |
static WhitespaceStrippingPolicy |
makeCustomPolicy(Predicate<QName> elementTest)
Create a custom whitespace stripping policy
|
protected FilterFactory |
makeStripper() |
protected int |
ordinal() |
public static final WhitespaceStrippingPolicy NONE
public static final WhitespaceStrippingPolicy IGNORABLE
DocumentBuilder
,
and is equivalent to NONE
otherwise.public static final WhitespaceStrippingPolicy ALL
public static final WhitespaceStrippingPolicy UNSPECIFIED
protected WhitespaceStrippingPolicy(StylesheetPackage pack)
pack
- the stylesheet package containing the xsl:strip-space and xsl:preserve-space declarationspublic static WhitespaceStrippingPolicy makeCustomPolicy(Predicate<QName> elementTest)
elementTest
- a predicate applied to element names, which should return true if whitespace-only
text node children of the element are to be stripped, false if they are to be retained.protected int ordinal()
protected SpaceStrippingRule getSpaceStrippingRule()
protected FilterFactory makeStripper()
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.