After a bit of research I think what I'm trying to do with xslt can't be
done, but someone may have some pointers.
I have 2 sections in my xml - 1 with properties the 2nd with image path data
each property can have more than 1 set of image path nodes
What I'm trying to do is transform the property data into the format I
require at the same time finding any associatted image paths
Here's my xml
<web_transfer>
<property>
<uniquereferenceid>1a</uniquereferenceid>
....
</property>
<property>
<uniquereferenceid>2a</uniquereferenceid>
....
</property>
<images>
<uniquereferenceid>1a</uniquereferenceid>
<imageurl>http://www.com/testimage1.jpg</imageurl>
</images>
<images>
<id>636</id>
<uniquereferenceid>2a</uniquereferenceid>
<imageurl>http://www.com/testimage2.jpg</imageurl>
</images>
<web_transfer>
An xpath like
/web_transfer/images[uniquereferenceid='1a'][position()=1]/imageurl
works fine, when used outside my xslt.
In my xslt
<xsl:template match="/">
<xsl:for-each select="web_transfer/property">
<xsl:variable name="myString1">
<xsl:value-of
select="/web_transfer/images[uniquereferenceid=uniquereferenceid][position()
=1]/imageurl"/>
</xsl:variable>
<image1>
<xsl:value-of select="$myString1"/>
</image1>
</xsl:for-each>
</xsl:template>
Hoping that the bit [uniquereferenceid=uniquereferenceid] would get filled
in to be [uniquereferenceid=1a] etc
It isn't and I don't get any data back
Any suggestions appreciatted
Thanks