RE: [xsl] Selecting lots of nodes with lots of criteria

Subject: RE: [xsl] Selecting lots of nodes with lots of criteria
From: "Fabien Tillier" <f.tillier@xxxxxxxx>
Date: Mon, 6 Sep 2010 09:42:51 +0200
Hi Ken.
Thanks for the explanations. I will have a look at your site to get the full
picture.

Regards,
Fabien


-----Message d'origine-----
De : G. Ken Holman [mailto:gkholman@xxxxxxxxxxxxxxxxxxxx]
Envoyi : jeudi 2 septembre 2010 18:35
@ : xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Objet : RE: [xsl] Selecting lots of nodes with lots of criteria

At 2010-09-02 18:30 +0200, Fabien Tillier wrote:
>Is this like an Index on a table ?

More like a lookup table of nodes.  The match=
specifies the node in one column (say "left
column"), and the use= specifies the lookup value
in another column (say "right column").

One then uses key() to return all nodes from the
left column whose corresponding lookup value is
the right column is the second argument of the function call.

There are drawings on this page that may help:

   http://www.CraneSoftwrights.com/resources/xslkeys/index.htm

I hope this helps.

. . . . . . . . Ken

>-----Message d'origine-----
>De : Martin Honnen [mailto:Martin.Honnen@xxxxxx]
>Envoyi : jeudi 2 septembre 2010 17:38
>@ : xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>Objet : Re: [xsl] Selecting lots of nodes with lots of criteria
>
>Fabien Tillier wrote:
>
> > select="//Row[NUMERO = (1, 2, 3, 4, 5, 6, 7, 8)]"
> > is working !!!! (and a lot more faster...)
>
>If speed matters you could of course define a key
>    <xsl:key name="k1" match="Row" use="NUMERO"/>
>and then use
>    select="key('k1', (1, 2, 3, 4, 5, 6, 7, 8))"


--
XSLT/XQuery training:   after http://XMLPrague.cz 2011-03-28/04-01
Vote for your XML training:   http://www.CraneSoftwrights.com/s/i/
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

Current Thread