X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=XMLTree.h;h=c054b0135bd467f4c2bb7f47485e8187da7220c7;hb=46dd7565a6c8d813459b81cf2b19446db1b51010;hp=7407014e7bd17c0870ad9eee0e43e1d0db3eb6bd;hpb=a9846746dc7a55764591fcc273fd48c6049df962;p=SXSI%2FXMLTree.git diff --git a/XMLTree.h b/XMLTree.h index 7407014..c054b01 100644 --- a/XMLTree.h +++ b/XMLTree.h @@ -90,6 +90,8 @@ class XMLTree { int parArraySize; int ntagnames; unsigned int *empty_texts_aux; + bool found_attributes; + bool disable_tc; public: @@ -209,14 +211,16 @@ public: /** ParentNode(d): returns the parent node of document identifier d. */ treeNode ParentNode(DocID d); - /** OpenDocument(empty_texts,sample_rate_text): initilizes the construction + /** OpenDocument(empty_texts,sample_rate_text,dtc): initilizes the construction * of the data structure for the XML document. Parameter empty_texts * indicates whether we index empty texts in document or not. Parameter * sample_rate_text indicates the sampling rate for the text searching data * structures (small values get faster searching but a bigger space - * requirement). Returns a non-zero value upon success, NULLT in case of + * requirement). dtc disable the use of the TextCollection + * (i.e. everything is considered an empty text *) + * Returns a non-zero value upon success, NULLT in case of * error. */ - int OpenDocument(bool empty_texts, int sample_rate_text); + int OpenDocument(bool empty_texts, int sample_rate_text, bool dtc); /** CloseDocument(): finishes the construction of the data structure for * the XML document. Tree and tags are represented in the final form, @@ -254,6 +258,12 @@ public: * Returns NULL in case that the tag identifier is not valid.*/ unsigned char *GetTagName(TagType tagid); + + TagType RegisterTag(unsigned char *tagname); + + bool EmptyText(DocID i) { + return Text->EmptyText(i); + } /** Prefix(s): search for texts prefixed by string s. */ TextCollection::document_result Prefix(uchar const *s) { return Text->Prefix(s);