BAD MSG:
expressed in Perl, Python, some other transformation markup language etc. So
e need a map between how the transformation is expressed and the processor
that can execute the transform. In JDBC something vaguely similar is
achieved through a list of drivers and "does anyone understand this URL". I
guess I was thinking of a world where you do something like
TransformerFactory.register("com.mycomp.PerlTransformProcessor",
"com.mycomp.PerlSource") so that factory.newTransformer(myPerlSource) would
return a PerlTransformProcessor instance that could process PerlSource
instructions etc, but I'm hoping I've misunderstood or missed something. For
the transform() methods we've got implementations of
RelationalSource/Result, etc so we can use a TrAX style API to do a good
combination of transforms (with a processor that understands such
sources/results), and TrAX works pretty well here. It's just the processor
instantiation.Thanks, Richard > -----Original Message----- > From: Raber Chris [mailto:[EMAIL PROTECTED] > Sent: 06 December 2001 13:41 > To: Richard Cook; [EMAIL PROTECTED] > Subject: Re: trax > > > How about if you provide a trax wrapper to your > non-trax processor? The system property can be set to > ythe wrapper... > > GOF Adapter pattern... > > --- Richard Cook <[EMAIL PROTECTED]> wrote: > > Hello, > > > > According to the xalan docs, TrAX is independent of > > XSLT - ie not tied to > > only performing transformations using xslt. We have > > a processor which is > > indeed not XSLT, but we also need to support XSLT. > > With TrAX, the user calls > > TransformerFactory.newInstance(), which uses a > > system property > > javax.xml.transform.TransformerFactory to determine > > which concrete class to > > instantiate. > > > > The problem is that subsequently from this piece of > > code: > > > > Transformer transformer = > > factory.newTransformer(Source) > > > > We want: > > If the Source is an XSLT stylesheet, to use an > > XSLT processor (xalan etc) > > If the Source specifies instructions our processor > > handles, we want to use > > our processor. > > > > We have an implementation of Source which specifies > > the location of our > > instructions, so distinguishing from StreamSource > > etc is no problem at this > > level. > > > > But the single system property which determines > > which TransformerFactory > > implementation means that if we use our > > implementation, we don't know which > > XSLT processor the user wants. > > > > Does that make sense? > > > > Options we have: > > Use TransformerFactory.newInstance() for XSLT, use > > normal constructor for > > our processor > > TransformerFactory.newInstance() returns our > > implementation, we define our > > own system property for the XSLT implementation. > > This would mean that people > > using the default processor rather than the system > > property would presumably > > find their code stops working. > > > > > > > > (Apologies that this is not xalan specific, is there > > a better place to ask > > the question?). > > > > Thanks, Rich > > > > > __________________________________________________ > Do You Yahoo!? > Send your FREE holiday greetings online! > http://greetings.yahoo.com >
