|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.me.nxg.enormity.esis.EsisHandler
public class EsisHandler
Writes out a SAX stream in a format based on the sgmls ESIS output.
Constructor Summary | |
---|---|
EsisHandler(EsisWriter writer,
boolean normalize)
Creates a SAX ContentHandler which receives a stream of SAX events and writes them out in the ESIS format. |
|
EsisHandler(OutputStream out,
boolean normalize)
|
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
Writes - on the output, followed by the
character string with \n , \r and
\t escaped. |
void |
endDocument()
Writes nothing on the output. |
void |
endElement(String uri,
String localName,
String qName)
Indicates the end of an element. |
void |
endPrefixMapping(String prefix)
Writes mprefix on the output |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Displays ignorable whitespace, unambiguously. |
void |
processingInstruction(String target,
String data)
Writes ?target data on the output. |
void |
setDocumentLocator(Locator locator)
Writes nothing to the output |
void |
skippedEntity(String name)
Writes Xname on the output. |
void |
startDocument()
Writes nothing on the output |
void |
startElement(String uri,
String localName,
String qName,
Attributes atts)
Writes an element-start indicator on the output. |
void |
startPrefixMapping(String prefix,
String uri)
Writes Mprefix uri on the output. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EsisHandler(EsisWriter writer, boolean normalize) throws IOException
IOException
public EsisHandler(OutputStream out, boolean normalize) throws IOException
IOException
Method Detail |
---|
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
public void startDocument() throws SAXException
startDocument
in interface ContentHandler
SAXException
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
SAXException
public void startPrefixMapping(String prefix, String uri) throws SAXException
Mprefix uri
on the output.
We don't need to alphabetise these, for the sake of normalisation,
because in the normalised output, we skip these.
startPrefixMapping
in interface ContentHandler
SAXException
public void endPrefixMapping(String prefix) throws SAXException
mprefix
on the output
endPrefixMapping
in interface ContentHandler
SAXException
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
If the element is not in a namespace, then write
(
<element-name>, and if it is
[
<namespace-uri> <element-name>.
This is preceded. by the attributes, (unconditionally) normalised into alphabetical order.
startElement
in interface ContentHandler
SAXException
public void endElement(String uri, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
SAXException
startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
public void characters(char[] ch, int start, int length) throws SAXException
-
on the output, followed by the
character string with \n
, \r
and
\t
escaped.
characters
in interface ContentHandler
SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
Writes =
on the output, followed by the
whitespace with \n
, \r
and
\t
escaped, and any other whitespace characters
indicated by \
unnn
notation.
ignorableWhitespace
in interface ContentHandler
SAXException
public void processingInstruction(String target, String data) throws SAXException
?target data
on the output.
processingInstruction
in interface ContentHandler
SAXException
public void skippedEntity(String name) throws SAXException
Xname
on the output.
I confess I don't really understand what would generate this,
but it doesn't matter right now.
skippedEntity
in interface ContentHandler
SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |