[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Running the same transformation on many input file

Subject: Re: Running the same transformation on many input files, optimisation possible?
From: "Graydon graydon@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 15 Dec 2019 17:37:11 -0000
Re:  Running the same transformation on many input file
On Sun, Dec 15, 2019 at 09:03:01AM -0000, Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx scripsit:
> Our processor of choice is Saxon (currently we are using 8.7.3) so I can

Why are you using something that old?  (It's not quite like saying "we
use K&R C!" but it's heading there.)

[snip]
> is there a mechanism which would allow a single Java process to
> perform the equivalent?

One approach to this problem is to use a single containing XSLT
transform which loads all the files (either via EXSLT file extensions or
via the collection() function) and processes them one at a time through
a series of variables, $pass1, $pass2, etc. using XSLT transforms with
modes firstPass, secondPass, etc. to create the variables.

This has the advantage of only needing to start one transformation, so a
single Java process; it does require you to use at least XSLT 2 to get
the "I can assign the result of apply-templates to a variable in this
useful way" functionality.

Especially if you might need to add more steps later, this kind of
chained processing is a useful design pattern for "I have a bunch of
source documents to be treated the same way" processing.

-- Graydon

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.