|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xsl:for-each efficiency
On Tuesday 16 Sep 2003 11:24, andrew.curry@xxxxxxxxxxxx wrote:
> Would there be a better way of doing:
>
> <xsl:for-each select="//element[@element-key = $id]">
> </xsl:for-each>
>
> for use over a very very large document?
Yes, use a key:
<xsl:key name="byId" match="element" use="@element-key"/>
...
<xsl:apply-templates select="key('byId',$id)"/>
Tom SW
--
"The facts are hideous, but we must face them" - Bertie Wooster
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








