|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.icl.saxon.output.ProxyEmitter | +--com.icl.saxon.Stripper
The Stripper class maintains details of which elements need to be stripped. The code is written to act as a SAX filter to do the stripping. It also includes a free-standing method to strip an existing tree.
Fields inherited from class com.icl.saxon.output.ProxyEmitter |
baseEmitter, characterSet, namePool, outputDetails, writer |
Constructor Summary | |
Stripper()
create a Stripper and initialise variables |
Method Summary | |
void |
addRule(NodeTest p,
boolean preserve,
int precedence)
Add a rule defining which white space is preserved / stripped. |
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 |
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 |
setStylesheetRules(NamePool namePool)
Set the rules appropriate for whitespace-stripping in a stylesheet |
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 |
Methods inherited from class com.icl.saxon.output.ProxyEmitter |
comment, endDocument, processingInstruction, setCharacterSet, setDocumentLocator, setEscaping, setNamePool, setOutputDetails, setUnderlyingEmitter, setUnparsedEntity, setWriter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Stripper()
Method Detail |
public void setController(Controller controller)
public void setStylesheetRules(NamePool namePool)
public void addRule(NodeTest p, boolean preserve, int precedence)
NodeTest
- The condition to be satisfiedint
- precedence: the import precedence of this rulepreserve
- true: preserve space for this element;public boolean isSpacePreserving(int nameCode)
uri
- The namespace URI of the element namelocalname
- The local part of the element namepublic void startDocument() throws org.xml.sax.SAXException
startDocument
in class ProxyEmitter
public void startElement(int nameCode, org.xml.sax.Attributes atts, int[] namespaces, int nscount) throws org.xml.sax.SAXException
startElement
in class ProxyEmitter
com.icl.saxon.output.Emitter
namespaces
- Array of namespace codes identifying the namespace prefix/uri
pairs associated with this elementnscount
- Number of significant entries within namespaces arraypublic void endElement(int nameCode) throws org.xml.sax.SAXException
endElement
in class ProxyEmitter
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in class ProxyEmitter
public boolean getPreserveAll()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |