|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] position() function problems on xalan
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








