Methods Summary |
---|
public void | attributeDecl(java.lang.String eName, java.lang.String aName, java.lang.String type, java.lang.String valueDefault, java.lang.String value)Does nothing.
|
public void | characters(java.lang.String chars)Receive notification of character data.
final int length = chars.length();
if (length > m_charsBuff.length)
{
m_charsBuff = new char[length * 2 + 1];
}
chars.getChars(0, length, m_charsBuff, 0);
this.characters(m_charsBuff, 0, length);
|
public void | characters(char[] ch, int off, int len)Receive notification of character data.
The Parser will call this method to report each chunk of
character data. SAX parsers may return all contiguous character
data in a single chunk, or they may split it into several
chunks; however, all of the characters in any single event
must come from the same external entity, so that the Locator
provides useful information.
The application must not attempt to read from the array
outside of the specified range.
Note that some parsers will report whitespace using the
ignorableWhitespace() method rather than this one (validating
parsers must do so).
flushPending();
m_saxHandler.characters(ch, off, len);
// time to fire off characters event
if (m_tracer != null)
super.fireCharEvent(ch, off, len);
|
public void | close()Do nothing.
return;
|
protected void | closeStartTag()This method is called when all the data needed for a call to the
SAX handler's startElement() method has been gathered.
m_elemContext.m_startTagOpen = false;
// Now is time to send the startElement event
m_saxHandler.startElement(
EMPTYSTRING,
m_elemContext.m_elementName,
m_elemContext.m_elementName,
m_attributes);
m_attributes.clear();
|
public void | comment(char[] ch, int start, int length)Receive notification of a comment anywhere in the document. This callback
will be used for comments inside or outside the document element.
flushPending();
m_lexHandler.comment(ch, start, length);
// time to fire off comment event
if (m_tracer != null)
super.fireCommentEvent(ch, start, length);
return;
|
public void | elementDecl(java.lang.String name, java.lang.String model)Does nothing.
return;
|
public void | endCDATA()Does nothing.
return;
|
public void | endDTD()Does nothing.
|
public void | endDocument()Receive notification of the end of a document.
The SAX parser will invoke this method only once, and it will
be the last method invoked during the parse. The parser shall
not invoke this method until it has either abandoned parsing
(because of an unrecoverable error) or reached the end of
input.
flushPending();
// Close output document
m_saxHandler.endDocument();
if (m_tracer != null)
super.fireEndDoc();
|
public void | endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)Receive notification of the end of an element.
The SAX parser will invoke this method at the end of every
element in the XML document; there will be a corresponding
startElement() event for every endElement() event (even when the
element is empty).
If the element name has a namespace prefix, the prefix will
still be attached to the name.
flushPending();
m_saxHandler.endElement(uri, localName, qName);
// time to fire off endElement event
if (m_tracer != null)
super.fireEndElem(qName);
|
public void | endElement(java.lang.String elementName)Receive notification of the end of an element.
flushPending();
m_saxHandler.endElement(EMPTYSTRING, elementName, elementName);
// time to fire off endElement event
if (m_tracer != null)
super.fireEndElem(elementName);
|
public void | endPrefixMapping(java.lang.String prefix)Does nothing.
|
public void | externalEntityDecl(java.lang.String arg0, java.lang.String arg1, java.lang.String arg2)
|
public void | flushPending()This method flushes any pending events, which can be startDocument()
closing the opening tag of an element, or closing an open CDATA section.
if (m_needToCallStartDocument)
{
startDocumentInternal();
m_needToCallStartDocument = false;
}
// Close any open element
if (m_elemContext.m_startTagOpen)
{
closeStartTag();
m_elemContext.m_startTagOpen = false;
}
|
public java.util.Properties | getOutputFormat()Returns null.
return null;
|
public java.io.OutputStream | getOutputStream()Reurns null
return null;
|
public java.io.Writer | getWriter()Returns null
return null;
|
public void | ignorableWhitespace(char[] ch, int start, int length)Does nothing.
|
public void | indent(int n)Does nothing.
|
public void | internalEntityDecl(java.lang.String name, java.lang.String value)Does nothing.
|
public void | namespaceAfterStartElement(java.lang.String prefix, java.lang.String uri)This method is used when a prefix/uri namespace mapping
is indicated after the element was started with a
startElement() and before and endElement().
startPrefixMapping(prefix,uri) would be used before the
startElement() call.
// hack for XSLTC with finding URI for default namespace
if (m_elemContext.m_elementURI == null)
{
String prefix1 = getPrefixPart(m_elemContext.m_elementName);
if (prefix1 == null && EMPTYSTRING.equals(prefix))
{
// the elements URI is not known yet, and it
// doesn't have a prefix, and we are currently
// setting the uri for prefix "", so we have
// the uri for the element... lets remember it
m_elemContext.m_elementURI = uri;
}
}
startPrefixMapping(prefix,uri,false);
|
public void | processingInstruction(java.lang.String arg0, java.lang.String arg1)Receive notification of a processing instruction.
The Parser will invoke this method once for each processing
instruction found: note that processing instructions may occur
before or after the main document element.
A SAX parser should never report an XML declaration (XML 1.0,
section 2.8) or a text declaration (XML 1.0, section 4.3.1)
using this method.
flushPending();
m_saxHandler.processingInstruction(arg0,arg1);
// time to fire off processing instruction event
if (m_tracer != null)
super.fireEscapingEvent(arg0,arg1);
|
public boolean | reset()Try's to reset the super class and reset this class for
re-use, so that you don't need to create a new serializer
(mostly for performance reasons).
boolean wasReset = false;
if (super.reset())
{
resetToHTMLSAXHandler();
wasReset = true;
}
return wasReset;
|
private void | resetToHTMLSAXHandler()Reset all of the fields owned by ToHTMLSAXHandler class
this.m_escapeSetting = false;
|
public void | serialize(org.w3c.dom.Node node)Does nothing.
return;
|
public void | setDocumentLocator(org.xml.sax.Locator arg0)Does nothing.
// do nothing
|
public boolean | setEscaping(boolean escape)Turns special character escaping on/off.
boolean oldEscapeSetting = m_escapeSetting;
m_escapeSetting = escape;
if (escape) {
processingInstruction(Result.PI_ENABLE_OUTPUT_ESCAPING, "");
} else {
processingInstruction(Result.PI_DISABLE_OUTPUT_ESCAPING, "");
}
return oldEscapeSetting;
|
public void | setIndent(boolean indent)Does nothing
|
public void | setOutputFormat(java.util.Properties format)Does nothing.
|
public void | setOutputStream(java.io.OutputStream output)Does nothing.
|
public void | setWriter(java.io.Writer writer)Does nothing.
|
public void | skippedEntity(java.lang.String arg0)Does nothing.
|
public void | startCDATA()Does nothing.
|
public void | startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)Receive notification of the beginning of an element, although this is a
SAX method additional namespace or attribute information can occur before
or after this call, that is associated with this element.
flushPending();
super.startElement(namespaceURI, localName, qName, atts);
m_saxHandler.startElement(namespaceURI, localName, qName, atts);
m_elemContext.m_startTagOpen = false;
|
public void | startElement(java.lang.String elementNamespaceURI, java.lang.String elementLocalName, java.lang.String elementName)An element starts, but attributes are not fully known yet.
super.startElement(elementNamespaceURI, elementLocalName, elementName);
flushPending();
// Handle document type declaration (for first element only)
if (m_lexHandler != null)
{
String doctypeSystem = getDoctypeSystem();
String doctypePublic = getDoctypePublic();
if ((doctypeSystem != null) || (doctypePublic != null))
m_lexHandler.startDTD(
elementName,
doctypePublic,
doctypeSystem);
m_lexHandler = null;
}
m_elemContext = m_elemContext.push(elementNamespaceURI, elementLocalName, elementName);
|
public void | startElement(java.lang.String elementName)An element starts, but attributes are not fully known yet.
this.startElement(null,null, elementName);
|
public void | startEntity(java.lang.String arg0)Does nothing.
|
public boolean | startPrefixMapping(java.lang.String prefix, java.lang.String uri, boolean shouldFlush)Handle a prefix/uri mapping, which is associated with a startElement()
that is soon to follow. Need to close any open start tag to make
sure than any name space attributes due to this event are associated wih
the up comming element, not the current one.
// no namespace support for HTML
if (shouldFlush)
flushPending();
m_saxHandler.startPrefixMapping(prefix,uri);
return false;
|
public void | startPrefixMapping(java.lang.String prefix, java.lang.String uri)Begin the scope of a prefix-URI Namespace mapping
just before another element is about to start.
This call will close any open tags so that the prefix mapping
will not apply to the current element, but the up comming child.
startPrefixMapping(prefix,uri,true);
|