Comparing Strings While Ignoring Letter Case --- XSLT concat() / FilterNodes()
Hi,
I have an interesting problem in a macro wherein I am building a search filter for use with ucomponents.xml:FilterNodes().
The filter variable I am bulding works great with the dropdowns but when I am searching properties for a text string, my routine will only return lettercase matches.
I am familiar with using the Exslt.ExsltStrings:lowercase() method, but because of how I am building this string using the concat function, I can force the original string to a given case but can't figure out how to do it on the property values with which I am comparing it inside the concat(). Here is the code (look for the "case-insensitve" comments):
<xsl:variable name="filteredResources"> <xsl:choose> <xsl:when test="normalize-space(concat($contains, $type, $usecase, $industry, $product))"> <root> <xsl:copy-of select="ucomponents.xml:FilterNodes($currentPage, concat(' ancestor-or-self::Home[@isDoc]//Resources[1][@isDoc]/ResourceType [@isDoc][not(umbracoNaviHide=1)]//* [@isDoc][not(umbracoNaviHide=1)] [(name()="LeadProtectedFile" and normalize-space(resourceFile)) or (name()="LeadProtectedVideo" and normalize-space(embedCode))]', $filter))"/> root> xsl:when> <xsl:otherwise> <root> <xsl:copy-of select="$currentPage/ancestor-or-self::Home[@isDoc]//Resources[1]/ResourceType [@isDoc][not(umbracoNaviHide=1)]//* [@isDoc][not(umbracoNaviHide=1)] [(name()="LeadProtectedFile" and normalize-space(resourceFile)) or (name()="LeadProtectedVideo" and normalize-space(embedCode))]"/> root> xsl:otherwise> xsl:choose> xsl:variable>
I have struggled mightily with this -- just don't know how I can call a function inside the concat with all of the single and double quotes already going on, it's confusing me!
Comparing Strings While Ignoring Letter Case --- XSLT concat() / FilterNodes()
Hi, I have an interesting problem in a macro wherein I am building a search filter for use with ucomponents.xml:FilterNodes().
The filter variable I am bulding works great with the dropdowns but when I am searching properties for a text string, my routine will only return lettercase matches. I am familiar with using the Exslt.ExsltStrings:lowercase() method, but because of how I am building this string using the concat function, I can force the original string to a given case but can't figure out how to do it on the property values with which I am comparing it inside the concat(). Here is the code (look for the "case-insensitve" comments):
I have struggled mightily with this -- just don't know how I can call a function inside the concat with all of the single and double quotes already going on, it's confusing me!
Thanks in advance,
Garrett
is working on a reply...