Re: [xsl] Breaking up a large XML document into several smaller ones

Subject: Re: [xsl] Breaking up a large XML document into several smaller ones
From: Eliot Kimber <ekimber@xxxxxxxxxxxx>
Date: Fri, 11 Jan 2008 08:59:57 -0600
Glen Mazza wrote:
Hello,

I searched the XSLT FAQ and could not find an answer to this.  If only
for proof-of-concept (we may find better solutions not needing this),
I am interested in breaking up a very large XML document into multiple
smaller ones, and was wondering if XSLT would be a good solution for
this.  For example, if I have the following:


Can this be done via XSLT, or would a SAX-based solution be more
appropriate, or?

It can, using XSLT 2's result-document instruction (this requires a proprietary extension in XSLT 1).


The main issue would be the size of the input documents--XSLT processing is usually more memory constrained than SAX processing.

Also, a SAX processor would probably be more efficient if processing speed is a concern.

Otherwise, with XSLT 2 this is just a generic identity transforms augmented with templates for the elements that should result in new documents and, probably, a function for constructing result filenames.

Cheers,

Eliot
--
Eliot Kimber
Senior Solutions Architect
"Bringing Strategy, Content, and Technology Together"
Main: 610.631.6770
www.reallysi.com
www.rsuitecms.com

Current Thread