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

Search for efficiency...(building nodes dynamically)

Subject: Search for efficiency...(building nodes dynamically)
From: "Ahsan Ali" <doubleletter@xxxxxxxxx>
Date: Thu, 2 Mar 2006 18:36:43 +0400
efficiency search
Hi all,

I have an XML file of 6588 Airport elements as follows:

<apt code="AAF" city="Apalachicola" country="United States"
state="FL">Municipal Apt.</apt>
....

In an XSLT program, I am processing yet another XML document that has
the following format:

<availabilitytable>
	<avail>
		<origin>XYZ</origin>
		<destination>XYZ</destination>
	</avail>

	<avail>
		<origin>XYZ</origin>
		<destination>XYZ</destination>
	</avail>
</availabilitytable>

These are an approx of 15-20 'avail' elements.

The problem: I have written the XSL sheet in such a way that for every
'origin' and 'destination' element, the
<apt> nodeset is traversed to get the airport name of a given code.

Therefore, if there are duplicate origins/destinations (which is very
probable in my case) there will be unnecessary multiple traversals.

So I thought of building a nodeset of all origins/destinations,
removing duplicates, and then looking up the <apt> file.

The Question(s): Since I will need the result node later on in the XSL
file, where do I store it ? And how do I build a result node like this
? If this is not feasible, what is the best method to avoid multiple
traversals of such a large tree ?

Any help is appreciated,

Regards,

Ahsan

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.