Package net.sf.saxon.om
Class AllElementStripper
java.lang.Object
net.sf.saxon.event.SequenceReceiver
net.sf.saxon.event.ProxyReceiver
net.sf.saxon.event.Stripper
net.sf.saxon.om.AllElementStripper
The AllElementStripper refines the Stripper class to do stripping of
all whitespace nodes in a document
- Author:
- Michael H. Kay
-
Field Summary
Fields inherited from class net.sf.saxon.event.Stripper
ALWAYS_PRESERVE, ALWAYS_STRIP, CANNOT_STRIP, PRESERVE_PARENT, STRIP_DEFAULTFields inherited from class net.sf.saxon.event.ProxyReceiver
nextReceiverFields inherited from class net.sf.saxon.event.SequenceReceiver
pipelineConfiguration, previousAtomic, systemIdFields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet a clean copy of this stripperstatic AllElementStripperbyteisSpacePreserving(int nameCode) Decide whether an element is in the set of white-space preserving element typesbyteisSpacePreserving(NodeInfo element) Decide whether an element is in the set of white-space preserving element types.Methods inherited from class net.sf.saxon.event.Stripper
attribute, characters, endElement, getStripAll, open, setPipelineConfiguration, setStripAll, startElementMethods inherited from class net.sf.saxon.event.ProxyReceiver
close, comment, endDocument, getConfiguration, getDocumentLocator, getNamePool, getUnderlyingReceiver, namespace, processingInstruction, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocumentMethods inherited from class net.sf.saxon.event.SequenceReceiver
append, getPipelineConfiguration, getSystemId
-
Constructor Details
-
AllElementStripper
public AllElementStripper()
-
-
Method Details
-
getInstance
-
getAnother
Description copied from class:StripperGet a clean copy of this stripper- Overrides:
getAnotherin classStripper
-
isSpacePreserving
public byte isSpacePreserving(int nameCode) Decide whether an element is in the set of white-space preserving element types- Overrides:
isSpacePreservingin classStripper- Parameters:
nameCode- identifies the element being tested- Returns:
- STRIP_DEFAULT: strip spaces unless xml:space tells you not to.
-
isSpacePreserving
Decide whether an element is in the set of white-space preserving element types. This version of the method is useful in cases where getting the namecode of the element is potentially expensive, e.g. with DOM nodes.- Overrides:
isSpacePreservingin classStripper- Parameters:
element- Identifies the element whose whitespace is possibly to be preserved- Returns:
- ALWAYS_PRESERVE if the element is in the set of white-space preserving element types, ALWAYS_STRIP if the element is to be stripped regardless of the xml:space setting, and STRIP_DEFAULT otherwise
-