|
-
Oct 21st, 2005, 01:11 PM
#1
Thread Starter
Hyperactive Member
XSL First Item
I'm only new to xml and haven't found any very good sites with help on it, and I have the following xsl code:
VB Code:
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="iso-8859-1" omit-xml-declaration="yes" indent="yes"/>
<xsl:template match="*">
<table border="1" width="600" align="center">
<xsl:for-each select="//*[local-name()='item']">
<tr>
<td>
<xsl:value-of select="*[local-name()='title']" disable-output-escaping="yes"/>
</td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
which all works fine. What I want to do though is to just get the first item from the list. How do I do this?
Thanks.
ASP, PHP, VB, JavaScript, CSS, HTML, a little C and a little CGI.
Richard Whitehouse.
Join the Footie Predictions League
"Make it idiot proof and someone will make a better idiot."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|