This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Case sensitive filter


Hi

Two part question (I hope).

I have created a search engine for a site that passes the search string
through to an ASP page that passes it back into the xsl template as a
parameter. I then use this parameter to create a node set as sub set of
the main data set.

i.e. <xsl:variable name="searchNode"
select="msxsl:node-set(//resource//menu[contains(.,$prmSearch)] |
//resource[contains(notes,$prmSearch)])"/>

Which works to a certain extent, the problem is the old case sensitive
one. If the search string is in a menu node it would normally have the
first letter capitalised (or all of them) where as if it is in the notes
it may well be all lowercase and as a consequence not all results are
being returned. I have had a look at the translate function but am
unsure how/if to use it in this scenario.

Part two:
Part of the site "security" is to only allow access to certain menu
options which works fine when I am creating the menu structure as I only
include those that have a certain string in the ID attribute, however
the search brings back results they should not be able to access, how
could I go about restricting the result set of $searchNode (see above)
so that only the eligible nodes are selected. In the menu creation I use
:
			<xsl:if test="contains(@id,$prmSecCat)" />
....</xsl:if>
To only display the correct menu options. How could I integrate the same
logic in the creation of the $searchNode variable

Thanks

Terry

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]