>Can someone out there help me or refer me any site to understand how 
SAX2SAX
>XML transformation works.
>
>I want to transform one large XML into multiple HTML files based on 
certain
>criteria specified in xsl file.

Officially, XSLT 1.0 can only produce one output document per stylesheet 
invocation, and the Xalan/TrAX APIs are built around that assumption. To 
get multiple documents out, you'd have to run multiple transformations. If 
you construct a SAXSource and a SAXResult and pass those to our APIs, data 
will be read from the former and written to the latter.

HOWEVER: Xalan *does* have a "redirect" extension, which allows us to 
generate multiple output documents from a single stylesheet execution. But 
as currently written, I believe that extension writes to file streams, not 
to SAX listeners. You could probably alter that code to produce a custom 
extension which includes methods to hook up to your additional SAX 
handlers and send the data to that; I haven't checked the code to see how 
hard or easy that would be.

XSLT 2.0 will officially support something very much like the redirect 
extension. But I don't think anyone yet knows whether/how it would be able 
to redirect to multiple SAX listeners. I expect the answer will still be 
that you'd need to use an extension to do this.

______________________________________
Joe Kesselman  / IBM Research

Reply via email to