Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Replace attribute value >Thread Next - Re: Replace attribute value Re: Replace attribute valueTo: NULL Date: 2/8/2008 3:26:00 PM There is an error on "xsl:template" (<xsl:template match="User/@advancedViewing[translate(., $ul, $ll) = 'vrai']">) "Variables cannot be used within this expression" "Martin Honnen" <mahotrash@y...> wrote in message news:uMOUUplaIHA.1208@T...... > Olivier MATROT wrote: > >> Is there a way to lower case the attribute value before trying to match >> with the constant ? > > It is a bit complicated in XPath 1.0 but possible: > >>> <xsl:template match="User/@advancedViewing[. = 'VRAI']"> > > <xsl:param name="ul" > select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/> > <xsl:param name="ll" > select="'abcdefghijklmnopqrstuvwxyz'"/> > > <xsl:template match="User/@advancedViewing[translate(., $ul, $ll) = > 'vrai']"> > > > -- > > Martin Honnen --- MVP XML > http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
