Bugs item #1656207, was opened at 2007-02-09 17:12
Message generated for change (Settings changed) made by sjoerd
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1656207&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/runtime
Group: MonetDB4 4.16
>Status: Closed
>Resolution: Works For Me
Priority: 8
Private: No
Submitted By: Peter Boncz (boncz)
Assigned to: Sjoerd Mullender (sjoerd)
Summary: XQ: insert single text node bug
Initial Comment:
When writing the quick tutorial for XQuery updates for our website (not yet,
but attached to this report), I stumbled on the following bug.
In the insert before/after example, two updates are done:
do insert <greet kind="formal">Good day</greet> before
doc("greetings.xml")//greet[1]
do insert text {"
"} after doc("HelloWorld.xml")//greet[1]
The latter inserts a single text node. After printing the result, we get:
<?xml version="1.0" encoding="utf-8"?>
<doc>
<greet kind="formal">Good day</greet>
<greet kind="informal">Hi </greet>
<greet kind="casual">Hello </greet>
<location kind="global">World</location>
<location kind="local">Amsterdam</location></doc>
instead of:
<?xml version="1.0" encoding="utf-8"?>
<doc>
<greet kind="formal">Good day</greet>
<greet kind="informal">Hi </greet>
<greet kind="casual">Hello </greet>
<location kind="global">World</location>
<location kind="local">Amsterdam</location>
</doc>
That is, the *last* text node beloww <doc> has gone missing. This is usually
caused by the size of that node not being updated properly (it seems to have
stayed the same after the singe text node insert).
----------------------------------------------------------------------
Comment By: Sjoerd Mullender (sjoerd)
Date: 2007-02-13 11:32
Message:
Logged In: YES
user_id=43607
Originator: NO
I tried the following. The output looks correct to me.
xquery>pf:add-doc("http://monetdb.cwi.nl/XQuery/files/HelloWorld.xml",
"greetings.xml", "greetings.xml", 10)
more>xquery>do insert <greet kind="formal">Good day</greet> before
doc("greeting")//greet[1]
more>xquery>do insert text {"
more> "} after doc("greetings.xml")//greet[1]
more>xquery>doc("greetings.xml")1]
more><?xml version="1.0" encoding="utf-8"?>
<doc>
<greet kind="formal">Good day</greet>
<greet kind="informal">Hi </greet>
<greet kind="casual">Hello </greet>
<location kind="global">World</location>
<location kind="local">Amsterdam</location>
</doc>
xquery>
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1656207&group_id=56967
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs