### Saxon.Api

- BinaryResource
- CatalogCollection
- DirectoryCollection
- DocumentBuilder
- DomDestination
- DynamicContext
- DynamicError
- EmptyEnumerator<T>
- ErrorReporter
- ErrorReporterToStaticError
- ErrorReporterWrapper
- ExtensionFunction
- ExtensionFunctionCall
- ExtensionFunctionDefinition
- Feature<T>
- FeatureKeys
- HostLanguage
- ICollectionFinder
- IErrorReporter
- IInvalidityHandler
- IMessageListener
- IMessageListener2
- InvalidityHandlerWrapper
- IPredicate<in XdmItem>
- IQueryResolver
- IResource
- IResourceCollection
- IResourceFactory
- IResultDocumentHandler
- IXmlLocation
- JarCollection
- NamespaceConstant
- NullDestination
- Predicate<T>
- Predicates
- Processor
- QName
- RawDestination
- RecoveryPolicy
- Resource
- ResourceCollection
- SchemaManager
- SchemaResolver
- SchemaValidationMode
- SchemaValidator
- Serializer
- StandardCollectionFinder
- StandardLogger
- StaticContext
- StaticError
- Step<TInput, TResult>
- Steps
- TextWriterDestination
- TreeModel
- URIQueryParameters
- ValidationFailure
- WhitespacePolicy
- XdmAnyArrayType
- XdmAnyFunctionType
- XdmAnyItemType
- XdmAnyMapType
- XdmAnyNodeType
- XdmArray
- XdmAtomicType
- XdmAtomicValue
- XdmAxis
- XdmDestination
  - - TreeProtector
- XdmEmptySequence
- XdmExternalObjectValue
- XdmFunctionItem
- XdmItem
- XdmItemType
- XdmMap
- XdmNode
- XdmNodeKind
- XdmSequenceType
- XdmValue
- XmlDestination
- XmlProcessingError
- XmlResource
- XPathCompiler
- XPathExecutable
- XPathSelector
- XQueryCompiler
- XQueryEvaluator
- XQueryExecutable
- Xslt30Transformer
- XsltCompiler
- XsltExecutable
  - - ParameterDetails
- XsltPackage
- XsltTransformer

### Saxon.Api

# Class WhitespacePolicy

public class WhitespacePolicy

`WhitespacePolicy` is a class defining the possible policies for handling whitespace text nodes in a source document.

Please note that since Saxon 9.7.0.8 this class has been refactored from the enumeration type with the same name and therefore will work as before.

### Field Summary
static WhitespacePolicy | PreserveAll No whitespace is stripped
static WhitespacePolicy | StripAll All whitespace text nodes are stripped
static WhitespacePolicy | StripIgnorable Whitespace text nodes appearing in element-only content are stripped
static WhitespacePolicy | Unspecified Unspecified means that no other value has been specifically requested

### Method Summary
static WhitespacePolicy | makeCustomPolicy(Predicate<QName> elementTest) Deprecated This method has been replaced by MakeCustomPolicy.
static WhitespacePolicy | MakeCustomPolicy(Predicate<QName> elementTest) Create a custom whitespace stripping policy

## Field Detail

### PreserveAll

public static WhitespacePolicy PreserveAll

No whitespace is stripped

### StripAll

public static WhitespacePolicy StripAll

All whitespace text nodes are stripped

### StripIgnorable

public static WhitespacePolicy StripIgnorable

Whitespace text nodes appearing in element-only content are stripped

### Unspecified

public static WhitespacePolicy Unspecified

Unspecified means that no other value has been specifically requested

## Method Detail

### makeCustomPolicy

public static WhitespacePolicy makeCustomPolicy(Predicate<QName> elementTest)

Deprecated This method has been replaced by MakeCustomPolicy.

Create a custom whitespace stripping policy

Parameters:

`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.

Returns:

A `WhitespacePolicy` object

### MakeCustomPolicy

public static WhitespacePolicy MakeCustomPolicy(Predicate<QName> elementTest)

Create a custom whitespace stripping policy

Parameters:

`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.

Returns:

A `WhitespacePolicy` object