I got really close this time ;)
Bellow there is :
- my xsl script
my xml file (that calls the script)
the output of the manipulation of the xsl on the xml (as shuold be)
My problem is that while the href and src value should be the same there is always one picture diff between them(pic3 and pic4) as though I'm calling the next pic element... yet I dont understand where I do that?
<xsl:for-each select="data/pics/pic">
<div>
<a>
<xsl:attribute name="href">
<xsl:value-of select="@href" />
</xsl:attribute>
<img>
<xsl:attribute name="src">
<xsl:value-of select="@src" />
</xsl:attribute>
</img>
</a>
</div>
</xsl:for-each>
And this is my xml
<data>
<pics>
<pic href="pics\pic05.jpg" src="pics\pic05.jpg"></pic>
<pic href="pics\pic04.jpg" src="pics\pic04.jpg"></pic>
<pic href="pics\pic03.jpg" src="pics\pic03.jpg"></pic>
<pic href="pics\pic02.jpg" src="pics\pic02.jpg"></pic>
<pic href="pics\pic01.jpg" src="pics\pic01.jpg"></pic>
</pics>
</data>
this should be the output:
<div>
<a href="pics\pic01.jpg">
<img src="pics\pic01.jpg">
</a>
</div>
<div>
<a href="pics\pic02.jpg">
<img src="pics\pic02.jpg">
</a>
</div>
<div>
<a href="pics\pic03.jpg">
<img src="pics\pic03.jpg">
</a>
</div>
<div>
<a href="pics\pic04.jpg">
<img src="pics\pic04.jpg">
</a>
</div>
<div>
<a href="pics\pic05.jpg">
<img src="pics\pic05.jpg">
</a>
</div>