I have completly integrated the adapter I have developed.
Now, we are able to supply a StAXSource when creating the transformer as well as when doing the transformation:

        Transformer transformer = TransformerFactory.newInstance().newTransformer(new StAXSource(..));

        transformer.transform(new StAXSource(..), new StreamResult(..));

 You can find attached the code patch and a modified version of the SimpleTransform example that I am using for testing purposes.



As I said, I was in a exchange year in France.
Tomorrow I am going back to Brazil and I will be unavailable until the beginning of next week.
After, I am gonna keep working and implement the StAXResult support.


2013/8/2 Samuel Medeiros <>

I just submitted my midterm evaluation.
Now I am gonna keep working and I will tell you once I have news.


2013/7/30 Samuel Medeiros <>

I started the integration of the code I have developed and, by now, we are able to create a transformer by loading the .xsl file into a StAXSource instance. For example:

    TransformerFactory tFactory = TransformerFactory.newInstance();

    StAXSource source = null;
    try {
        source = new StAXSource(XMLInputFactory.newInstance()
                        new FileInputStream("src/SimpleTransform/birds.xsl")));
    } catch (XMLStreamException e) {
    } catch (FactoryConfigurationError e) {
    Transformer transformer = tFactory.newTransformer(source);

The patch is attached. Some changes were necessary in dependencies:
  • In .classpath, the execution environment needed to be updated from J2SE-1.3 to J2SE-1.5, for Generics supporting;
  • The xml-apis.jar needed to be updated. I downloaded the latest xml-commons version available at [1] and extracted it.

The next steps are:
  • Rethrow possible exceptions when handling StAXSource with properly messages (XSLMessages.createMessage(...));
  • Integrate StAXSource into the Transformer, allowing to call it like:
    transformer.transform(new StAXSource(...), new StreamResult(...));

This week we have to submit the midterm evaluations.
I am gonna prepare and submit it until tomorrow. I will let you know when it's done.


2013/7/22 Michael Glavassevich <>
Hi Samuel,

Samuel Medeiros <> wrote on 07/21/2013 06:51:31 PM:

> Hi,
> I have tested the adapter with the Woodstox' StAX implementation.
> I got the 'endPrefixMapping' events, as expected. Thus, it is a
> possible bug in the built-in java implementation. I am using java 7
update 15.
> How should we proceed to report this?

You can submit bugs against the JDK here [1]. Good news that Woodstox
works though. Many Apache projects rely on Woodstox instead of the JDK
built-in StAX implementation.

> --
> This week I am gonna integrate the work I have done into Xalan and
> study the possibility to use the same approach (an adaptor) to
> provide StAXResult support.

Thanks again for the update.

> Thanks,
> Samuel


> --
> Samuel de Medeiros Queiroz
> Formal Methods Group (GMF - UFCG - Brazil)



Michael Glavassevich
XML Technologies and WAS Development
IBM Toronto Lab

To unsubscribe, e-mail:
For additional commands, e-mail:

Samuel de Medeiros Queiroz
Formal Methods Group (GMF - UFCG - Brazil)