summaryrefslogtreecommitdiff
path: root/include/my_xml.h
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2005-12-21 17:13:52 +0400
committerunknown <bar@mysql.com>2005-12-21 17:13:52 +0400
commit5e4c3ce6822cac4313cd457136ea8827fce37a77 (patch)
treef1892af36f586e6b88e05253d3a7310eb806f577 /include/my_xml.h
parentf78594c028dbb33b740c7bb3d9b310568b64508e (diff)
downloadmariadb-git-5e4c3ce6822cac4313cd457136ea8827fce37a77.tar.gz
Adding XPath support: ExtractValue and UpdateXML functions.
libmysqld/Makefile.am: sql/Makefile.am: Adding new source files. Adding new file into build process. include/my_xml.h: strings/xml.c: Adding new XML parse flags to skip text normalization and to use relative tag names. Adding enum for XML token types. sql/lex.h: Making parser aware of new SQL functions. sqll/item_create.h, sql/item_create.cc: Adding creators for ExtractValue and UpdateXML. sql/item.h: Adding new Item types: nodeset and nodeset comparator. sql/item_xmlfunc.h sql/item_xmlfunc.cc Adding new classes implementing XPath functions. mysql-test/t/xml.test, mysql-test/r/xml.result: New files: adding test case include/my_xml.h: Adding ExtractValue and UpdateXML functions. Adding XML parser flags and enum for XML token types. sql/Makefile.am: Adding new source files. sql/item.h: Adding new Item types: nodeset and nodeset comparator. sql/item_create.cc: Adding creators for ExtractValue and UpdateXML. sql/item_create.h: Adding creators for ExtractValue and UpdateXML. sql/lex.h: Make parse aware of new SQL functions. strings/xml.c: Adding new flags to skip text normalization and to use relative tag names. libmysqld/Makefile.am: Adding new file into build process.
Diffstat (limited to 'include/my_xml.h')
-rw-r--r--include/my_xml.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/my_xml.h b/include/my_xml.h
index 82de995e700..0d779ea6fb9 100644
--- a/include/my_xml.h
+++ b/include/my_xml.h
@@ -26,8 +26,31 @@ extern "C" {
#define MY_XML_OK 0
#define MY_XML_ERROR 1
+/*
+ A flag whether to use absolute tag names in call-back functions,
+ like "a", "a.b" and "a.b.c" (used in character set file parser),
+ or relative names like "a", "b" and "c".
+*/
+#define MY_XML_FLAG_RELATIVE_NAMES 1
+
+/*
+ A flag whether to skip normilization of text values before calling
+ call-back functions: i.e. skip leading/trailing spaces,
+ \r, \n, \t characters.
+*/
+#define MY_XML_FLAG_SKIP_TEXT_NORMALIZATION 2
+
+enum my_xml_node_type
+{
+ MY_XML_NODE_TAG, /* can have TAG, ATTR and TEXT children */
+ MY_XML_NODE_ATTR, /* can have TEXT children */
+ MY_XML_NODE_TEXT /* cannot have children */
+};
+
typedef struct xml_stack_st
{
+ int flags;
+ enum my_xml_node_type current_node_type;
char errstr[128];
char attr[128];
char *attrend;