I have noticed that while the preceding query works fine, if I substitute all the elements in it (e.g, <s>{$a/s/data(.)}</s>) with their contents ($a/s/) (i.e., I expect that the exact same element of the document is inserted), BaseX gets out of main memory. Any explanation? Thanks.
Some executable code would be helpful.
Thanks, Christian