com.jclark.xsl.sax2
Class OutputMethodDefaulter
java.lang.Object
com.jclark.xsl.sax2.OutputMethodDefaulter
- ContentHandler, CommentHandler, RawCharactersHandler
public class OutputMethodDefaulter
extends java.lang.Object
automagically decides to use the html output method
if the first start element name is "html" in no namespace
Recieves SAX parse events from a ResultBase, till it
gets a look at the root element's name.
Tells the ResultBase that had been sending it SAX parse
events what this has learned. The result
base will switch to an appropriate ContentHandler. This
then sends any events it has queued up while waiting
to see the root element name, then is never used again
during the transform.
void | characters(char[] buf, int off, int len)
|
void | comment(String content)
|
void | endDocument() - receive notice of doc's end
|
void | endElement(String namespaceURI, String localName, String qName) - receive notice of an element's end ...
|
void | endPrefixMapping(String prefix)
|
void | ignorableWhitespace(char[] buf, int off, int len)
|
void | processingInstruction(String target, String content)
|
void | rawCharacters(String chars)
|
void | setDocumentLocator(Locator loc)
|
void | skippedEntity(String name)
|
void | startDocument() - receive notice of doc's start
|
void | startElement(String namespaceURI, String localName, String qName, Attributes atts) - the first start element, if it's "html" and in no namespace, then
we switch to an html contentHandler -- yucchh
|
void | startPrefixMapping(String prefix, String namespace)
|
OutputMethodDefaulter
(package private) OutputMethodDefaulter(ResultBase result,
OutputMethod outputMethod)
Construct with the guy who's gonna be sending us events and
whatever the stylesheet's told us about the output parameters
characters
public void characters(char[] buf,
int off,
int len)
throws SAXException
endDocument
public void endDocument()
throws SAXException
receive notice of doc's end
endElement
public void endElement(String namespaceURI,
String localName,
String qName)
receive notice of an element's end ... this should never
happen, because we should have routed all events to
another ContentHandler upon getting the first startElement()
endPrefixMapping
public void endPrefixMapping(String prefix)
ignorableWhitespace
public void ignorableWhitespace(char[] buf,
int off,
int len)
throws SAXException
processingInstruction
public void processingInstruction(String target,
String content)
setDocumentLocator
public void setDocumentLocator(Locator loc)
skippedEntity
public void skippedEntity(String name)
startDocument
public void startDocument()
receive notice of doc's start
startElement
public void startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
throws SAXException
the first start element, if it's "html" and in no namespace, then
we switch to an html contentHandler -- yucchh
startPrefixMapping
public void startPrefixMapping(String prefix,
String namespace)