net.sf.saxon.style
Class StylesheetStripper
- Receiver, Result
public class StylesheetStripper
The StylesheetStripper refines the Stripper class to do stripping of
whitespace nodes on a stylesheet. This is handled specially (a) because
it is done at compile time, so there is no Controller available, and (b)
because the rules are very simple
attribute, characters, endElement, getAnother, getStripAll, isSpacePreserving, isSpacePreserving, open, setPipelineConfiguration, setStripAll, setXPathContext, startElement |
append, attribute, characters, close, comment, endDocument, endElement, getConfiguration, getDocumentLocator, getNamePool, getUnderlyingReceiver, namespace, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocument, startElement |
isSpacePreserving
public byte isSpacePreserving(int nameCode)
Decide whether an element is in the set of white-space preserving element types
- isSpacePreserving in interface Stripper
nameCode - identifies the element being tested
isSpacePreserving
public byte isSpacePreserving(NodeInfo element)
throws XPathException 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.
- isSpacePreserving in interface Stripper
element - Identifies the element whose whitespace is possibly to
be preserved
- true if the element is in the set of white-space preserving element types
setStylesheetRules
public void setStylesheetRules(NamePool namePool)
Set the rules appropriate for whitespace-stripping in a stylesheet