X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=XMLTree.h;h=c6542a0766a7ce0e00023d9d32d6ade19d2621d1;hb=b6f779e236950176bab71fce980ac1685e8661c0;hp=67ffd6e62488a323c38ff5520f5e1cb0ec3a4ea9;hpb=39ee9d4c866fd5e4ba478ef65dc7e714e80c0b91;p=SXSI%2FXMLTree.git diff --git a/XMLTree.h b/XMLTree.h index 67ffd6e..c6542a0 100644 --- a/XMLTree.h +++ b/XMLTree.h @@ -217,7 +217,14 @@ public: * preorder than x and not in the subtree of x. Returns NULLT if there * is none. */ treeNode TaggedFoll(treeNode x, TagType tag); - + + /** TaggedFollowingSibling(x,tag) */ + treeNode TaggedFollowingSibling(treeNode x, TagType tag); + + /** TaggedAncestor(x, tag): returns the closest ancestor of x tagged + * tag. Return NULLT is there is none. */ + treeNode TaggedAncestor(treeNode x, TagType tag); + /** PrevText(x): returns the document identifier of the text to the left of * node x, or NULLT if x is the root node. */ DocID PrevText(treeNode x); @@ -394,7 +401,8 @@ public: } uchar* GetCachedText(DocID d) { - return (uchar*) (CachedText.at(d).c_str()); + uchar * str = (uchar*) calloc(sizeof(char),(CachedText.at(d).size() + 1)); + return (uchar*) (str); } TextCollection *getTextCollection() {