I have an xml document like this:
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<testimonials>
<item>
<description>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus non libero eu tellus pellentesque ...</description>
<returndate>11/3/2009</returndate>
<lastBuildDate>Wed, 27 Jan 2010 12:43:00 GMT</lastBuildDate>
<language>en-us</language>
<guid>1</guid>
</item>
<item>
<description>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ut velit neque, ut tempus erat. ...</description>
<returndate>11/2/2009</returndate>
<lastBuildDate>Wed, 27 Jan 2010 12:43:00 GMT</lastBuildDate>
<language>en-us</language>
<guid>2</guid>
</item>
<item>
<description>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam a venenatis massa. Donec mauris nibh, ...</description>
<returndate>10/23/2009</returndate>
<lastBuildDate>Wed, 27 Jan 2010 12:43:00 GMT</lastBuildDate>
<language>en-us</language>
<guid>3</guid>
</item>
<testimonials>
And XSLT like this:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/testimonials/item[1]">
<p class="Normal">
<xsl:value-of select="description"/>
</p>
<p class="Normal Normal_em">
- <xsl:value-of select="returndate"/>
</p>
</xsl:template>
</xsl:stylesheet>
But for some reasion, even though I only ask for the first match in the XML, the rest of the XML contents are still rendered to the page. However, the translation only happens to the first match.
Note that although I tried /testimonials/item[1] in my example, I have also tried /testimonials/item[position() = '1']