Update of /cvsroot/monetdb/MonetDB5/src/modules/mal/Tests
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv30955/Tests

Modified Files:
        All inspect05.stable.out xml03.stable.out xml04.stable.out 
Added Files:
        xml05.stable.err xml05.stable.out xml10.mal xml10.stable.err 
        xml10.stable.out 
Log Message:
The XMLagg primitive has been implemented. A more complex example
to illustrate SQL code generation is added (xml10).


Index: All
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/Tests/All,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- All 24 Aug 2007 05:42:01 -0000      1.43
+++ All 25 Aug 2007 07:48:31 -0000      1.44
@@ -44,3 +44,4 @@
 xml03
 xml04
 xml05
+xml10

Index: inspect05.stable.out
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/Tests/inspect05.stable.out,v
retrieving revision 1.326
retrieving revision 1.327
diff -u -d -r1.326 -r1.327
--- inspect05.stable.out        24 Aug 2007 05:42:01 -0000      1.326
+++ inspect05.stable.out        25 Aug 2007 07:48:31 -0000      1.327
@@ -38,17 +38,18 @@
 # str                                  str             str             str     
                                                                                
                                str                                             
  # type
 
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
 [ "main",                                "function",     "user",         
"():void;",                                                                     
                                        "nil"                                   
        ]
-[ "agg",                                 "pattern",      "xml",          
"(val:bat[:oid,:xml],order:str...):bat[:oid,:xml] ",                            
                                                        "BATXMLagg;"            
                ]
+[ "agg",                                 "command",      "xml",          
"(val:bat[:oid,:xml]):bat[:oid,:xml] ",                                         
                                "BATXMLgroup;"                                  
]
+[ "agg",                                 "command",      "xml",          
"(grp:bat[:oid,:oid],val:bat[:oid,:xml]):bat[:oid,:xml] ",                      
                                "BATXMLagg;"                                    
]
 [ "attribute",                   "command",      "xml",          
"(name:str,val:bat[:oid,:str]):bat[:oid,:xml] ",                                
                                        "BATXMLattribute;"                      
        ]
-[ "attributes",                          "pattern",      "xml",          
"(val:xml...):xml ",                                                            
                                        "XMLattributes;"                        
        ]
 [ "attribute",                   "command",      "xml",          
"(name:str,val:str):xml ",                                                      
                                        "XMLattribute;"                         
        ]
 [ "concat",                      "command",      "xml",          
"(left:bat[:oid,:xml],right:bat[:oid,:xml]):bat[:oid,:xml] ",                   
                                        "BATXMLconcat;"                         
        ]
 [ "comment",                             "command",      "xml",          
"(val:bat[:oid,:str]):bat[:oid,:xml] ",                                         
                                                        "BATXMLcomment;"        
                ]
 [ "concat",                      "pattern",      "xml",          
"(val:xml...):xml ",                                                            
                                        "XMLconcat;"                            
        ]
 [ "comment",                             "command",      "xml",          
"(val:str):xml ",                                                               
                                                        "XMLcomment;"           
                ]
 [ "element",                     "command",      "xml",          
"(name:str,ns:bat[:oid,:str],attr:bat[:oid,:xml],s:bat[:oid,:xml]):bat[:oid,:xml]
 ",                                    "BATXMLelement;"                         
       ]
-[ "element",                     "command",      "xml",          
"(name:str,s:bat[:oid,:xml]):bat[:oid,:xml] ",                                  
                                        "BATXMLelementSmall;"                   
        ]
-[ "element",                     "pattern",      "xml",          
"(name:str,ns:bat[:oid,:str],attr:xml,s:xml...):xml ",                          
                                        "XMLelement;"                           
        ]
