I don't undestand all detail you are talking about, but the right way is
to select desired value into xsl:variable, of course. Example follows:
<data>
<values>
<test id=1 name='one'/>
<test id=2 name='two'/>
</values>
<index>
<id>1</id>
</index>
</data>
...
<xsl:template match='data'>
<xsl:vaiable name='id'><xsl:value-of select='index/id'></xsl:vaiable>
<xsl:value-of select='values/test[@id=$id]/@name'/>
</xsl:template>
HTH
Pavel
Thomas Bopp wrote:
>
> Hello!
>
> Thanx for your answer.
>
> Pavel Hlavnicka wrote:
>
>>1. what happened to <bla> in your XPath expression?
>>2. note that expressin in [] is evaluated in the context of code/test
>>element
>>3. see attached example
>>
> I just made up that example. I encountered that problem several times
> now.
> Number 2 seems to be the problem for me - I wasnt aware of that. I think
> it
> also is still a problem for me, event though my example does work with
> your
> solution:
> When my select goes to a completely different part of the tree, like
> the 'id' I want to select is where I am at the moment, but the select
> would be like ../../../somewhere/else. In that case I would completely
> loose
> the context, right ? Right now I did a call-template with
> <xsl:param name="id"><xsl:value-of select="id"></xsl:param>
> which works of course...
> Any other way to solve this ?
>
> Thanx,
>
> ---Thomas
>
--
Pavel Hlavnicka
Ginger Alliance
www.gingerall.com