Re: [xsl] Transforming large XML documents with XSLT 1.0

Subject: Re: [xsl] Transforming large XML documents with XSLT 1.0
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 9 Apr 2019 07:02:42 -0000
Am 09.04.2019 um 06:06 schrieb Mukul Gandhi gandhi.mukul@xxxxxxxxx:

I've done some work, finding a method to transform with XSLT 1.0 very
large XML documents. The implementation language for this project is
java, and the XSLT 1.0 processor used is which is provided within the
java language.

The repository, contains
the source code for this along with related explanation.

Your subject and introduction seem to talk about a general approach to use XSLT 1 with very large documents but it seems the code you have in the repository assumes a certain XML document structure where your trigger elements as children of the root element are the only nodes the XSLT needs to transform, and all of them in an isolated way where the template for them does nothing but deal with the particular element and does not navigate to ancestors or siblings.

I am not deeply enough into the Java APIs, but wouldn't the same
approach work using SAX?

Also writing out the XML result's XML declaration and root element as
bytes to a stream seems awkward, isn't there a way to chain your Stax
StreamReader to a StreamWriter to simply write out XML with a dedicated
API ensuring well-formedness and encoding? In the .NET world you can do
that with XmlReader/XmlWriter.

Current Thread