I have the following XML
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="example3.xsl"?>
<pics>
<page no="1">
<pic>
<td>
<no src="http://www.templetons.com/brad/pq/playaphone.jpg" width="150" height="120">1</no>
</td>
</pic>
<pic>
<td>
<no src="http://motherjones.com/files/legacy/mojoblog/funny-cats-a10.jpg" width="150" height="120">4</no>
</td>
</pic>
</page>
<page no="2">
<pic>
<td>
<no src="http://motherjones.com/files/legacy/mojoblog/funny-cats-a10.jpg" width="150" height="120">4</no>
</td>
</pic>
<pic>
<td>
<no src="http://www.templetons.com/brad/pq/playaphone.jpg" width="150" height="120">1</no>
</td>
</pic>
</page>
</pics>
I want using XSL file select only one page This one gives me both:
<xsl:for-each select="pics/page/pic">
<tr>
<xsl:for-each select="td">
<td><img>
<xsl:attribute name="src">
<xsl:value-of select="no//@src"/>
</xsl:attribute>
<xsl:attribute name="width">
<xsl:value-of select="no//@width"/>
</xsl:attribute>
<xsl:attribute name="height">
<xsl:value-of select="no//@height"/>
</xsl:attribute>
</img></td>
</xsl:for-each>
</tr>
</xsl:for-each>
Where and how can I filter/select or address the no="x" attribute?
Thanks Asaf