|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.xml.sax.SAXtoDOM com.novell.xsl.SAXtoDOMStrip
Class to process SAX events and turn them into a DOM tree, while performing XSLT source-document whitespace stripping
Field Summary | |
protected Node |
currentText
|
protected Stack |
stack
|
protected StripList |
stripList
|
protected boolean |
xmlSpacePreserve
|
Fields inherited from class com.novell.xml.sax.SAXtoDOM |
currentNode, currentNodePosition, document, level2DOM, locator, namespaceStack, novellDOM |
Constructor Summary | |
SAXtoDOMStrip(Document document,
StripList stripList)
|
Method Summary | |
void |
characters(char[] ch,
int start,
int length)
Receive notification of character data. |
void |
comment(String data)
Handle a comment |
void |
endDocument()
Receive notification of the end of a document. |
void |
endElement(String name)
Receive notification of the end of an element. |
protected void |
popState()
Restore state from a previous pushState() |
void |
processingInstruction(String target,
String data)
Receive notification of a processing instruction. |
protected void |
pushState()
Push state that potentially changes with each Element |
void |
startElement(String name,
AttributeList atts)
Receive notification of the beginning of an element. |
protected void |
strip()
Postentially strip the last text node according to the XSLT source tree whitespace stripping rules |
boolean |
stripNode(Node node)
Return if a text or cdata section node should be stripped (not returned from an axis). |
Methods inherited from class com.novell.xml.sax.SAXtoDOM |
ensureDocType, getResult, ignorableWhitespace, notationDecl, setDocumentLocator, setLocatorInfo, startDocument, unparsedEntityDecl |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Node currentText
protected final StripList stripList
protected boolean xmlSpacePreserve
protected Stack stack
Constructor Detail |
public SAXtoDOMStrip(Document document, StripList stripList)
Method Detail |
public void endDocument() throws SAXException
endDocument
in interface DocumentHandler
endDocument
in class SAXtoDOM
SAXException
- Any SAX exception, possibly
wrapping another exception.public void startElement(String name, AttributeList atts) throws SAXException
startElement
in interface DocumentHandler
startElement
in class SAXtoDOM
name
- The element type name.atts
- The attributes attached to the element, if any.
SAXException
- Any SAX exception, possibly
wrapping another exception.endElement(java.lang.String)
,
AttributeList
public void endElement(String name) throws SAXException
endElement
in interface DocumentHandler
endElement
in class SAXtoDOM
name
- The element type name
SAXException
- Any SAX exception, possibly
wrapping another exception.public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface DocumentHandler
characters
in class SAXtoDOM
ch
- The characters from the XML document.start
- The start position in the array.length
- The number of characters to read from the array.
SAXException
- Any SAX exception, possibly
wrapping another exception.SAXtoDOM.ignorableWhitespace(char[], int, int)
,
Locator
public void processingInstruction(String target, String data) throws SAXException
processingInstruction
in interface DocumentHandler
processingInstruction
in class SAXtoDOM
target
- The processing instruction target.data
- The processing instruction data, or null if
none was supplied.
SAXException
- Any SAX exception, possibly
wrapping another exception.public void comment(String data) throws SAXException
comment
in interface DocumentCommentHandler
comment
in class SAXtoDOM
data
- The comment data, that is, everything
between the tags.
SAXException
protected void strip()
public boolean stripNode(Node node)
node
- The text or cdata section node to test
protected void pushState()
protected void popState()
pushState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |