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

Optimising multiple document() calls

Subject: Optimising multiple document() calls
From: "Hondros, Constantine" <Constantine.Hondros@xxxxxxxxxxxxxxxx>
Date: Mon, 11 Jul 2005 10:43:31 +0200
saxon optimise document function
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:

	<xsl:template match="table-inclusion">
		<!-- Do some cunning index/key lookup to get the inclusion's
path (not shown) -->	
		<xsl:apply-templates
select="document($inclusionpath)//incltable" />
	</xsl:template>

This node-set returned by document() then gets normalised by a general
template rule:

	<xsl:template match="@*|node()">
	  <xsl:copy>
		<xsl:apply-templates select="@*|node()"/>
	  </xsl:copy>
	</xsl:template>

The problem is, this runs so slowly that it is jeopardising the whole
processing pipeline. Some of the documents have five or six inclusions that
have to be processed, and since the inclusions themselves are not massive,
I'm assuming that the log-jam is in how I am pulling in the inclusions (ie.
the document() function).

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
enough).

Thanks in advance.


-- 
The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it. 

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.