net.sf.saxon.event
Class AllElementStripper
java.lang.Object
net.sf.saxon.event.SequenceReceiver
net.sf.saxon.event.ProxyReceiver
net.sf.saxon.event.Stripper
net.sf.saxon.event.AllElementStripper
- All Implemented Interfaces:
- Result, Receiver
public class AllElementStripper
- extends Stripper
The AllElementStripper refines the Stripper class to do stripping of
all whitespace nodes in a document
- Author:
- Michael H. Kay
Methods inherited from class net.sf.saxon.event.ProxyReceiver |
append, close, comment, endDocument, getConfiguration, getDocumentLocator, getNamePool, getUnderlyingReceiver, namespace, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocument |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AllElementStripper
public AllElementStripper()
- Constructor: create an instance of the class. This instance can be used as a filter in a pipeline,
and can be freely modified by the caller before use.
getInstance
public static AllElementStripper getInstance()
- Get a singular instance of the class. Note that this class is NOT a singleton and is NOT immutable.
This method should only be used (a) if the filtering behaviour of the class is not being used, or (b)
if the getAnother() method is used to clone the class before use as a filter.
- Returns:
- a singular instance of the class, which the caller must not modify.
getAnother
public Stripper getAnother()
- Create a copy of this Stripper. The result can be freely modified by the caller before use.
- Specified by:
getAnother
in class Stripper
- Returns:
- a copy of this Stripper. The new copy shares the same PipelineConfiguration
as the original, but the underlying receiver (that is, the destination for post-stripping
events) is left uninitialized.
isSpacePreserving
public byte isSpacePreserving(int fingerprint)
- Decide whether an element is in the set of white-space preserving element types
- Specified by:
isSpacePreserving
in class Stripper
- Parameters:
fingerprint
- identifies the element being tested
- Returns:
- STRIP_DEFAULT: strip spaces unless xml:space tells you not to.
Copyright (c) 2004-2010 Saxonica Limited. All rights reserved.