This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: splitting one xml into many xml documents using xsl
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] splitting one xml into many xml documents using xsl
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Tue, 13 Mar 2001 10:29:40 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
> > What is a reasonable alternative, though, is to write a
> splitting SAX filter
> > to process the output: most Java processors will write output to a
> > user-supplied ContentHandler, and you can insert a
> processing instruction
> > into the event stream to cause this to switch output to a
> new destination.
>
> Would such a content handler be portable between various versions of
> Saxon, Xalan-1 and Xalan-2?
Yes, I would think so. In fact I think you can do this entirely within the
TrAX interface, so the whole application should be portable between Saxon
and Xalan: just wrap your SAX2 ContentHandler as a SAXResult and pass it as
the second argument of transform(source, result).
> Apart from this: How do i create directories in a java
> program without the
> additional pain of searching for apropriate libraries or
> resorting to JNI?
It's not difficult in JDK 1.2, though it's trickier with earlier versions.
You'll find code in the Saxon module com.icl.saxon.style.XSLDocument that
does it.
Mike Kay
Software AG
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list