+[ "element",                             "command",      "xml",          
"(name:str,s:bat[:oid,:xml]):bat[:oid,:xml] ",                                  
                                "BATXMLtag;"                                    
]
+[ "element",                             "command",      "xml",          
"(name:str,s:xml):xml ",                                                        
                                "XMLelementSmall;"                              
]
+[ "element",                             "command",      "xml",          
"(name:str,ns:str,attr:str,s:xml):xml ",                                        
                                "XMLelement;"                                   
]
 [ "forest",                      "pattern",      "xml",          
"(val:bat[:oid,:xml]...):bat[:oid,:xml] ",                                      
                                        "BATXMLforest;"                         
        ]
 [ "forest",                      "pattern",      "xml",          
"(val:xml...):xml ",                                                            
                                        "XMLforest;"                            
        ]
 [ "isdocument",                                  "command",      "xml",        
  "(val:bat[:oid,:str]):bat[:oid,:bit] ",                                       
                                                          "BATXMLisdocument;"   
                  ]
@@ -64,7 +65,6 @@
 [ "str",                         "command",      "xml",          
"(src:xml):str ",                                                               
                                        "XMLxml2str;"                           
        ]
 [ "text",                        "command",      "xml",          
"(val:bat[:oid,:str]):bat[:oid,:xml] ",                                         
                                        "BATXMLxml2str;"                        
        ]
 [ "tag",                         "command",      "xml",          
"(nme:str,val:bat[:oid,:xml]):bat[:oid,:xml] ",                                 
                                        "BATXMLtag;"                            
        ]
-[ "trunk",                       "command",      "xml",          
"(nme:str,val:xml):xml ",                                                       
                                        "XMLtrunk;"                             
        ]
 [ "xquery",                              "command",      "xml",          
"(val:bat[:oid,:str],expr:str):bat[:oid,:xml] ",                                
                                "BATXMLxquery;"                                 
]
 [ "xml",                         "command",      "xml",          
"(src:bat[:oid,:str]):bat[:oid,:xml] ",                                         
                                        "BATXMLstr2xml;"                        
        ]
 [ "xml",                         "command",      "xml",          
"(src:str):xml ",                                                               
                                        "XMLstr2xml;"                           
        ]

--- NEW FILE: xml10.mal ---
# produce a more complex structure
# such as 
#<books>
#  <author> john
#  <title> spring</title>
#  <title> summer</title>
#  </author>
#  <author> mary
#  <title> autum</title>
#  </author>
#</books>

# the intermediate tabular result produced by SQL
a:= bat.new(:oid,:str);
bat.insert(a,[EMAIL PROTECTED],"john");
bat.insert(a,[EMAIL PROTECTED],"john");
bat.insert(a,[EMAIL PROTECTED],"marie");
t:= bat.new(:oid,:str);
bat.insert(t,[EMAIL PROTECTED],"spring");
bat.insert(t,[EMAIL PROTECTED],"summer");
bat.insert(t,[EMAIL PROTECTED],"autum");

# SQL rendering request
#xmlelement('books',
#       xmlelement('author',a,
#                       xmlagg(xmlelement('title',t))
#   ) )
# every nesting implies a groupby

ax:= xml.xml(a);
tx:= xml.xml(t);
te:= xml.element("title",tx);
g:= bat.new(:oid,:oid);
bat.insert(g,[EMAIL PROTECTED],[EMAIL PROTECTED]);
bat.insert(g,[EMAIL PROTECTED],[EMAIL PROTECTED]);
bat.insert(g,[EMAIL PROTECTED],[EMAIL PROTECTED]);

k:= algebra.join(g,te);
io.print(k);
l:= algebra.sort(k);
io.print(l);

ag:= xml.agg(g,te);
io.print(ag);
j2:= algebra.join(g,ax);
k2:=algebra.kunique(j2);
io.print(k2);
cc:= xml.concat(k2,ag);
io.print(cc);
ae:= xml.element("author",cc);

be:= xml.agg(ae);
doc:= xml.element("books",be);
io.print(doc);

Index: xml04.stable.out
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/Tests/xml04.stable.out,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- xml04.stable.out    23 Aug 2007 21:20:37 -0000      1.1
+++ xml04.stable.out    25 Aug 2007 07:48:40 -0000      1.2
@@ -42,11 +42,11 @@
     bat.insert(h,[EMAIL PROTECTED],"curly dark brown");        # 6 
