|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xml.sax.helpers.XMLFilterImpl | +--com.simonstl.ool.OolBaseSAXFilter
This class is the first phase of converting XML documents into Oolish XML documents. It replaces all character events with empty ool:text elements and diverts the text to a separate file.
Field Summary | |
protected java.io.Writer |
content
|
protected int |
currentPosition
|
protected boolean |
preserveWhitespace
|
Constructor Summary | |
OolBaseSAXFilter(org.xml.sax.XMLReader parent)
A constructor that takes the parser which will feed it SAX events |
Method Summary | |
void |
characters(char[] ch,
int start,
int len)
the characters event does the bulk of the work, sending text one way and elements (supplemented with Ool elements) another. |
java.io.Writer |
getContent()
Returns the Writer containing all the text. |
int |
getCurrentPosition()
gets the current character position. |
boolean |
getPreserveWhitespace()
returns whether or not the filter is preserving "ignorable whitespace", per SAX rules. |
void |
ignorableWhitespace(char[] ch,
int start,
int len)
the ignorableWhitespace event sends its information the characters() method if whitespace is being preserved, and passes it up the SAX chain otherwise. |
void |
setContent(java.io.Writer _content)
Takes a writer into which all the text of the document will go. |
void |
setCurrentPosition(int _position)
sets the current character position. |
void |
setPreserveWhitespace(boolean _preserve)
sets whether or not to preserve "ignorable whitespace", per SAX rules. |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
|
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl |
endDocument, endElement, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.io.Writer content
protected int currentPosition
protected boolean preserveWhitespace
Constructor Detail |
public OolBaseSAXFilter(org.xml.sax.XMLReader parent)
Method Detail |
public void setContent(java.io.Writer _content)
public java.io.Writer getContent()
public void setCurrentPosition(int _position)
public int getCurrentPosition()
public void setPreserveWhitespace(boolean _preserve)
public boolean getPreserveWhitespace()
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in class org.xml.sax.helpers.XMLFilterImpl
public void characters(char[] ch, int start, int len) throws org.xml.sax.SAXException
characters
in class org.xml.sax.helpers.XMLFilterImpl
public void ignorableWhitespace(char[] ch, int start, int len) throws org.xml.sax.SAXException
ignorableWhitespace
in class org.xml.sax.helpers.XMLFilterImpl
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |