cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary L Peskin <ga...@firstech.com>
Subject Re: [XalanJ2][C2] javax.xml.tranform API
Date Fri, 10 Nov 2000 16:25:51 GMT
Davanum Srinivas wrote:
> 
> Gary,
> The newTransformerHandler/SAXResult combination worked. The XMLFilter code for replacing
> TRaXFilter didn't. So changed our sources to use the newTransformerHandler/SAXResult
combination
> and cleaned up references to org.apache.xalan in C2.
> 
> Thanks,
> dims
> --- Gary L Peskin <garyp@firstech.com> wrote:
> > > Problem #1: We need an explicit import of "org.apache.xalan.transformer.TrAXFilter"
as we cache
> > > templates and need to get an XMLFilter to work with in our code. We do this
as follows:
> > >
> > >     public XMLFilter getXMLFilter() throws TransformerConfigurationException
> > >     {
> > >        return new TrAXFilter(templates);
> > >     }
> >
> > My first answer here was obviously totally wrong.  I think you could
> > implement this with cached templates like this:
> >
> >   private SAXTransformerFactory transformerFactory =
> >                  (SAXTransformerFactory)
> > TransformerFactory.newInstance();
> >
> >   public XMLFilter getXMLFilter() throws
> > TransformerConfigurationException
> >   {
> >     XMLFilter retFilter = new XMLFilterImpl();
> >     TransformerHandler th =
> > transformerFactory.newTransformerHandler(templates);
> >     retFilter.setContentHandler(th);
> >     return retFilter;
> >   }

Dims --

What about this didn't work?  If you have time, I'd like to work through
it with you to see if we can figure out the problem.  That way, cocoon
could use straight javax.xml.transform and SAX capabilities without
being dependent on Xalan.  And we could uncover any problems with the
Xalan javax.xml.transform capabilities sooner rather than later.

Gary

Mime
View raw message