Subject: Re: [xsl] Speeding up processing (with sablotron or saxon) From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Tue, 13 Jul 2004 11:33:19 -0400 |
So I'd replace the:- <xsl:for-each select=".//resource[not(@swgcraft_id=preceding::*/@swgcraft_id)]">
with
<xsl:key name="resource-by-id" match="resource" use="@swgcraft_id"/> <xsl:variable name="resources" select="//resource"/> <xsl:variable name="unique-resources" select="$resources[not(count(.|key('resources-by-id',@swgcraft_id)[1]) = 1)]"/>
but I guess I still need some form of for-each statement too?
<xsl:variable name="unique-resources" select="$resources[not(count(.|key('resources-by-id',@swgcraft_id)[1]) = 1)]"/>
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Speeding up processing (w, TDarksword | Thread | Re: [xsl] Speeding up processing (w, TDarksword |
Re: [xsl] Using keys in templates, M. David Peterson | Date | Re: [xsl] implement attribute inher, Emmanouil Batsis |
Month |