i have an xml file with links to websites but my output only prints the
1st website from each tag - any ideas why?
i have an an xml file that looks sort of like this:
<?xml version="1.0" encoding="utf-8"?>
<site>
<category type='A'>
<link url="abc.com">abc</link>
</category>
<category type='B'>
<link url="abc1.com">abc1</link>
<link url="abc2.com">abc2</link>
<link url="abc3.com">abc3</link>
</category>
</site>
and my xsl looks like this
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="site//category">
<span>
<xsl:attribute name="class">footer</xsl:attribute>
<xsl:value-of select="@type" />
</span>
<a>
<xsl:attribute name="href"><xsl:value-of select="link"
/></xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:value-of select="link" />
</a>
</xsl:for-each>
<p></p>
</xsl:template>
</xsl:stylesheet>