|
[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: dynamic selection of elements
Subject: Re: dynamic selection of elements
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Tue, 27 Aug 2002 22:32:47 +0200
|
Michael Zehrer wrote:
Hi list,
I have a performance problem with xalan:evaluate, first the scenario:
<somegeneratedxml>
<wishlist>
<item id="length">
<item id="weight">
<item id="speed">
</wishlist>
<data>
<item>
<length>100</length>
<height>100</height>
<weight>100</weight>
<color>red</color>
<speed>100</speed>
</item>
...
the wishlist items are dynamic and represent the set of data that I want to pick from each item in the data set, so I constructed for each wishlist/item a path with xalan:evaluate, which selects the elements from each data/item, but this is very slow. A better idea anyone?
Try
<xsl:key name="pick-ip" match="*" use="name()"/>
...
<xsl:template match="item">
<xsl:apply-templates selec="key('pick-it',@id)"/>
...
This can be extended to slightly more complicated cases.
HTH
J.Pietschmann
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
| RSS 2.0 |
|
| Atom 0.3 |
|
|