BKCinsert_bun (_13:void)<-(h:bat[:oid,:str])(_8:oid)(_14:str)
     io.print(b);       # 7 IOprint_val (_15:void)<-(b:bat[:oid,:str])
     bs := xml.xml(b);  # 8 BATXMLstr2xml 
(bs:bat[:oid,:xml])<-(b:bat[:oid,:str])
-    bc := xml.element("name",bs);      # 9 BATXMLelementSmall 
(bc:bat[:oid,:xml])<-(_18:str)(bs:bat[:oid,:xml])
+    bc := xml.element("name",bs);      # 9 BATXMLtag 
(bc:bat[:oid,:xml])<-(_18:str)(bs:bat[:oid,:xml])
     bj := xml.str(bc); # 10 BATXMLxml2str 
(bj:bat[:oid,:str])<-(bc:bat[:oid,:xml])
     io.print(bj);      # 11 IOprint_val (_20:void)<-(bj:bat[:oid,:str])
     hs := xml.xml(h);  # 12 BATXMLstr2xml 
(hs:bat[:oid,:xml])<-(h:bat[:oid,:str])
-    hc := xml.element("hair",hs);      # 13 BATXMLelementSmall 
(hc:bat[:oid,:xml])<-(_23:str)(hs:bat[:oid,:xml])
+    hc := xml.element("hair",hs);      # 13 BATXMLtag 
(hc:bat[:oid,:xml])<-(_23:str)(hs:bat[:oid,:xml])
     hj := xml.str(hc); # 14 BATXMLxml2str 
(hj:bat[:oid,:str])<-(hc:bat[:oid,:xml])
     io.print(hj);      # 15 IOprint_val (_25:void)<-(hj:bat[:oid,:str])
     aa := xml.forest(bc,hc);   # 16 BATXMLforest 
(aa:bat[:oid,:xml])<-(bc:bat[:oid,:xml])(hc:bat[:oid,:xml])

Index: xml03.stable.out
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/Tests/xml03.stable.out,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- xml03.stable.out    23 Aug 2007 21:17:51 -0000      1.1
+++ xml03.stable.out    25 Aug 2007 07:48:40 -0000      1.2
@@ -44,15 +44,15 @@
     bat.insert(h,[EMAIL PROTECTED],"curly dark brown");        # 6 
BKCinsert_bun (_13:void)<-(h:bat[:oid,:str])(_8:oid)(_14:str)
     io.print(b);       # 7 IOprint_val (_15:void)<-(b:bat[:oid,:str])
     bs := xml.xml(b);  # 8 BATXMLstr2xml 
(bs:bat[:oid,:xml])<-(b:bat[:oid,:str])
-    bc := xml.element("name",bs);      # 9 BATXMLelementSmall 
(bc:bat[:oid,:xml])<-(_18:str)(bs:bat[:oid,:xml])
+    bc := xml.element("name",bs);      # 9 BATXMLtag 
(bc:bat[:oid,:xml])<-(_18:str)(bs:bat[:oid,:xml])
     bj := xml.str(bc); # 10 BATXMLxml2str 
(bj:bat[:oid,:str])<-(bc:bat[:oid,:xml])
     io.print(bj);      # 11 IOprint_val (_20:void)<-(bj:bat[:oid,:str])
     hs := xml.xml(h);  # 12 BATXMLstr2xml 
(hs:bat[:oid,:xml])<-(h:bat[:oid,:str])
-    hc := xml.element("hair",hs);      # 13 BATXMLelementSmall 
(hc:bat[:oid,:xml])<-(_23:str)(hs:bat[:oid,:xml])
+    hc := xml.element("hair",hs);      # 13 BATXMLtag 
(hc:bat[:oid,:xml])<-(_23:str)(hs:bat[:oid,:xml])
     hj := xml.str(hc); # 14 BATXMLxml2str 
(hj:bat[:oid,:str])<-(hc:bat[:oid,:xml])
     io.print(hj);      # 15 IOprint_val (_25:void)<-(hj:bat[:oid,:str])
     hh := xml.concat(bc,hc);   # 16 BATXMLconcat 
(hh:bat[:oid,:xml])<-(bc:bat[:oid,:xml])(hc:bat[:oid,:xml])
-    aa := xml.element("victim",hh);    # 17 BATXMLelementSmall 
(aa:bat[:oid,:xml])<-(_28:str)(hh:bat[:oid,:xml])
+    aa := xml.element("victim",hh);    # 17 BATXMLtag 
(aa:bat[:oid,:xml])<-(_28:str)(hh:bat[:oid,:xml])
     as := xml.str(aa); # 18 BATXMLxml2str 
(as:bat[:oid,:str])<-(aa:bat[:oid,:xml])
     io.print(as);      # 19 IOprint_val (_30:void)<-(as:bat[:oid,:str])
 end main;      # 20  

--- NEW FILE: xml10.stable.err ---
stderr of test 'xml10` in directory 'src/modules/mal` itself:


# 09:38:47 >  
# 09:38:47 >  Mtimeout -timeout 60  mserver5 
"--config=/ufs/mk/monet5/Linux/etc/monetdb5.conf" --debug=10 --set 
"monet_mod_path=/ufs/mk/monet5//Linux/lib/MonetDB5:/ufs/mk/monet5//Linux/lib/MonetDB5/lib:/ufs/mk/monet5//Linux/lib/MonetDB5/bin"
 --set "gdk_dbfarm=/ufs/mk/monet5//Linux/var/MonetDB5/dbfarm" --set 
"sql_logdir=/ufs/mk/monet5//Linux/var/MonetDB5/sql_logs" --set 
"xquery_logdir=/ufs/mk/monet5//Linux/var/MonetDB5/xquery_logs" --set 
mapi_open=true --set xrpc_open=true --set mapi_port=37982 --set xrpc_port=42894 
--set monet_prompt= --trace --dbname=mTests_src_modules_mal  xml10.mal
# 09:38:47 >  

#warning: please don't forget to set your vault key!
#(see /ufs/mk/monet5/Linux/etc/monetdb5.conf)

# 09:38:47 >  
# 09:38:47 >  Done.
# 09:38:47 >  


--- NEW FILE: xml10.stable.out ---
stdout of test 'xml10` in directory 'src/modules/mal` itself:


# 09:38:47 >  
# 09:38:47 >  Mtimeout -timeout 60  mserver5 
"--config=/ufs/mk/monet5/Linux/etc/monetdb5.conf" --debug=10 --set 
"monet_mod_path=/ufs/mk/monet5//Linux/lib/MonetDB5:/ufs/mk/monet5//Linux/lib/MonetDB5/lib:/ufs/mk/monet5//Linux/lib/MonetDB5/bin"
 --set "gdk_dbfarm=/ufs/mk/monet5//Linux/var/MonetDB5/dbfarm" --set 
"sql_logdir=/ufs/mk/monet5//Linux/var/MonetDB5/sql_logs" --set 
"xquery_logdir=/ufs/mk/monet5//Linux/var/MonetDB5/xquery_logs" --set 
mapi_open=true --set xrpc_open=true --set mapi_port=37982 --set xrpc_port=42894 
--set monet_prompt= --trace --dbname=mTests_src_modules_mal  xml10.mal
# 09:38:47 >  

# MonetDB server v5.1.0, based on kernel v1.19.0
# Serving database 'mTests_src_modules_mal'
# Compiled for x86_64-redhat-linux-gnu/64bit with 64bit OIDs dynamically linked
# Copyright (c) 1993-2007 CWI, all rights reserved
# Visit http://monetdb.cwi.nl/ for further information
# Listening for connection requests on mapi:monetdb://gio.ins.cwi.nl:37982/
## produce a more complex structure
## such as 
##<books>
##  <author> john
##  <title> spring</title>
##  <title> summer</title>
##  </author>
##  <author> mary
##  <title> autum</title>
##  </author>
##</books>
#
## the intermediate tabular result produced by SQL
#a:= bat.new(:oid,:str);
#bat.insert(a,[EMAIL PROTECTED],"john");
#bat.insert(a,[EMAIL PROTECTED],"john");
#bat.insert(a,[EMAIL PROTECTED],"marie");
#t:= bat.new(:oid,:str);
#bat.insert(t,[EMAIL PROTECTED],"spring");
#bat.insert(t,[EMAIL PROTECTED],"summer");
#bat.insert(t,[EMAIL PROTECTED],"autum");
#
## SQL rendering request
##xmlelement('books',
##      xmlelement('author',a,
##                      xmlagg(xmlelement('title',t))
##   ) )
## every nesting implies a groupby
#
#ax:= xml.xml(a);
#tx:= xml.xml(t);
#te:= xml.element("title",tx);
#g:= bat.new(:oid,:oid);
#bat.insert(g,[EMAIL PROTECTED],[EMAIL PROTECTED]);
#bat.insert(g,[EMAIL PROTECTED],[EMAIL PROTECTED]);
#bat.insert(g,[EMAIL PROTECTED],[EMAIL PROTECTED]);
#
#k:= algebra.join(g,te);
#io.print(k);
#l:= algebra.sort(k);
#io.print(l);
#
#ag:= xml.agg(g,te);
#io.print(ag);
#j2:= algebra.join(g,ax);
#k2:=algebra.kunique(j2);
#io.print(k2);
#cc:= xml.concat(k2,ag);
#io.print(cc);
#ae:= xml.element("author",cc);
#
#be:= xml.agg(ae);
#doc:= xml.element("books",be);
#io.print(doc);
#
function user.main():void;      # 0  (main:void)
# produce a more complex structure      # 1  (_1:str)
# such as       # 2  (_2:str)
#<books>        # 3  (_3:str)
#  <author> john        # 4  (_4:str)
#  <title> spring</title>       # 5  (_5:str)
#  <title> summer</title>       # 6  (_6:str)
#  </author>    # 7  (_7:str)
#  <author> mary        # 8  (_8:str)
#  <title> autum</title>        # 9  (_9:str)
#  </author>    # 10  (_7:str)
#</books>       # 11  (_10:str)
# the intermediate tabular result produced by SQL       # 12  (_11:str)
    a := bat.new(:oid,:str);    # 13 CMDBATnew 
(a:bat[:oid,:str])<-(_13:oid)(_14:str)
    bat.insert(a,[EMAIL PROTECTED],"john");     # 14 BKCinsert_bun 
(_15:void)<-(a:bat[:oid,:str])(_16:oid)(_17:str)
    bat.insert(a,[EMAIL PROTECTED],"john");     # 15 BKCinsert_bun 
(_18:void)<-(a:bat[:oid,:str])(_19:oid)(_17:str)
    bat.insert(a,[EMAIL PROTECTED],"marie");    # 16 BKCinsert_bun 
(_20:void)<-(a:bat[:oid,:str])(_21:oid)(_22:str)
    t := bat.new(:oid,:str);    # 17 CMDBATnew 
(t:bat[:oid,:str])<-(_13:oid)(_24:str)
    bat.insert(t,[EMAIL PROTECTED],"spring");   # 18 BKCinsert_bun 
(_25:void)<-(t:bat[:oid,:str])(_16:oid)(_26:str)
    bat.insert(t,[EMAIL PROTECTED],"summer");   # 19 BKCinsert_bun 
(_27:void)<-(t:bat[:oid,:str])(_19:oid)(_28:str)
    bat.insert(t,[EMAIL PROTECTED],"autum");    # 20 BKCinsert_bun 
