Hi All,
It is not clear to me why, when I tried to save the result of one
query in a file called 6-2.xml, BaseX automatically converted this
name into 4.xml. Similar name changes happened with files I wanted to
name 1-2.xml and 10-2.xml.
I attach part of the query info output (with highlights for the
relevant points)
Query:
declare variable $pp := doc("/cluster/home/g/files/all.xml")/d/t; for
$s at $c in collection("/cluster/home/g/files/splitted-db/")[6] return
file:write("/cluster/home/g/results2/" || 6-2 || ".xml", <sub-db>{ for
$e in $s//d let $db := $pp[$e/p = ./p and $e/f = ./f] return if ($db)
then element d {$e/@*, $e/*, for $u in $db/l return element e
{$u/text()}} else $e }</sub-db> )
Compiling:
- pre-evaluating doc("/cluster/home/g/files/all.xml")
- pre-evaluating collection("/cluster/home/g/files/splitted-db/")
- rewriting ((db:open-pre("splitted-db",0), ...))[position() = 6]
- type check removed: $c_2 as xs:integer
- pre-evaluating (6 - 2)
- pre-evaluating concat("/cluster/home/g/results2/", 4, ".xml")
- rewriting descendant-or-self step(s)
- swapping operands: (p = $e_3/*:p)
- swapping operands: (f = $e_3/*:f)
- rewriting ((p = $e_3/*:p) and (f = $e_3/*:f)) to predicate(s)
- pre-evaluating boolean((p = $e_3/*:p))
- pre-evaluating boolean((f = $e_3/*:f))
- rewriting singleton for to let
- inlining $s_1
- converting descendant::*:d to child steps
- inlining $c_2
- simplifying flwor expression
Best,
Giuseppe