Update of /cvsroot/monetdb/pathfinder/src/sqlhelpers/xmlshred/include
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13839/include

Modified Files:
        guides.h 
Log Message:
-- Restructured the computation of minimum/maximum node occurrences
   in the guide tree



Index: guides.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/src/sqlhelpers/xmlshred/include/guides.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- guides.h    8 Jan 2008 10:00:08 -0000       1.7
+++ guides.h    10 Jan 2008 09:55:01 -0000      1.8
@@ -34,21 +34,25 @@
 /* SAX parser interface (libxml2) */
 #include "libxml/parser.h"
 
-#define GUIDE_INIT 1
-
 typedef struct child_list_t child_list_t;
+
 struct child_list_t {
     child_list_t    *next_element;
     guide_tree_t    *node;
 };
 
+/* A guide node represents all XML nodes with identical
+ * (1) kind,
+ * (2) local name and namespace URI (if applicable), and
+ * (3) path to document node.
+ */
 struct guide_tree_t {
     xmlChar      *uri;
     xmlChar      *localname;
     nat           count;
-    nat           rel_count;
-    nat           min;
-    nat           max;
+    nat           occur;
+    nat           min_occur;
+    nat           max_occur;
     guide_tree_t *parent;
     child_list_t *child_list;
     child_list_t *last_child;
@@ -56,17 +60,17 @@
     kind_t        kind;
 };
 
-/* insert a node in the guide tree */
-guide_tree_t* insert_guide_node(const xmlChar *URI, const xmlChar *tag_name, 
-                                guide_tree_t *parent, kind_t kind);
+/* Insert an XML node into the guide tree */
+guide_tree_t* insert_guide_node(const xmlChar*, const xmlChar*, 
+                                guide_tree_t*, kind_t);
 
-/* adjust the minimum and maximum values of guide nodes */
-void adjust_guide_min_max (guide_tree_t *guide);
+/* Adjust minimum and maximum occurrence of guide nodes */
+void guide_occurrence (guide_tree_t*);
 
-/* print the guide tree */
-void print_guide_tree(FILE *guide_out, guide_tree_t *root, int tree_depth);
+/* Serialize the guide tree in an XML format */
+void print_guide_tree(FILE*, guide_tree_t*, int);
 
-/* free the guide tree */
-void free_guide_tree(guide_tree_t *root);
+/* Free the guide tree */
+void free_guide_tree(guide_tree_t*);
 
 #endif /* GUIDES_H__ */


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to