(_29:void)<-(t:bat[:oid,:str])(_21:oid)(_30:str)
# SQL rendering request         # 21  (_31:str)
#xmlelement('books',    # 22  (_32:str)
#       xmlelement('author',a,  # 23  (_33:str)
#                       xmlagg(xmlelement('title',t))   # 24  (_34:str)
#   ) )         # 25  (_35:str)
# every nesting implies a groupby       # 26  (_36:str)
    ax := xml.xml(a);   # 27 BATXMLstr2xml 
(ax:bat[:oid,:xml])<-(a:bat[:oid,:str])
    tx := xml.xml(t);   # 28 BATXMLstr2xml 
(tx:bat[:oid,:xml])<-(t:bat[:oid,:str])
    te := xml.element("title",tx);      # 29 BATXMLtag 
(te:bat[:oid,:xml])<-(_40:str)(tx:bat[:oid,:xml])
    g := bat.new(:oid,:oid);    # 30 CMDBATnew 
(g:bat[:oid,:oid])<-(_13:oid)(_13:oid)
    bat.insert(g,[EMAIL PROTECTED],[EMAIL PROTECTED]);  # 31 BKCinsert_bun 
(_42:void)<-(g:bat[:oid,:oid])(_16:oid)(_16:oid)
    bat.insert(g,[EMAIL PROTECTED],[EMAIL PROTECTED]);  # 32 BKCinsert_bun 
(_43:void)<-(g:bat[:oid,:oid])(_16:oid)(_19:oid)
    bat.insert(g,[EMAIL PROTECTED],[EMAIL PROTECTED]);  # 33 BKCinsert_bun 
(_44:void)<-(g:bat[:oid,:oid])(_19:oid)(_21:oid)
    k := algebra.join(g,te);    # 34 ALGjoin 
(k:bat[:oid,:xml])<-(g:bat[:oid,:oid])(te:bat[:oid,:xml])
    io.print(k);        # 35 IOprint_val (_46:void)<-(k:bat[:oid,:xml])
    l := algebra.sort(k);       # 36 ALGhsort 
(l:bat[:oid,:xml])<-(k:bat[:oid,:xml])
    io.print(l);        # 37 IOprint_val (_48:void)<-(l:bat[:oid,:xml])
    ag := xml.agg(g,te);        # 38 BATXMLagg 
(ag:bat[:oid,:xml])<-(g:bat[:oid,:oid])(te:bat[:oid,:xml])
    io.print(ag);       # 39 IOprint_val (_50:void)<-(ag:bat[:oid,:xml])
    j2 := algebra.join(g,ax);   # 40 ALGjoin 
(j2:bat[:oid,:xml])<-(g:bat[:oid,:oid])(ax:bat[:oid,:xml])
    k2 := algebra.kunique(j2);  # 41 ALGkunique 
(k2:bat[:oid,:xml])<-(j2:bat[:oid,:xml])
    io.print(k2);       # 42 IOprint_val (_53:void)<-(k2:bat[:oid,:xml])
    cc := xml.concat(k2,ag);    # 43 BATXMLconcat 
(cc:bat[:oid,:xml])<-(k2:bat[:oid,:xml])(ag:bat[:oid,:xml])
    io.print(cc);       # 44 IOprint_val (_55:void)<-(cc:bat[:oid,:xml])
    ae := xml.element("author",cc);     # 45 BATXMLtag 
(ae:bat[:oid,:xml])<-(_57:str)(cc:bat[:oid,:xml])
    be := xml.agg(ae);  # 46 BATXMLgroup 
(be:bat[:oid,:xml])<-(ae:bat[:oid,:xml])
    doc := xml.element("books",be);     # 47 BATXMLtag 
(doc:bat[:oid,:xml])<-(_60:str)(be:bat[:oid,:xml])
    io.print(doc);      # 48 IOprint_val (_61:void)<-(doc:bat[:oid,:xml])
