xsl-list
[Top] [All Lists]

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

2005-12-15 07:00:37

On Dec 15, 2005, at 1:43 AM, Ragulf Pickaxe wrote:

Hi Sean,

<xsl:variable name='checkti' select='{title}' />

The variable should not have curly brackets in its select.
<xsl:variable name='checkti' select='title' />

Thanks, Ragulf. I caught that as I was going back through it. But it's still not working.

Here's the full xslt fragment:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE xsl:stylesheet  [
        <!ENTITY nbsp   "&#160;">
        <!ENTITY copy   "&#169;">
        <!ENTITY reg    "&#174;">
        <!ENTITY trade  "&#8482;">
        <!ENTITY mdash  "&#8212;">
        <!ENTITY ldquo  "&#8220;">
        <!ENTITY rdquo  "&#8221;">
        <!ENTITY pound  "&#163;">
        <!ENTITY yen    "&#165;">
        <!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/ Transform">
<xsl:output method="html" encoding="ISO-8859-1"/>
<xsl:param name="ItemsPerPage" select="4" />
<xsl:template match="/">
<xsl:for-each select="rss/channel/item[position() &lt;= $ItemsPerPage]">
<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>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

I'm still getting an unspecified error .

<xsl

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--