Update of /cvsroot/monetdb/pathfinder/compiler/sql
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23940/sql
Modified Files:
lalg2sql.brg
Log Message:
Implementation for ``fn:node-name($arg as node()?) as xs:QName?'',
which forms the backbone of
- fn:name (),
- fn:local_name() and
- fn:namespace_uri ().
doc_access-operator now has another accessor ``doc_QName'',
which supports access to the QName. ``doc_QName'' is not supported
by the MIL translation, yet.
U lalg2sql.brg
Index: lalg2sql.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/sql/lalg2sql.brg,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -d -r1.133 -r1.134
--- lalg2sql.brg 9 May 2008 19:25:09 -0000 1.133
+++ lalg2sql.brg 30 May 2008 12:42:37 -0000 1.134
@@ -3613,9 +3613,24 @@
case alg_fun_fn_substring:
case alg_fun_fn_substring_dbl:
case alg_fun_fn_normalize_space:
-
+ assert (!"missing");
+ break;
case alg_fun_fn_name:
+ /* Returns the name of a node, as an xs:string that is either
the
+ * zero length string or the lexical form of an xs:QName.
+ * If the argument is the empty sequence, the function returns
+ * the zero lenght-string.
+ * If the target node has no name (that is, if it is a
document node,
+ * a comment a text node, or a namespace binding) the functions
+ * returns the zero length string.
+ */
+ {
+
+ } break;
case alg_fun_fn_local_name:
+ {
+
+ } break;
case alg_fun_fn_namespace_uri:
case alg_fun_fn_qname:
@@ -4573,6 +4588,7 @@
item_res = p->sem.doc_access.res;
PFalg_simple_type_t item_ty = type_of (p, item),
item_res_ty = type_of (p, item_res);
+ PFalg_doc_t doc_col = p->sem.doc_access.doc_col;
PFsql_aident_t ctxalias;
/* copy all existing column, from, and where lists */
@@ -4588,8 +4604,23 @@
col_env_lookup (COLMAP(p), item,
item_ty)));
}
- /* add the new column to the column map */
- col_env_add (COLMAP(p), item_res, item_res_ty, VALUE(ctxalias));
+ switch ( doc_col ) {
+ case doc_atext:
+ case doc_text:
+ case doc_comm:
+ case doc_pi_text:
+ col_env_add (COLMAP(p), item_res,
item_res_ty, VALUE(ctxalias));
+ break;
+ case doc_qname:
+ col_env_add (COLMAP(p), item_res,
aat_qname_loc, NAME(ctxalias));
+ col_env_add (COLMAP(p), item_res,
aat_qname_uri, NS_URI(ctxalias));
+ break;
+ default: PFoops (OOPS_FATAL,
+ "SQLgen: Unknown access identifier in "
+ "document access");
+ }
+
+
} break;
/* Rel: roots_ (Constr) */
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins