[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] search against index


Subject: RE: [xsl] search against index
From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx>
Date: Thu, 7 Aug 2003 15:56:02 +0100

> if $string = "another"
> 
> this returns the second index node, if $string  = "another + here"
> 
> then it still returns the second index node, if $string = "string +
> here" it returns both nodes.

[snip]

> <xsl:apply-templates select="index[contains(@value,$string)]"/>

Is it possible that you could write a stylesheet to create a stylesheet
that has the select patterns that you need?

So your first stylesheet would accept the string "string + here",
tokenize it, and then generate the stylesheet with the correct select
statements:

<xsl:apply-templates
select="index[contain(@value,$token1)][contains(@value,$token2)]"/>

...and so on.

Cheers
andrew

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread