Bugs item #2456324, was opened at 2008-12-21 19:18
Message generated for change (Comment added) made by stmane
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2456324&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: Pathfinder CVS Head
Status: Closed
Resolution: Works For Me
Priority: 5
Private: No
Submitted By: Wouter Alink (vzzzbx)
Assigned to: Jan Rittinger (tsheyar)
Summary: XQ: root()-node of constructed element cant be printed

Initial Comment:
I get the following error:

$ echo 'for $i in <aap><beer/></aap>//beer return root($i)' | mclient -lxq 
-p50590
!ERROR: serialize.mx:xquery_print_result_main: [kind=32, cont=0]
MAPI  = mone...@localhost:50590
QUERY = for $i in <aap><beer/></aap>//beer return root($i)
ERROR = !ERROR: XML Generation: UNKNOW_TYPE(' 'ch(32))
        !ERROR:
        !ERROR: xquery_print_result_loop: operation failed.

Using Mserver:

# MonetDB Server v4.27.0
# based on GDK   v1.27.0
# Copyright (c) 1993-July 2008, CWI. All rights reserved.
# Copyright (c) August 2008-, MonetDB B.V.. All rights reserved.
# Compiled for x86_64-redhat-linux-gnu/64bit with 64bit OIDs; dynamically 
linked.
# Visit http://monetdb.cwi.nl/ for further information.
# PF/Tijah module v0.9.0 loaded. http://dbappl.cs.utwente.nl/pftijah
# MonetDB/XQuery module v0.27.0 loaded (default back-end is 'milprint_summer')
# XRPC administrative console at http://127.0.0.1:50591/admin
MonetDB>


I'm not sure what the actual answer should be. The following change could be a 
possible solution (it prints <aap><beer/></aap>). Such an answer seems 
reasonable to me. 


Index: serialize.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/serialize.mx,v
retrieving revision 1.118
diff -u -r1.118 serialize.mx
--- serialize.mx        26 Nov 2008 15:00:15 -0000      1.118
+++ serialize.mx        21 Dec 2008 18:09:41 -0000
@@ -1896,6 +1896,7 @@
                         xmlNsDispose( &ctx->nsTop );
                     }
                     break;
+                case NODE:
                 case ELEM:
                     {
                         /* node_kind and cont have been already looked up */



----------------------------------------------------------------------

>Comment By: Stefan Manegold (stmane)
Date: 2009-02-16 11:26

Message:
test added in
pathfinder/tests/BugTracker/Tests/root-node_of_constructed_element.SF-2456324.*

appears to work fine.


----------------------------------------------------------------------

Comment By: Stefan Manegold (stmane)
Date: 2009-02-15 21:33

Message:
Jan,

do you have an opinion about this one?

Thanks!

Stefan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2456324&group_id=56967

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to