end main;       # 49  
#-----------------------------------------#
# t     h                                 # name
# oid   str                               # type
#-----------------------------------------#
[ [EMAIL PROTECTED],      "<title>spring</title>"         ]
[ [EMAIL PROTECTED],      "<title>summer</title>"         ]
[ [EMAIL PROTECTED],      "<title>autum</title>"          ]
#-----------------------------------------#
# h     t                                 # name
# oid   str                               # type
#-----------------------------------------#
[ [EMAIL PROTECTED],      "<title>spring</title>"         ]
[ [EMAIL PROTECTED],      "<title>summer</title>"         ]
[ [EMAIL PROTECTED],      "<title>autum</title>"          ]
#---------------------------------------------------------#
# h     t                                                 # name
# oid   str                                               # type
#---------------------------------------------------------#
[ [EMAIL PROTECTED],      "<title>spring</title><title>summer</title>"    ]
[ [EMAIL PROTECTED],      "<title>autum</title>"                          ]
#-------------------------#
# h     t                 # name
# oid   str               # type
#-------------------------#
[ [EMAIL PROTECTED],      "john"          ]
[ [EMAIL PROTECTED],      "marie"         ]
#-----------------------------------------------------------------#
# h     t                                                         # name
# oid   str                                                       # type
#-----------------------------------------------------------------#
[ [EMAIL PROTECTED],      "john<title>spring</title><title>summer</title>"      
  ]
[ [EMAIL PROTECTED],      "marie<title>autum</title>"                           
  ]
#-----------------------------------------------------------------------------------------------------------------------------------------#
# h     t                                                                       
                                                          # name
# oid   str                                                                     
                                                          # type
#-----------------------------------------------------------------------------------------------------------------------------------------#
[ nil,    
"<books><author>john<title>spring</title><title>summer</title></author><author>marie<title>autum</title></author></books>"
      ]

# 09:38:47 >  
# 09:38:47 >  Done.
# 09:38:47 >  


--- NEW FILE: xml05.stable.err ---
stderr of test 'xml05` in directory 'src/modules/mal` itself:


# 07:41:18 >  
# 07:41:18 >  Mtimeout -timeout 60  mserver5 
"--config=/ufs/mk/monet5/Linux/etc/monetdb5.conf" --debug=10 --set 
"monet_mod_path=/ufs/mk/monet5//Linux/lib/MonetDB5:/ufs/mk/monet5//Linux/lib/MonetDB5/lib:/ufs/mk/monet5//Linux/lib/MonetDB5/bin"
 --set "gdk_dbfarm=/ufs/mk/monet5//Linux/var/MonetDB5/dbfarm" --set 
"sql_logdir=/ufs/mk/monet5//Linux/var/MonetDB5/sql_logs" --set 
"xquery_logdir=/ufs/mk/monet5//Linux/var/MonetDB5/xquery_logs" --set 
mapi_open=true --set xrpc_open=true --set mapi_port=32400 --set xrpc_port=45758 
--set monet_prompt= --trace --dbname=mTests_src_modules_mal  xml05.mal
# 07:41:18 >  

#warning: please don't forget to set your vault key!
#(see /ufs/mk/monet5/Linux/etc/monetdb5.conf)

# 07:41:18 >  
# 07:41:18 >  Done.
# 07:41:18 >  


--- NEW FILE: xml05.stable.out ---
stdout of test 'xml05` in directory 'src/modules/mal` itself:


# 07:41:18 >  
# 07:41:18 >  Mtimeout -timeout 60  mserver5 
"--config=/ufs/mk/monet5/Linux/etc/monetdb5.conf" --debug=10 --set 
"monet_mod_path=/ufs/mk/monet5//Linux/lib/MonetDB5:/ufs/mk/monet5//Linux/lib/MonetDB5/lib:/ufs/mk/monet5//Linux/lib/MonetDB5/bin"
 --set "gdk_dbfarm=/ufs/mk/monet5//Linux/var/MonetDB5/dbfarm" --set 
"sql_logdir=/ufs/mk/monet5//Linux/var/MonetDB5/sql_logs" --set 
"xquery_logdir=/ufs/mk/monet5//Linux/var/MonetDB5/xquery_logs" --set 
mapi_open=true --set xrpc_open=true --set mapi_port=32400 --set xrpc_port=45758 
--set monet_prompt= --trace --dbname=mTests_src_modules_mal  xml05.mal
# 07:41:18 >  

