Thanks Tman, you're right it can't be done as I was trying to do it.
I found the solution in microsoft.public.xsl
The answer was to use <xsl:key>
Cheers
"tMan" <anonymous@discussions.microsoft.com> wrote in message
news:9B8A7EBD-CAB9-4BE5-976C-85778757CD43@microsoft.com...[color=blue]
> i don't think you can do that in XPath 1.0. you might have to look for[/color]
some extensions.[color=blue]
>
http://www.dpawson.co.uk/xsl/sect2/nono.html#d1761e34
>
>
http://www.exslt.org/dyn/functions/evaluate/index.html
>
> ----- Joe Gass wrote: -----
>
> After a bit of research I think what I'm trying to do with xslt can't[/color]
be[color=blue]
> done, but someone may have some pointers.
>
> I have 2 sections in my xml - 1 with properties the 2nd with image[/color]
path data[color=blue]
> 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[/color]
I[color=blue]
> 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>
> ....
>[/color]
</property><images><uniquereferenceid>1a</uniquereferenceid><imageurl>http:/
/www.com/testimage1.jpg</imageurl></images><images><id>636</id><uniquerefere
nceid>2a</uniquereferenceid><imageurl>http://www.com/testimage2.jpg</imageur
l></images><web_transfer>[color=blue]
>
> 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[/color]
select="web_transfer/property"><xsl:variable name="myString1"><xsl:value-of[color=blue]
>[/color]
select="/web_transfer/images[uniquereferenceid=uniquereferenceid][position()[color=blue]
> =1]/imageurl"/></xsl:variable><image1><xsl:value-of[/color]
select="$myString1"/></image1></xsl:for-each></xsl:template>[color=blue]
>
> Hoping that the bit [uniquereferenceid=uniquereferenceid] would get[/color]
filled[color=blue]
> in to be [uniquereferenceid=1a] etc
> It isn't and I don't get any data back
>
> Any suggestions appreciatted
> Thanks
>
>
>[/color]