I am trying select the value of 'attrvalue' for each 'Doc' in <Docs> context and I get it's value, instead I need it's reference value from <attr attrid='xyz1'> which is in different context. Is this feasible?
Subject:context to context reference Author:(Deleted User) Date:27 Nov 2005 08:30 PM
Phani,
I don't know exactly what your program looks like, but here is an example.
<output>
{
/root/Docs/Doc[1]/attrvalue,
let $val := /root/Docs/Doc[1]/attrvalue/text()
return /root/DocDefinitions/AttrDefinition/attr[@attrid=$val]/value
}
</output>
The first line "/root/Docs/Doc[1]/attrvalue returns the string "xyz2"
The return statement uses that string to lookup the desired data and returns "XSL"