com.jclark.xsl.tr

Interface Result

public interface Result

As transformation proceeds, "Actions" are performed, and an output tree is constructed. Rather than building the output tree as an object model in memory, it is represented as the sequence of events that could be used to construct the tree. These events may indeed be used to build such a model, as is the case with result tree fragments, or they may be directly serialized to the output.

a Result is the object which recieves these events, then serializes them or builds an object model, as appropriate.

Method Summary
voidattribute(Name name, String value)
Construct an Attribute ...
voidcharacters(String str)
build a TEXT node
voidcomment(String str)
Construct a comment
ResultcreateResult(String uri)
Create a new Result object for serializing to the destination uri.
voidend()
Finish constructing stuff.
voidendElement(Name elementType)
Finish constructing an Element
voidmessage(Node node, String str)
Support the xsl:message element.
voidprocessingInstruction(String target, String data)
Construct a Processing Instruction
voidrawCharacters(String str)
Some (possibly) non XML characters
voidstart(OutputMethod outputMethod)
Prepare to start constructing stuff.
voidstartElement(Name elementType, NamespacePrefixMap nsMap)
Start constructing an Element (NB) The nsMap must declare the prefix on elementType correctly.

Method Detail

attribute

public void attribute(Name name, String value)
Construct an Attribute ... Unlike SAX, we don't have the luxury of having all the Attributes present when the Element is started. Some may be constructed later as a consequence of an xsl:attribute for example.

characters

public void characters(String str)
build a TEXT node

comment

public void comment(String str)
Construct a comment

createResult

public Result createResult(String uri)
Create a new Result object for serializing to the destination uri. Provides support for the "xt:document" extension element

end

public void end()
Finish constructing stuff.

endElement

public void endElement(Name elementType)
Finish constructing an Element

message

public void message(Node node, String str)
Support the xsl:message element.

Parameters: node The source context node under consideration when the message action is performed. May be used for locator information

processingInstruction

public void processingInstruction(String target, String data)
Construct a Processing Instruction

rawCharacters

public void rawCharacters(String str)
Some (possibly) non XML characters

start

public void start(OutputMethod outputMethod)
Prepare to start constructing stuff. ... take care of any initialization tasks.

Parameters: outputMethod whatever the stylesheeet has told us about how it wants the trasnformed results output

startElement

public void startElement(Name elementType, NamespacePrefixMap nsMap)
Start constructing an Element (NB) The nsMap must declare the prefix on elementType correctly.