public class Stripper extends ProxyEmitter
baseEmitter, outputProperties
locator, outputStream, systemId, writer
Modifier | Constructor and Description |
---|---|
protected |
Stripper()
Default constructor for use in subclasses
|
|
Stripper(Mode stripperRules)
create a Stripper and initialise variables
|
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length)
Callback interface for SAX: not for application use
|
void |
endElement(int nameCode)
Callback interface for SAX: not for application use
|
boolean |
getPreserveAll()
Determine if all whitespace is to be preserved (in this case, no further testing
is needed)
|
boolean |
getStripAll()
Determine if all whitespace is to be stripped (in this case, no further testing
is needed)
|
boolean |
isSpacePreserving(int nameCode)
Decide whether an element is in the set of white-space preserving element types
|
void |
setController(Controller controller)
Set the Controller to be used
|
void |
setPreserveAll()
Specify that all whitespace nodes are to be preserved
|
void |
setStripAll()
Specify that all whitespace nodes are to be stripped
|
void |
startDocument()
Callback interface for SAX: not for application use
|
void |
startElement(int nameCode,
org.xml.sax.Attributes atts,
int[] namespaces,
int nscount)
Callback interface for SAX: not for application use
|
comment, endDocument, processingInstruction, setDocumentLocator, setEscaping, setNamePool, setOutputProperties, setUnderlyingEmitter, setUnparsedEntity, setWriter
getNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, setOutputStream, setSystemId, usesWriter
protected Stripper()
public Stripper(Mode stripperRules)
stripperRules:
- defines which elements have whitespace stripped. If
null, all whitespace is preserved.public void setPreserveAll()
public boolean getPreserveAll()
public void setStripAll()
public boolean getStripAll()
public void setController(Controller controller)
public boolean isSpacePreserving(int nameCode)
uri
- The namespace URI of the element namelocalname
- The local part of the element namepublic void startDocument() throws javax.xml.transform.TransformerException
startDocument
in class ProxyEmitter
javax.xml.transform.TransformerException
public void startElement(int nameCode, org.xml.sax.Attributes atts, int[] namespaces, int nscount) throws javax.xml.transform.TransformerException
startElement
in class ProxyEmitter
namespaces
- Array of namespace codes identifying the namespace prefix/uri
pairs associated with this elementnscount
- Number of significant entries within namespaces arrayjavax.xml.transform.TransformerException
public void endElement(int nameCode) throws javax.xml.transform.TransformerException
endElement
in class ProxyEmitter
javax.xml.transform.TransformerException
public void characters(char[] ch, int start, int length) throws javax.xml.transform.TransformerException
characters
in class ProxyEmitter
javax.xml.transform.TransformerException