[xsl] Problem using xsl:if to skip a node in a repeating area

Subject: [xsl] Problem using xsl:if to skip a node in a repeating area
From: Sean Gallagher <sean@xxxxxxxxxx>
Date: Wed, 14 Dec 2005 22:41:02 -0500
I'm trying to use XSL to render an RSS feed in such a way as to skip items whose titles start with the text "ADV". But, admittedly, I'm an XPath noob, and the code is not working.

I'm using the following, within <xsl:template>:

<xsl:variable name='adstring' select='ADV' />
<xsl:variable name='checkti' select='{title}' />
<xsl:if test="not(starts-with($checkti,$adstring))">
<li><a href='{link}'><xsl:value-of select="title"/></a></li>
</xsl:if>


I get an error that says the xsl is not a valid xslt doc, with an "InnerException" (I'm using the .NET XSLT component and C# to do the transformation).


Help?



Sean Gallagher

Current Thread