[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

Subject: Re: Problem using xsl:if to skip a node in a repeating area
From: Sean Gallagher <sean@xxxxxxxxxx>
Date: Thu, 15 Dec 2005 09:00:37 -0500
xsl skip
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.