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

Re: Optimization using keys

Subject: Re: Optimization using keys
From: António Mota <amsmota@xxxxxxxxx>
Date: Wed, 16 Feb 2005 19:53:30 +0000
ant nio mota
Curiosly i just did that, in part beacuse i remembered another xslt
where i did that per your sugestion... It improves a little, specially
when running on IDE (Xalan, Saxon653, Saxon81B) but in the browsers
(FF, IE) it improves just a little...

On Wed, 16 Feb 2005 19:47:59 -0000, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> Anything that processes each Menu element by counting how many preceding
> Menu elements there are is going to be slow, in fact it's going to vary as
> the square of the input document size.
> If your requirement is:
> Given a XML with nested Menu structures,
> i want to copy all the nodes to the output tree *except* the one that
> corresponds to the $pos position, wich i want to replace with the
> result from document.
> then what you should do is first identify the node at the Nth position, and
> then when you process each node, test whether it is that one.
> The node at the n'th position is (//Menu)[$pos]
> You can test whether node $A is the same node as $B in XPath 2.0 using ($A
> is $B). In 1.0 you can use generate-id($A)=generate-id($B), or
> count($A|$B)=1.
> Michael Kay
> http://www.saxonica.com/

Current Thread


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.
First Name
Last Name
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.