com.jclark.xsl.sax2
public abstract class ResultBase extends Object implements Result, Attributes
| Field Summary | |
|---|---|
| ErrorHandler | _errorHandler |
| OutputMethodHandler | _outputMethodHandler |
| Constructor Summary | |
|---|---|
| ResultBase(OutputMethodHandler outputMethodHandler, ErrorHandler errorHandler)
Construct with an outputMethodHandler from which we'll
obtain the appropriate ContentHandler | |
| ResultBase(ContentHandler contentHandler, ErrorHandler errorHandler)
Construct with a ContentHandler already determined | |
| Method Summary | |
|---|---|
| void | attribute(Name name, String value)
construct an Attribute with the given Name ... if we're not
at an appropriate point, eg, we've already started putting
text into an element, do nothing |
| void | characters(String str)
construct some characters in the result |
| void | comment(String str)
construct a comment in our result |
| void | end()
flush any pending construction work, nothing else will be built |
| void | endElement(Name elementType) |
| protected abstract void | endElementContent(Name elementType)
Notify the Element is ending |
| void | flush()
call this when we're sure we're not getting any more
attribute node constructing actions |
| protected Name | getAttributeName(int index) |
| protected ContentHandler | getContentHandler() |
| int | getIndex(String qName) |
| int | getIndex(String namespaceURI, String localName)
Attributes implementation: get the index of the Attribute
with the given Name components, or -1 if
it does not exist |
| int | getLength() |
| String | getLocalName(int index)
Attributes implementation: get the Attribute's local name |
| String | getQName(int index) |
| String | getType(int index) |
| String | getType(String qName) |
| String | getType(String namespaceURI, String localName) |
| String | getURI(int index)
Attributes implementation: get the namespace for the
i'th Attribute's name |
| String | getValue(String namespaceURI, String localName)
Attributes implementation: get the value of the Attribute
with the given name in the given namespace
the String value of the Attribute, or null if
it does not exist |
| String | getValue(int index)
Attributes implementation: get the value of the i'th Attribute |
| String | getValue(String qName)
Attributes implementation: get the value of the named
Attribute |
| static String[] | grow(String[] v) |
| static Name[] | grow(Name[] v) |
| void | message(Node node, String str) |
| void | processingInstruction(String target, String data)
construct a processingInstruction in the result |
| void | rawCharacters(String str)
rawCharacters are distinct from plain 'ol characters
in that we don't try to do any escaping |
| abstract void | resultTreeFragment(ResultTreeFragment frag)
Copy a Result Tree Fragment to the Destination via the Handler |
| ContentHandler | setOutputMethod(Name name, OutputMethod method)
get the appropriate ContentHandler from the
outputMethodHandler (we've already obtained for our destination)
for the named output method |
| void | start(OutputMethod outputMethod)
initialize, (and possibly construct) the ContentHandler
called by the transformation engine
|
| void | startElement(Name elementType, NamespacePrefixMap nsMap)
start construction an Element ... we may yet get
some attributes, so we'll wait a bit before propagating
the event downstream |
| protected abstract void | startElementContent(Name elementType, NamespacePrefixMap nsMap)
notify that we're finished with adding attributes |
| protected void | throwXSLException(SAXException e) |
Returns: the name of the i'th Attribute
-1 if
it does not existReturns: the number of attribute nodes we have at this moment
Returns: the type of the i'th Attribute (always "CDATA")
Returns: the type of the named Attribute (always "CDATA")
Returns: the type of the named Attribute (always "CDATA")
null if
it does not existParameters: outputMethod the xsl:output parameters gleaned from the stylesheet