[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
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|