Fix stupid bug with Tag indices
[SXSI/xpathcomp.git] / XMLDocShredder.h
index 19ed10f..437452e 100644 (file)
 #include <libxml++/libxml++.h>
 #include <libxml++/parsers/textreader.h>
 #include <string>
-#include <unordered_map>
 #include "StorageInterface.h"
 
 using namespace std;
 using namespace xmlpp;
-/* For Hashmap. Seems fairly well supported */
-using namespace __gnu_cxx; 
 
-typedef pair<int,string> cons_str;
-typedef pair<string,int> cons_int;
 
 class XMLDocShredder
 {
@@ -45,8 +40,6 @@ public:
        virtual void processUnknownNodeType();
        virtual void processCDATASection();
        virtual void parse();
-       virtual int tagID(string);
-       virtual string idTag(int);
        
        StorageInterface *storageIfc_;
 
@@ -54,8 +47,10 @@ public:
 private:
        TextReader *reader_;
        void setProperties();
-       unordered_map<int,string> idTags_;
-       unordered_map<string,int> tagsID_;
+       bool last_text;
+       string buffer; 
+       // used to coalece successive text events
+       // which can occur if we discard pi and comment nodes.
 };
 
 #endif /*XMLDOCSHREDDER_H_*/