Update of /cvsroot/monetdb/pathfinder/compiler/mil
In directory sc8-pr-cvs16:/tmp/cvs-serv26699/compiler/mil

Modified Files:
        milprint_summer.c 
Log Message:

- added pf:docname($n as node()*) as xs:string*
  that is, discover the document names from which a sequence of nodes stem

  this is needed in a multi-document scenario where a document, identified
  by some expression over the entire collection, gets deleted.

- allow a collection super-root node to be passed in a context in the fn:id() 
call.

  this is an *extension* of the XQuery semantics, as it allows to look for
  nodes by ID across an entire collection (i.e. in multiple docs=XML 
fragments). 



Index: milprint_summer.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mil/milprint_summer.c,v
retrieving revision 1.364
retrieving revision 1.365
diff -u -d -r1.364 -r1.365
--- milprint_summer.c   16 Apr 2007 12:06:32 -0000      1.364
+++ milprint_summer.c   18 Apr 2007 09:42:28 -0000      1.365
@@ -6654,6 +6654,18 @@
         deleteResult_ (f, counter--, STR);
         deleteResult_ (f, counter, NORMAL);
         return NORMAL;
+    } else if (PFqname_eq(fnQname,PFqname (PFns_lib,"docname")) == 0) {
+        rc = translate2MIL (f, NORMAL, cur_level, counter, L(args));
+        milprintf(f,
+                "{ # translate pf:docname (node*) as string*\n"
+                "  iter := ws_docname(ws, iter.materialize(ipik), 
item.materialize(ipik), kind.materialize(ipik));\n"
+                "  item := addValues(str_values, iter).tmark([EMAIL 
PROTECTED]);\n"
+                "  iter := item.hmark([EMAIL PROTECTED]);\n"
+                "  ipik := iter;\n"
+                "  kind := STR;\n"
+                "  pos  := tmark_grp_unique(iter,ipik);\n"
+                "} # end of translate fn:docname (node*) as string*\n");
+        return STR;
     } else if (!PFqname_eq(fnQname,PFqname (PFns_lib,"mil")))
     {
         rc = translate2MIL (f, VALUES, cur_level, counter, L(args));


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to