[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl search engine
Hello ! I have made a kind of search engine with asp and xsl. It actually search a string in an XML document. The XML document looks like this : <LIST> <THEME label="blablabla"> <THEME label="blillihblai"> <THEME label="bloblobnlo"> <THEME label="blublublulub"> </LIST> The search engine only search on the labels attribute of the THEME nodes of this xml document. I only need this for the moment. To do it I use an HTML form in which the user write a string to search. Then an asp page get this string and send it to the xsl as parameter. The xsl then only matches the THEME nodes which contains the given string in his label attributes : <xsl:param name="string"/> <xsl:template match="LIST"> <xsl:for-each select="THEME[contains(@label,$string)]"> <xsl:value-of select="@label"/><br/> <xsl:for-each/> </xsl:template> So the problem is that this engine is not really performant : if as user i search "Bla" it won't find it because of the case "B" instead of "b". Is it possible to say IgnoreCase in xsl ? The other (bigger) problem is that if the user write many words (with spaces in between) "bla blo", the it will looks for this exact string whereas i'd like it to search for bla OR blo. Is there a way to make it in xsl ? a special function ? 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 ? XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|