[Home] [By Thread] [By Date] [Recent Entries]
Hi Bob,
It'd be informative to know what you mean with "doesn't work". Do you mean that there's no match? Or do you mean that the result is different than from what you expected? The expression //title will retrieve all the title nodes. Unless all these titles together match your $matcher, you will have a true match (and I think this depends on the XSLT version you use, because in XSLT 1, I think $matcher contains a result tree fragment, which will not match). If what you are after is that the text of the titles should be matched against $matcher, you may try the following:. <xsl:if test="//title[. = $matcher]"> ... </xsl:if> In which case the test will be true if at least one of the title tags contains the text in $matcher. Perhaps this is even better <xsl:if test="//title[normalize-space(.) = normalize-space($matcher)]"> ... </xsl:if> Hope this helps, Cheers, Abel Braaksma http://abelleba.metacarpus.com Bob Portnell wrote: (Another baby question, but at least it's on-topic)
|

Cart



