xsl-list
[Top] [All Lists]

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

2019-04-09 02:02:47
Am 09.04.2019 um 06:06 schrieb Mukul Gandhi 
gandhi(_dot_)mukul(_at_)gmail(_dot_)com:


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 https://github.com/mukulga/largexml_xslt10, 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.
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>