Hi! I am new to XSLT and am using Dreamweaver to generate this code, which works great, except that I need to limit the number of records pulled from an RSS feed to 6. Can you tell me how/where in the code to do this? Any help greatly appreciated.
Code:
<?xml version="1.0" encoding="utf-8"?><!-- DWXMLSource="http://live.psu.edu/tagrss/Research" --><!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp " ">
<!ENTITY copy "©">
<!ENTITY reg "®">
<!ENTITY trade "™">
<!ENTITY mdash "—">
<!ENTITY ldquo "“">
<!ENTITY rdquo "”">
<!ENTITY pound "£">
<!ENTITY yen "Â¥">
<!ENTITY euro "€">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8"/>
<xsl:template match="/"><style type="text/css">
<xsl:comment>
.rss_title {
font: bold 100% Arial, Helvetica, sans-serif;
}
.rss_description {
font: 90% Arial, Helvetica, sans-serif;
}
.rss_link {
font: 80% Arial, Helvetica, sans-serif;
text-decoration: none;
}
</xsl:comment>
</style>
<xsl:for-each select="rss/channel/item">
<span class="rss_title"><xsl:value-of select="title"/></span><br />
<span class="rss_description"><xsl:value-of select="description" disable-output-escaping="yes"/></span>
<a href="{../link}" target="_blank" class="rss_link">Read on...<br />
<br />
</a>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>