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

Modified Files:
        Makefile.ag xml.mx 
Log Message:
The interface for SQL/XML first draft.


Index: Makefile.ag
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/atoms/Makefile.ag,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- Makefile.ag 17 Aug 2007 13:56:34 -0000      1.33
+++ Makefile.ag 20 Aug 2007 21:38:45 -0000      1.34
@@ -46,7 +46,7 @@
 
 scripts_mal = {
        DIR = pkglibdir
-       SOURCES = str.mx blob.mx url.mx mtime.mx streams.mx inet.mx color.mx
+       SOURCES = str.mx blob.mx url.mx mtime.mx streams.mx inet.mx color.mx 
xml.mx
 }
 
 EXTRA_DIST_DIR = Tests

Index: xml.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/atoms/xml.mx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- xml.mx      19 Aug 2007 09:26:08 -0000      1.1
+++ xml.mx      20 Aug 2007 21:38:45 -0000      1.2
@@ -23,13 +23,39 @@
 @mal
 atom xml:str;  #use a subtype for XML
 
-command xml(s:str):xml
+command xml(src:str):xml
 address XMLstr2xml
-comment "Validate a string as a XML string";
+comment "Cast the string to an xml compliant string";
 
-command str(x:xml):str
+command str(src:xml):str
 address XMLxml2str
-comment "Coerce an XML value to a string";
+comment "Cast the string to an xml compliant string";
+
+command xml.attribute(name:str, val:str):xml
+address XMLattribute
+comment "Construct an attribute value pair";
+
+pattern xml.attributes(val:xml... ):xml
+address XMLattributes
+comment "Collect the attributes of an element into a single structure";
+
+pattern xml.element(name:str, ns:bat[:oid,:str], attr:xml, s:xml... ) :xml
+address XMLelement
+comment "The basic building block for XML elements are namespaces, attributes 
and a sequence
+of xml elements. The name space and the attributes may be left 
unspecified(=nil:bat).";
+
+pattern xml.concat(val:xml... ):xml
+address XMLconcat
+comment "Concatenate the xml values";
+
+command xml.trunk(nme:str, val:xml):xml
+address XMLtrunk
+comment "Prepare an element for a forest construction";
+
+pattern xml.forest(val:xml...):xml
+address XMLforest
+comment "Construct an element list");
+
 @{
 @- Implementation
 The implementation of the XML atomary type is based
@@ -58,6 +84,10 @@
 
 xml_export str XMLxml2str(str *s, xml *x);
 xml_export str XMLstr2xml(xml *x, str *s);
+xml_export str XMLattribute(xml *ret, str *name, str *val);
+xml_export str XMLattributes(MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
+xml_export str XMLelement(MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
+xml_export str XMLconcat(MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
 
 #endif /* XML_H */
 @c
@@ -77,3 +107,58 @@
                throw(MAL,"xml.xml","Invalid xml format");
        return MAL_SUCCEED;
 }
+
+str XMLattribute(xml *ret, str *name, str *val);
+str XMLattributes(MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
+str XMLelement(MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
+str XMLconcat(MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
+str
+XMLattribute(xml *ret, str *name, str *val)
+{
+       (void) ret;
+       (void) name;
+       (void) val;
+       throw(MAL,"xml.attribute","Not yet implemented");
+}
+
+str
+XMLattributes(MalBlkPtr mb, MalStkPtr stk, InstrPtr p)
+{
+       (void) mb;
+       (void) stk;
+       (void) p;
+       throw(MAL,"xml.attributes","Not yet implemented");
+}
+
+str
+XMLelement(MalBlkPtr mb, MalStkPtr stk, InstrPtr p)
+{
+       (void) mb;
+       (void) stk;
+       (void) p;
+       throw(MAL,"xml.element","Not yet implemented");
+}
+
+str
+XMLconcat(MalBlkPtr mb, MalStkPtr stk, InstrPtr p)
+{
+       (void) mb;
+       (void) stk;
+       (void) p;
+       throw(MAL,"xml.element","Not yet implemented");
+}
+str
+XMLtrunk(int *ret, str *nme, str *val){
+       (void) ret;
+       (void) nme;
+       (void) val;
+       throw(MAL,"xml.trunk","Not yet implemented");
+}
+str
+XMLforest(MalBlkPtr mb, MalStkPtr stk, InstrPtr p)
+{
+       (void) mb;
+       (void) stk;
+       (void) p;
+       throw(MAL,"xml.element","Not yet implemented");
+}


-------------------------------------------------------------------------
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