Bugs item #2009467, was opened at 2008-07-03 09:19
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2009467&group_id=56967
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: PF/compiler
Group: Pathfinder 0.24
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Wouter Alink (vzzzbx)
Assigned to: Nobody/Anonymous (nobody)
Summary: XQ: nodes change places
Initial Comment:
(MonetDB-0.24, algebra)
see below
-bash-3.2$ cat aap.xml
<aap>
<mies>1</mies>
<mies>2</mies>
</aap>
-bash-3.2$ cat noot.xml
<aap>
<mies>3</mies>
<mies>4</mies>
</aap>
-bash-3.2$ cat beer.xml
<aap>
<mies>5</mies>
<mies>6</mies>
</aap>
-bash-3.2$ cat test_order.xq
for $p in ("/tmp/test_order/aap" ,"/tmp/test_order/beer",
"/tmp/test_order/noot")
let $name := concat($p,".xml")
return pf:add-doc($name, $name)
<>
element result {
for $p in ("/tmp/test_order/aap" ,"/tmp/test_order/beer",
"/tmp/test_order/noot")
return element test {
attribute name {$p},
let $dn := concat($p, ".xml")
return if (exists(pf:documents()[.=$dn]))
then
let $dc := doc($dn)
for $i in $dc//mies
return
element mies {$i/text()}
else ()
}
}
<>
for $p in ("/tmp/test_order/aap" ,"/tmp/test_order/beer",
"/tmp/test_order/noot")
let $name := concat($p,".xml")
return pf:del-doc($name)
results in:
mclient -lxq test_order.xq
<result>
<test name="/tmp/test_order/aap">
<mies>1</mies>
<mies>5</mies>
</test>
<test name="/tmp/test_order/beer">
<mies>3</mies>
<mies>2</mies>
</test>
<test name="/tmp/test_order/noot">
<mies>6</mies>
<mies>4</mies>
</test>
</result>
which is obviously not what was intended...
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2009467&group_id=56967
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs