i've just made up an example to illustrate what I will ask you:
=> Is it ok to create a variable, put data in it, and to manipulate the return of this variable the same way I would manipulate a path??
This code below ,
let $variable :=(for $pou in blabla/blabla
return (element thing {attribute status {data($pou/name)},
let $thing2 := for $z in $pou/bacon[@status="c"]
return element thing3 {data($z/code)} return($thing2) })) return()
would do something like
<thing>
<thing2><thing3></thing3>
</thing2>
</thing>
is it ok to access a tag present in the structure created previously with "$variable/thing2" ???
let $variable :=(for $pou in adress/blablalba/adresse/blabla/blabla
return (element thing {attribute status {data($pou/name)},
let $thing2 := for $z in $pou/bacon[@status="c"]
return element thing3 {data($z/code)} return($thing2) })) return($variable/thing2)
In my real project I created multiple variables that display correctly when I launch it, but when i try to access/refer to them it does not work, I start to believe than you cannot access what was just made inside a variable the same way? But i'm a bit stuck!
I hope you understand my problem, cause I admit it is really bad explained
Cheers