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

Re: Optimising multiple document() calls

Subject: Re: Optimising multiple document() calls
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 11 Jul 2005 08:55:07 -0400
Re:  Optimising multiple document() calls
At 2005-07-11 11:43 +0200, Hondros, Constantine wrote:
I am pre-processing batches of about 1000 XML files at a time using Saxon.
Part of the pre-process involves aggregating linked XML documents into the
current document. Naturally, I use the document() function for this:
How would you optimise this? Would a deep-copy with <xsl:copy-of> be faster?
Or am I better off writing my own processor for this aggregating step (easy

Since the XSLT processor is obliged to keep all document() node trees around somehow (it doesn't know when you might need a given tree again in the transform and any generated identifiers for the nodes need to be persistent in the transform), I would recommend a simple SAX process for this kind of aggregation. Not only would it be faster (no building of the node tree), it would have a very small footprint (no persistence of any input documents).

Some XSLT processors will allow you to pass your output SAX events as input to an XSLT transform so in such a case you wouldn't even have the aggregated file sitting around to worry about.

I hope this helps.

. . . . . . . . . Ken

-- World-wide on-site corporate, govt. & user group XML/XSL training. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal

Current Thread


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.
First Name
Last Name
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.