| java.lang.Object net.sf.saxon.event.SequenceReceiver net.sf.saxon.event.ProxyReceiver net.sf.saxon.event.Stripper
All known Subclasses: net.sf.saxon.style.StylesheetStripper, net.sf.saxon.om.AllElementStripper,
Stripper | public class Stripper extends ProxyReceiver (Code) | | The Stripper class maintains details of which elements need to be stripped.
The code is written to act as a SAX-like filter to do the stripping.
author: Michael H. Kay |
Constructor Summary | |
protected | Stripper() | public | Stripper(Mode stripperRules) create a Stripper and initialise variables
Parameters: stripperRules - defines which elements have whitespace stripped. |
Method Summary | |
public void | attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties) | public void | characters(CharSequence chars, int locationId, int properties) | public void | endElement() | public Stripper | getAnother() | public boolean | getStripAll() | public byte | isSpacePreserving(int nameCode) | public byte | isSpacePreserving(NodeInfo element) 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. | public void | open() | public void | setPipelineConfiguration(PipelineConfiguration pipe) | public void | setStripAll() | public void | startElement(int nameCode, int typeCode, int locationId, int properties) |
ALWAYS_PRESERVE | final public static byte ALWAYS_PRESERVE(Code) | | |
ALWAYS_STRIP | final public static byte ALWAYS_STRIP(Code) | | |
CANNOT_STRIP | final public static byte CANNOT_STRIP(Code) | | |
PRESERVE_PARENT | final public static byte PRESERVE_PARENT(Code) | | |
STRIP_DEFAULT | final public static byte STRIP_DEFAULT(Code) | | |
Stripper | protected Stripper()(Code) | | Default constructor for use in subclasses
|
Stripper | public Stripper(Mode stripperRules)(Code) | | create a Stripper and initialise variables
Parameters: stripperRules - defines which elements have whitespace stripped. Ifnull, all whitespace is preserved. |
getAnother | public Stripper getAnother()(Code) | | Get a clean copy of this stripper
|
getStripAll | public boolean getStripAll()(Code) | | Determine if all whitespace is to be stripped (in this case, no further testing
is needed)
|
isSpacePreserving | public byte isSpacePreserving(int nameCode)(Code) | | Decide whether an element is in the set of white-space preserving element types
Parameters: nameCode - Identifies the name of the element whose whitespace is tobe preserved ALWAYS_PRESERVE if the element is in the set of white-space preservingelement types, ALWAYS_STRIP if the element is to be stripped regardless of thexml:space setting, and STRIP_DEFAULT otherwise |
isSpacePreserving | public byte isSpacePreserving(NodeInfo element)(Code) | | 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.
Parameters: element - Identifies the element whose whitespace is possibly tobe preserved ALWAYS_PRESERVE if the element is in the set of white-space preservingelement types, ALWAYS_STRIP if the element is to be stripped regardless of thexml:space setting, and STRIP_DEFAULT otherwise |
open | public void open() throws XPathException(Code) | | Callback interface for SAX: not for application use
|
setStripAll | public void setStripAll()(Code) | | Specify that all whitespace nodes are to be stripped
|
startElement | public void startElement(int nameCode, int typeCode, int locationId, int properties) throws XPathException(Code) | | |
Methods inherited from net.sf.saxon.event.ProxyReceiver | public void attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties) throws XPathException(Code)(Java Doc) public void characters(CharSequence chars, int locationId, int properties) throws XPathException(Code)(Java Doc) public void close() throws XPathException(Code)(Java Doc) public void comment(CharSequence chars, int locationId, int properties) throws XPathException(Code)(Java Doc) public void endDocument() throws XPathException(Code)(Java Doc) public void endElement() throws XPathException(Code)(Java Doc) public Configuration getConfiguration()(Code)(Java Doc) public LocationProvider getDocumentLocator()(Code)(Java Doc) public NamePool getNamePool()(Code)(Java Doc) public String getSystemId()(Code)(Java Doc) public Receiver getUnderlyingReceiver()(Code)(Java Doc) public void namespace(int namespaceCode, int properties) throws XPathException(Code)(Java Doc) public void open() throws XPathException(Code)(Java Doc) public void processingInstruction(String target, CharSequence data, int locationId, int properties) throws XPathException(Code)(Java Doc) public void setPipelineConfiguration(PipelineConfiguration config)(Code)(Java Doc) public void setSystemId(String systemId)(Code)(Java Doc) public void setUnderlyingReceiver(Receiver receiver)(Code)(Java Doc) public void setUnparsedEntity(String name, String uri, String publicId) throws XPathException(Code)(Java Doc) public void startContent() throws XPathException(Code)(Java Doc) public void startDocument(int properties) throws XPathException(Code)(Java Doc) public void startElement(int nameCode, int typeCode, int locationId, int properties) throws XPathException(Code)(Java Doc)
|
|
|