xsl-list
[Top] [All Lists]

RE: search against index

2003-08-07 07:56:02

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



<Prev in Thread] Current Thread [Next in Thread>