A general questions on using a TransformHandler:
I am implementing the TransformHandler interface for XSLTC,
and I cannot figure out 100% how this interface is inteded
used. The interface includes SAX2's ContentHandler, it has
a method called setResult(Result result) which can be used
to set the Result object for the transformation, and it has
a getTransformer() method that returns a reference to the
Transformer that will perform the actual transformation.
The getTransformer() method is there only so that the user
can pass parameters and set output properties to the
Transformer. From what I understand the user should never
call the transform() method on this object. This does not
make sense as the input to the transformation is passed to
the TransformHandler as SAX events and not as a Source obj.
So when should the transformation be started? When the
TransformHandler's endDocument() is called? But what if the
setResult() method was not called before that? Should we
then wait until setResult() is called, or should we still
run the transformation and dump the output to System.out ?
I have choosen to run the transformation in whatever method
is called _last_ of endDocument() and setResult(), but there
is no particular reason for that other than that I have all
the info I need at this point.
Morten