# MonetDB server v5.1.0, based on kernel v1.19.0
# Serving database 'mTests_src_modules_mal'
# Compiled for x86_64-redhat-linux-gnu/64bit with 64bit OIDs dynamically linked
# Copyright (c) 1993-2007 CWI, all rights reserved
# Visit http://monetdb.cwi.nl/ for further information
# Listening for connection requests on mapi:monetdb://gio.ins.cwi.nl:32400/
#b:= bat.new(:oid,:str);
#bat.insert(b,[EMAIL PROTECTED],"Mary Ann Walker");
#bat.insert(b,[EMAIL PROTECTED],"Annie Chapman");
#h:= bat.new(:oid,:str);
#bat.insert(h,[EMAIL PROTECTED],"brown");
#bat.insert(h,[EMAIL PROTECTED],"curly dark brown");
#
#io.print(b);
#
#bs:= xml.xml(b);
#bc:= xml.element("name",bs);
#
#aa:= xml.root(bc,"version1.0","no");
#as:= xml.str(aa);
#io.print(as);
#
function user.main():void;      # 0  (main:void)
    b := bat.new(:oid,:str);    # 1 CMDBATnew 
(b:bat[:oid,:str])<-(_2:oid)(_3:str)
    bat.insert(b,[EMAIL PROTECTED],"Mary Ann Walker");  # 2 BKCinsert_bun 
(_4:void)<-(b:bat[:oid,:str])(_5:oid)(_6:str)
    bat.insert(b,[EMAIL PROTECTED],"Annie Chapman");    # 3 BKCinsert_bun 
(_7:void)<-(b:bat[:oid,:str])(_8:oid)(_9:str)
    h := bat.new(:oid,:str);    # 4 CMDBATnew 
(h:bat[:oid,:str])<-(_2:oid)(_3:str)
    bat.insert(h,[EMAIL PROTECTED],"brown");    # 5 BKCinsert_bun 
(_11:void)<-(h:bat[:oid,:str])(_5:oid)(_12:str)
    bat.insert(h,[EMAIL PROTECTED],"curly dark brown"); # 6 BKCinsert_bun 
(_13:void)<-(h:bat[:oid,:str])(_8:oid)(_14:str)
    io.print(b);        # 7 IOprint_val (_15:void)<-(b:bat[:oid,:str])
    bs := xml.xml(b);   # 8 BATXMLstr2xml 
(bs:bat[:oid,:xml])<-(b:bat[:oid,:str])
    bc := xml.element("name",bs);       # 9 BATXMLtag 
(bc:bat[:oid,:xml])<-(_18:str)(bs:bat[:oid,:xml])
    aa := xml.root(bc,"version1.0","no");       # 10 BATXMLroot 
(aa:bat[:oid,:xml])<-(bc:bat[:oid,:xml])(_20:str)(_21:str)
    as := xml.str(aa);  # 11 BATXMLxml2str 
(as:bat[:oid,:str])<-(aa:bat[:oid,:xml])
    io.print(as);       # 12 IOprint_val (_23:void)<-(as:bat[:oid,:str])
end main;       # 13  
#---------------------------------#
# h     t                         # name
# void  str                       # type
#---------------------------------#
[ [EMAIL PROTECTED],      "Mary Ann Walker"       ]
[ [EMAIL PROTECTED],      "Annie Chapman"         ]
#-----------------------------------------------------------------------------------------#
# h     t                                                                       
          # name
# void  str                                                                     
          # type
#-----------------------------------------------------------------------------------------#
[ [EMAIL PROTECTED],      "<? version=\"version1.0\" 
stanalone=\"no\"?><name>Mary Ann Walker</name>"      ]
[ [EMAIL PROTECTED],      "<? version=\"version1.0\" 
stanalone=\"no\"?><name>Annie Chapman</name>"        ]

# 07:41:18 >  
# 07:41:18 >  Done.
# 07:41:18 >  



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to