|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jclark.xsl.sax2.ResultBase
public abstract class ResultBase
abstract base class represents the results of executing a stylesheet Action -- constructs result components. events are fired to the Result, which may, in turn, fire events to a SAX ContHandler
Field Summary | |
---|---|
(package private) org.xml.sax.ErrorHandler |
_errorHandler
|
(package private) OutputMethodHandler |
_outputMethodHandler
|
Constructor Summary | |
---|---|
ResultBase(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.ErrorHandler errorHandler)
Construct with a ContentHandler already determined |
|
ResultBase(OutputMethodHandler outputMethodHandler,
org.xml.sax.ErrorHandler errorHandler)
Construct with an outputMethodHandler from which we'll obtain the appropriate ContentHandler |
Method Summary | |
---|---|
void |
attribute(Name name,
java.lang.String value)
construct an Attribute with the given Name ... |
void |
characters(java.lang.String str)
construct some characters in the result |
void |
comment(java.lang.String str)
construct a comment in our result |
void |
end()
flush any pending construction work, nothing else will be built |
void |
endElement(Name elementType)
Finish constructing an Element |
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 org.xml.sax.ContentHandler |
getContentHandler()
|
int |
getIndex(java.lang.String qName)
|
int |
getIndex(java.lang.String namespaceURI,
java.lang.String localName)
Attributes implementation: get the index of the Attribute with the given Name components, or -1 if
it does not exist |
int |
getLength()
|
java.lang.String |
getLocalName(int index)
Attributes implementation: get the Attribute's local name |
java.lang.String |
getQName(int index)
|
java.lang.String |
getType(int index)
|
java.lang.String |
getType(java.lang.String qName)
|
java.lang.String |
getType(java.lang.String namespaceURI,
java.lang.String localName)
|
java.lang.String |
getURI(int index)
Attributes implementation: get the namespace for the i'th Attribute's name |
java.lang.String |
getValue(int index)
Attributes implementation: get the value of the i'th Attribute |
java.lang.String |
getValue(java.lang.String qName)
Attributes implementation: get the value of the named Attribute |
java.lang.String |
getValue(java.lang.String namespaceURI,
java.lang.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 |
(package private) static Name[] |
grow(Name[] v)
|
(package private) static java.lang.String[] |
grow(java.lang.String[] v)
|
void |
message(Node node,
java.lang.String str)
Support the xsl:message element. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
construct a processingInstruction in the result |
void |
rawCharacters(java.lang.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 |
(package private) org.xml.sax.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 ... |
protected abstract void |
startElementContent(Name elementType,
NamespacePrefixMap nsMap)
notify that we're finished with adding attributes |
protected void |
throwXSLException(org.xml.sax.SAXException e)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.jclark.xsl.tr.Result |
---|
createResult |
Field Detail |
---|
org.xml.sax.ErrorHandler _errorHandler
OutputMethodHandler _outputMethodHandler
Constructor Detail |
---|
ResultBase(OutputMethodHandler outputMethodHandler, org.xml.sax.ErrorHandler errorHandler)
ResultBase(org.xml.sax.ContentHandler contentHandler, org.xml.sax.ErrorHandler errorHandler)
Method Detail |
---|
public void flush() throws XSLException
XSLException
public void rawCharacters(java.lang.String str) throws XSLException
rawCharacters
in interface Result
XSLException
public void characters(java.lang.String str) throws XSLException
characters
in interface Result
XSLException
public void comment(java.lang.String str) throws XSLException
comment
in interface Result
XSLException
public void processingInstruction(java.lang.String target, java.lang.String data) throws XSLException
processingInstruction
in interface Result
XSLException
public void startElement(Name elementType, NamespacePrefixMap nsMap) throws XSLException
startElement
in interface Result
XSLException
public void endElement(Name elementType) throws XSLException
Result
endElement
in interface Result
XSLException
protected final org.xml.sax.ContentHandler getContentHandler()
public int getIndex(java.lang.String qName)
getIndex
in interface org.xml.sax.Attributes
public int getIndex(java.lang.String namespaceURI, java.lang.String localName)
-1 if
it does not exist
- Specified by:
getIndex
in interface org.xml.sax.Attributes
public int getLength()
getLength
in interface org.xml.sax.Attributes
public java.lang.String getValue(java.lang.String namespaceURI, java.lang.String localName)
null
if
it does not exist
getValue
in interface org.xml.sax.Attributes
public java.lang.String getValue(int index)
getValue
in interface org.xml.sax.Attributes
public java.lang.String getValue(java.lang.String qName)
getValue
in interface org.xml.sax.Attributes
public java.lang.String getURI(int index)
getURI
in interface org.xml.sax.Attributes
public java.lang.String getLocalName(int index)
getLocalName
in interface org.xml.sax.Attributes
public java.lang.String getQName(int index)
getQName
in interface org.xml.sax.Attributes
public java.lang.String getType(int index)
getType
in interface org.xml.sax.Attributes
public java.lang.String getType(java.lang.String qName)
getType
in interface org.xml.sax.Attributes
public java.lang.String getType(java.lang.String namespaceURI, java.lang.String localName)
getType
in interface org.xml.sax.Attributes
protected final Name getAttributeName(int index)
protected abstract void startElementContent(Name elementType, NamespacePrefixMap nsMap) throws XSLException
XSLException
protected abstract void endElementContent(Name elementType) throws XSLException
XSLException
public void attribute(Name name, java.lang.String value) throws XSLException
attribute
in interface Result
XSLException
public void start(OutputMethod outputMethod) throws XSLException
start
in interface Result
outputMethod
- the xsl:output parameters gleaned
from the stylesheet
XSLException
public abstract void resultTreeFragment(ResultTreeFragment frag) throws XSLException
XSLException
org.xml.sax.ContentHandler setOutputMethod(Name name, OutputMethod method) throws java.io.IOException, org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
public void end() throws XSLException
end
in interface Result
XSLException
protected void throwXSLException(org.xml.sax.SAXException e) throws XSLException
XSLException
public void message(Node node, java.lang.String str) throws XSLException
Result
xsl:message
element.
message
in interface Result
node
- The source context node under consideration
when the message action is performed. May be used for
locator information
XSLException
static java.lang.String[] grow(java.lang.String[] v)
static Name[] grow(Name[] v)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |