One approach you could take for StAXSource would be to write a StAX to SAX
converter. This would take an XMLStreamReader / XMLEventReader as input
and generate SAX events on to a ContentHandler. You could wire that to the
TemplatesHandler (org.apache.xalan.processor.StylesheetHandler) allowing
you to reuse the existing components for building the Templates object.
Thanks for the update.
XML Technologies and WAS Development
IBM Toronto Lab
Samuel Medeiros <firstname.lastname@example.org> wrote on 06/23/2013 04:30:38 PM:
> Hi Michael,
> I have read the documentation available at the Xalan's website and
> also its pointers to XSL/XSLT, XPath and JAXP. I have also run some
> samples and did some tracing by adding some prints into the code.
> It's quite clear for me how the things work, but I am not
> familiarized enough with the code.
> According to , the javax.xml.transform.stax was added to support
> StAX. This package consists of the interfaces: TemplatesHandler
> and TransformerHandler; and classes: StAXResult and StAXSource.
> Also, the packages javax.xml.stream, javax.xml.stream.events and
> javax.xml.stream.util were added to support StAX. In addition, the
> class Validator have also to accept StAXSource.
> For me, to add StAX support, it would be just implement the
> interfaces provided by these packages and plug them into the
> existent code. For example, in the
> org.apache.xalan.processor.TransformerFactoryImpl's method
> newTemplates(Source source), I would add a condition to test if the
> source is a StAX one and then create the correct TemplatesHandler
> instance, that will create the Templates object.
> I don't know exactly how prepared is Xalan to receive these changes.
> I need help to understand the project's structure. Then I will be
> able to do the work of the 2 next weeks (as provided in the plan):
> define precisely the changes I will do.
>  http://docs.oracle.com/javase/6/docs/technotes/guides/xml/jaxp/
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org