RE: [xsl] xsl search engine

Subject: RE: [xsl] xsl search engine
From: "Ricaud Matthieu" <matthieu.ricaud@xxxxxxx>
Date: Tue, 9 Mar 2004 15:02:53 +0100
Thanks for your interrest Jarno.

>>No, you have to use an extension or use translate($text, 'ABCDEFG...',
'abcdefg...').

Yes but than bla would become BLA and while searchin for Bla, it won't find
it...
I would "simply" like BLA, bla, Bla, bLa, blA, bLA, etc. would all be
"equivalent".

>>A recursive template. Tokenize the query string, and test each token
individually.

I don't really see how to write this recursive template, can you explain
more.
I think the difficult thing will be to separate the string into many
substrings according to the "spaces" (n spaces ==> n+1 words)

	> PS : in my project, i generate the whole Path
	> "THEME[contains(@label,$string)]" with asp and this is the
	> string parameter
	> i send to the xsl and then i do : <xsl:for-each
	> select="dyn:evaluate(.,$string)"> (evaluate is a function from the dyn
	> namespace which calculate the xPath expression. Maybe i could make an
	> traitment direct in the aps page to do what i want ?

>>Umm... why don't you just use the expression
THEME[contains(@label,$string)] and pass query string in with $string? I
must >>be missing something here; wish I could say "Well, I am psychic, you
know" like she can.

Oups, yes there were an error in what I wrote. I actually generate
"THEME[contains(@label,"what_the_user_wrote")]" as string which is send as
$string parameter to the xsl. I do it because the user may also want to
search among only THEMES whose topic attribute is "Mathematics" for instance
or maybe all of them. The string I generate is than rather :
	 	THEME[contains(@label,"what_the_user_wrote") and @topic="Mathematic"]
or simply	THEME[contains(@label,"what_the_user_wrote")]

I must generate this before sending it to xsl because if I wrote :

<xsl:for-each select="THEME[contains(@label,$string)] and @topic=$string2">

then for $string2="" (nothing ==> that means EVERY topics), the xsl would
not match any THEME...






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


Current Thread