Update of /cvsroot/monetdb/MonetDB5/src/modules/atoms
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15018/src/modules/atoms
Modified Files:
Tag: GDK-2
xml.mx
Log Message:
propagated changes of Friday Aug 24 2007 - Tuesday Aug 28 2007
from the development trunk to the GDK-2 branch
There were inexplicable conflicts in src/modules/mal/batxml.mx and
src/modules/mal/Tests/inspect05.stable.out, neither of which had been
changed on the branch. I just copied the HEAD version to the branch
to resolve the conflicts.
Index: xml.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/atoms/xml.mx,v
retrieving revision 1.4.2.3
retrieving revision 1.4.2.4
diff -u -d -r1.4.2.3 -r1.4.2.4
--- xml.mx 24 Aug 2007 09:01:24 -0000 1.4.2.3
+++ xml.mx 28 Aug 2007 13:15:14 -0000 1.4.2.4
@@ -43,6 +43,15 @@
address XMLpi
comment "Call the processing instruction";
+command document(val:str):xml
+address XMLdocument
+comment "Check the value for compliance as XML document";
+
+command content(val:str):xml
+address XMLcontent
+comment "Check the value for compliance as content, i.e.
+it may contain multiple roots and character data.";
+
command root(val:xml, version:str, standalone:str):xml
address XMLroot
comment "Contruct the root nodes";
@@ -100,6 +109,8 @@
xml_export str XMLxml2str(str *s, xml *x);
xml_export str XMLstr2xml(xml *x, str *s);
+xml_export str XMLdocument(xml *x, str *s);
+xml_export str XMLcontent(xml *x, str *s);
xml_export str XMLisdcoument(bit *x, str *s);
xml_export str XMLcomment(xml *x, str *s);
xml_export str XMLpi(xml *x, str *nme, str *s);
@@ -154,6 +165,20 @@
}
str
+XMLdocument(xml *x, str *val){
+ /* call the libxml2 library to perform the test */
+ *x= (str) GDKstrdup(*val);
+ return MAL_SUCCEED;
+}
+
+str
+XMLcontent(xml *x, str *val){
+ /* call the libxml2 library to perform the test */
+ *x= (str) GDKstrdup(*val);
+ return MAL_SUCCEED;
+}
+
+str
XMLisdocument(bit *x, str *s){
(void) x;
(void) s;
@@ -215,8 +240,8 @@
strlen(*nspace) + strlen(*attr)+
strlen("<></> ")+strlen(*val)+1);
if( strNil(*nspace) && strNil(*attr))
- snprintf(buf,len,"<%s %s %s>%s</%s>",
- *name, *nspace, *attr, *val, *name);
+ snprintf(buf,len,"<%s>%s</%s>",
+ *name, *val, *name);
else
if( strNil(*nspace))
snprintf(buf,len,"<%s %s>%s</%s>",
@@ -226,8 +251,8 @@
snprintf(buf,len,"<%s %s>%s</%s>",
*name, *attr, *val, *name);
else
- snprintf(buf,len,"<%s>%s</%s>",
- *name, *val, *name);
+ snprintf(buf,len,"<%s %s %s>%s</%s>",
+ *name, *nspace, *attr, *val, *name);
*ret= buf;
return MAL_SUCCEED;
@@ -263,6 +288,7 @@
for( i=p->retc; i<p->argc; i++)
len += strlen(*(str*)getArgReference(stk,p,i));
buf= (str) GDKmalloc(len+1);
+ buf[0]=0;
for( i=p->retc; i<p->argc; i++)
strcat(buf,*(str*)getArgReference(stk,p,i));
-------------------------------------------------------------------------
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