Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv12821/runtime

Modified Files:
        pathfinder.mx 
Log Message:
- added a pf:attribute(ctx as node()*, value as xs:string) : element()*
  i.e. without attribute uri:loc filter. 



Index: pathfinder.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pathfinder.mx,v
retrieving revision 1.317
retrieving revision 1.318
diff -u -d -r1.317 -r1.318
--- pathfinder.mx       4 Apr 2007 22:23:56 -0000       1.317
+++ pathfinder.mx       5 Apr 2007 10:23:16 -0000       1.318
@@ -2176,7 +2176,7 @@
 }
 
 # loop-lifted (attr/text) key lookup, with iteration dependent 'val': thus can 
also power joins!  
-PROC vx_lookup_cont(BAT[void,bat] ws, oid cont, BAT[void,str] iter_val, str 
uri, str loc) : BAT[oid,oid] 
+PROC vx_lookup_cont(BAT[void,bat] ws, oid cont, BAT[void,str] iter_val, str 
uri, str loc, bit gettext) : BAT[oid,oid] 
 {
     var runtime        := ws.fetch(CONT_RUNTIME).fetch(cont);
     var coll_shortlock := reverse(runtime).fetch(RT_LOCK_FREELIST);
@@ -2192,21 +2192,21 @@
     var vx_hsh_nid_ins := ws.fetch(VX_HSH_NID_INS).fetch(cont);
     var vx_hsh_nid_del := ws.fetch(VX_HSH_NID_DEL).fetch(cont);
     var map_pid        := ws.fetch(MAP_PID).fetch(cont);
+    var uri_loc        := ws.fetch(QN_URI_LOC).fetch(cont);
+    var prefix_uri_loc := ws.fetch(QN_PREFIX_URI_LOC).fetch(cont);
+    var qns            := uri_loc;
     var use_index      := (cont != WS);
-    var gettext        := false;
     var iter_cand;
-    var qns;
  
     # lookup whether we know uri:loc in this collection
     if (isnil(uri) and isnil(loc)) { 
-        gettext := true; # text lookup
-        qns := reverse(bat(void,int).append(0)); # matches single dummy qn
+        if (gettext) qns := reverse(bat(void,int).append(0)); # matches single 
dummy qn
     } else if (isnil(uri)) { # ID access: get any qname that is marked as ID
-        qns := 
ws.fetch(QN_PREFIX_URI_LOC).fetch(cont).[endsWith](NS_ACCEL_SEP+"id"+NS_ACCEL_SEP).uselect(true);
+        qns := 
prefix_uri_loc.[endsWith](NS_ACCEL_SEP+"id"+NS_ACCEL_SEP).uselect(true);
     } else if (isnil(loc)) { # IDREF access: get any qname that is marked as 
IDREF
-        qns := 
ws.fetch(QN_PREFIX_URI_LOC).fetch(cont).[endsWith](NS_ACCEL_SEP+"idref"+NS_ACCEL_SEP).uselect(true);
+        qns := 
prefix_uri_loc.[endsWith](NS_ACCEL_SEP+"idref"+NS_ACCEL_SEP).uselect(true);
     } else {
-        qns := ws.fetch(QN_URI_LOC).fetch(cont).uselect(uri + NS_ACCEL_SEP + 
loc);
+        qns := uri_loc.uselect(uri + NS_ACCEL_SEP + loc);
     }
     qns := mirror(qns);
     if (count(qns) = 0) return empty_bat; # qn not present in the document, so 
there cannot be any matches
@@ -2285,14 +2285,14 @@
                bat[void,oid] id_iter,
                bat[void,int] id_kind,
                bat[void,str] iter_val,
-               str uri, str loc) : BAT[oid,oid]
+               str uri, str loc, bit gettext) : BAT[oid,oid]
 {
     var id_pre  := bat(oid,oid,10000);
     var id_cont := get_container(id_kind);
 
     id_cont.tunique().sort()@batloop() {
         var key_val := id_cont.ord_uselect($h).hmark([EMAIL 
PROTECTED]).leftfetchjoin(id_iter).leftfetchjoin(iter_val.tmark([EMAIL 
PROTECTED]));
-        var key_pre := vx_lookup_cont(ws, $h, key_val, uri, loc);
+        var key_pre := vx_lookup_cont(ws, $h, key_val, uri, loc, gettext);
         id_pre.insert(key_pre);
     }
     return id_pre; # sorted on pre 
@@ -2348,7 +2348,7 @@
       { var id__val := id_split.leftjoin(split_tokens);
         var key_val := id__val.tmark([EMAIL PROTECTED]);
         var key_id  := id__val.hmark([EMAIL PROTECTED]);
-        var key_pre := vx_lookup_cont(ws, cont, key_val, uri, loc);
+        var key_pre := vx_lookup_cont(ws, cont, key_val, uri, loc, false);
 
         if (isid) { # for ID() we also perform NID access; merging with IDs, 
conserves pre-order
             id_pre  := 
id_split.leftjoin(split_nids).leftjoin(nid_rid).[swizzle](map_pid).tsort();


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to