Update of /cvsroot/monetdb/pathfinder
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv13876
Modified Files:
EXTENSIONS
Log Message:
propagated changes of Sunday Feb 11 2007 - Tuesday Feb 20 2007
from the XQuery_0-16 branch to the development trunk
Index: EXTENSIONS
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/EXTENSIONS,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- EXTENSIONS 22 Dec 2006 14:51:13 -0000 1.7
+++ EXTENSIONS 20 Feb 2007 12:06:49 -0000 1.8
@@ -15,12 +15,14 @@
Due to some problem's with Pathfinder's XQuery parser, note that
"our" syntax for rename expression is
- "do rename" TargetExpr "with" NewNameExpr
+ "do rename" TargetExpr "into" NewNameExpr
-while the Update Facility uses "as" instead of "with". Sorry
+while the Update Facility uses "as" instead of "into". Sorry
for the inconvenience.
-We do not currently support the upd:put() operator.
+(The same issue has been discussed in the W3C XQuery bug
+tracking system: http://www.w3.org/Bugs/Public/show_bug.cgi?id=4176.)
+
2. Transitive Closure Operator
------------------------------
@@ -133,60 +135,80 @@
--------------------------------
The XQuery specification provides limited means for querying the
-meta-data repository (i.e. fn:doc() and fn:collection()), and no
-means to change it (i.e. add and delete documents).
+meta-data repository (i.e. fn:doc() and fn:collection()), and no means
+to change it (i.e. add and delete documents).
-To avoid having to resort to other means than XQuery for data
-management tasks, we provide the following functions:
+To avoid having to resort to other means than XQuery for data management
+tasks, we provide the following functions:
-pf:del-doc(name as xs:string)
-pf:add-doc(location as xs:string,
- name as xs:string,
- collection as xs:string,
- percentage as xs:integer)
+ pf:del-doc(name as xs:string) as docmgmt
+ pf:add-doc(location as xs:string,
+ name as xs:string,
+ collection as xs:string,
+ percentage as xs:integer) as docmgmt
-An XML document is stored at a 'location' (URI) and can be given
-a logical name. A 'collection' is a database object that contains
-multiple documents. Especially in cases where we have many small
-documents, it may make sense to store them together in a collection
-(i.e. by using the same 'collection' name in the pf:add-doc() function).
+An XML document is stored at a 'location' (URI) and can be given a
+logical name. A 'collection' is a database object that contains multiple
+documents. Especially in cases where we have many small documents, it
+may make sense to store them together in a collection (i.e. by using the
+same 'collection' name in the pf:add-doc() function).
-Parameters: in pf:add-doc(), 'name' and 'collection' may be both omitted,
-in which case name=collection=location. If only 'collection' is omitted,
-collection=name. Percentage may always be omitted, in which case it is 0.
+Parameters: in pf:add-doc(), 'name' and 'collection' may be both
+omitted, in which case name=collection=location. If only 'collection'
+is omitted, collection=name. Percentage may always be omitted, in which
+case it is 0.
The percentage is a percentage of free space to leave in the shredded
-document to accomodate future updates. Colections with a percentage=0
-are taken to be read-only. Updates to such documents produce a runtime error.
+document to accomodate future updates. Colections with a percentage=0
+are taken to be read-only. Updates to such documents produce a runtime
+error.
+
+Calls to functions that manipulate the persistent storage may not be
+intermixed with update statements or query expressions. All docuemnt
+management functions return the special type `docmgmt' to ensure this.
+You can call document management functions from user-defined functions.
+But you explicitly have to declare your function as a document
+management function using the Pathfinder syntax extension
+
+ declare document management function your-function-name (..args..)
+ {
+ ..body..
+ };
+
+(similar in spirit to the `declare updating function' syntax from the
+W3C XQuery Update Facility).
We also provide two information functions:
pf:collections() as xs:string*
pf:documents(collection as xs:string*) as xs:string*
-The pf:collections() function provides a full list of all collection names.
-The pf:documents() function provides a full list of all document names
- in a collection.
+The pf:collections() function provides a full list of all collection
+names. The pf:documents() function provides a full list of all document
+names in a collection.
7. Element Node Identifiers
---------------------------
-Internally, all nodes get an immutable identifier in the MonetDB backend.
-These identifiers are integer numbers, but represented as a xs:string.
+Internally, all nodes get an immutable identifier in the MonetDB
+backend. These identifiers are integer numbers, but represented as a
+xs:string.
This identifier can be obtained using the function:
pf:nid(element()*) as xs:string*
-With this identifier, elements can be quickly retrieved using the existing:
+With this identifier, elements can be quickly retrieved using the
+existing:
-fn:id(xs:string*) as node()*
-fn:id(xs:string*, node()) as node*
+ fn:id(xs:string*) as node()*
+ fn:id(xs:string*, node()) as node*
-Note that this is an extension of fn:id() because the ID xs:string values
-normally cannot start with a digit (this is how we distinguish between them).
+Note that this is an extension of fn:id() because the ID xs:string
+values normally cannot start with a digit (this is how we distinguish
+between them).
-Element node identifiers (and standard ID/IDREF support) are currently only
-available in Pathfinder's "milprint_summer" back-end.
+Element node identifiers (and standard ID/IDREF support) are currently
+only available in Pathfinder's "milprint_summer" back-end.
-------------------------------------------------------------------------
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