Hi,
I have an xml file consisting (only) of many elements similar to this
<re> <de>something</de> <se>something</se> <id>something</id> <p>something</p> <s>something</s> <h>something</h> <b>something</b> <m>something</m> </re>
and a simple query like this
let $t := doc("file.xml") for $a in $t//re let $b := $a/de let $c := $a/se return (element r {attribute f {$b || "-" || $c}, <i>{$a/id/data(.)}</i>, <f>{$b/data(.)}</f>, <p>{$a/p/data(.)}</p>, <l>{$c/data(.)}</l>, <s>{$a/s/data(.)}</s> ,<h>{$a/h/data(.)}</h>, <b>{$a/b/data(.)}</b>, <m>{$a/m/data(.)}</m> })
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.
Joseph