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

position() function problems on xalan

Subject: position() function problems on xalan
From: "Florin Dragu" <florin.dragu@xxxxxxxx>
Date: Wed, 22 May 2002 18:06:41 +0300
florin dragu
Hi *,
I used xalan 2.0.0 and I'm trying to upgrade to xalan 2.3.1 (or any version
bigger than 2.0.1 so that I can use XSLTC - translets), but I have problems
with some stylesheets because of some XPath changes.
I have a XML that looks like the one bellow and an xslt in which I am trying
to select, let's say, the third (absolute) 'call' element.
In xalan 2.0.0 I did it like this: //call[position() = $current_call], where
current_call = 3, and it selected the call element from '<calls
type="D2-CorporateLink" header="Verbindungen aus dem D2-Netz">'.
In xalan 2.3.1 if I do the same I get all the call elements (or if
'current_call=1' I get 3 call elements, the first from each calls sub-tree).
If I change this to "//call[(count(preceding::call) + 1) = $current_call]" I
get the call element I want, but for big XML files (about 500 call elements)
it takes a lot of time (more than 10 times the time with xalan 2.0.0).
Does anybody know a different approach/solution to this?

Any ideea is welcomed.
Thanks,
Florin

<?xml version="1.0" encoding="UTF-8"?>
<telcoCallList>
	<calls type="Anrufe zu Sonderrufnummern" header="Verbindungen aus dem
D2-Netz">
		<call>
			<netValue>14.53</netValue>
		</call>
		<call>
			<netValue>14.53</netValue>
		</call>
	</calls>
	<calls type="D2-CorporateLink" header="Verbindungen aus dem D2-Netz">
		<call>
			<netValue>14.53</netValue>
		</call>
	</calls>
	<calls type="Gespräche - D2 zu D2 gruppenintern" header="Verbindungen aus
dem D2-Netz">
		<call>
			<netValue>14.53</netValue>
		</call>
		<call>
			<netValue>14.53</netValue>
		</call>
	</calls>
</telcoCallList>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.