Hello there,
I am not really sure if the following is an issue or just a lack of understanding on my side. I have two documents and try to find elements from one based on (attribute-stored) constraints given in the other. A basic example structure looks as follows:
<commands> <create-db name='test1'/> <add path='doc_a'><a><a1 id='1'/><b1 ref='1'/></a></add> <add path='doc_b'><b><b1 ref='1'/></b></add> </commands>
Queries: //a1[@id=//a/b1/@ref] => 1 hit
//a1[@id=//b/b1/@ref] => no hits?
When putting the nodes in one and the same document (adding a common parental node), either query returns 1 hit:
<commands> <create-db name='test2'/> <add path='doc'><any><a><a1 id='1'/><b1 ref='1'/></a><b><b1 ref='1'/></b></any></add> </commands>
What I would have expected is 1 hit in any of the cases, but finding the correct context in predicate expressions confused me more than one time...
Regards, Simon (BaseX Version is 7.8 beta 8f51466)