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

Need help on that tricky selection

Subject: Need help on that tricky selection
From: Christoph Wieseke <virtualize@xxxxxxx>
Date: Tue, 25 May 2004 21:10:08 +0200
christoph wieseke
hi everybody,

i'm working on that for days, but didn't find a solution yet,
maybe some can help me on that tricky thing.

got the follwoing xml:

<lines>
	<hst_list>
		<hst index="1">1031501</hst>
		<hst index="2">1031401</hst>
		<hst index="3">1031301</hst>
		<!-- followed by another 20-->
	</hst_list>
	<orte>
		<ort>
			<ort_nr>1031501</ort_nr>
			<ort_name>HBF Gleis 1</ort_name>
			<ort_dr_name>Hauptbahnhof, Gleis 1</ort_dr_name>
			<ort_pos_x>4526402</ort_pos_x>
			<ort_pos_y>5689992</ort_pos_y>
		</ort>
		<ort>
			<ort_nr>1031401</ort_nr>
			<ort_name>TOKI</ort_name>
			<ort_dr_name>Thomaskirche</ort_dr_name>
			<ort_pos_x>4526402</ort_pos_x>
			<ort_pos_y>5689992</ort_pos_y>
		</ort>
		<!-- followed by another 3000-->
	</orte>
<lines>


as you can maybe see, every <hst> element belongs to a <ort> element and can be identified by its <ort_nr>

what i want to do is: select all the <ort> elements, complete
with all their childs, where the <hst> is equal to the <ort_nr>
and throw the rest away.

one problem is, that i need exactly the order which is given
within the <hst_list> (the index attribute)
the other problem may be the performance, because it's possible
that this xml contains  about 3-5 thousend of <ort> elements

so far i tried lots of different approaches, with
<xsl:if> , <xsl:for-each> and variables, but can't get even
near a solution.

normally i would just put it all in a database and ask my
best friend sql, but its not possible here.


thanks fo taking trouble Christoph Wieseke

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.