Big refactoring of libxml-tree, part (1) (everything compiles)
[SXSI/xpathcomp.git] / src / tree.ml
index 66bf159..10a499d 100644 (file)
@@ -53,9 +53,9 @@ struct
   external create : unit -> t = "caml_xml_tree_builder_create"
   external open_document : t -> bool -> int -> bool -> int -> unit = "caml_xml_tree_builder_open_document"
   external close_document : t -> tree = "caml_xml_tree_builder_close_document"
-  external open_tag : t -> string -> unit = "caml_xml_tree_builder_new_open_tag"
-  external close_tag : t -> string -> unit = "caml_xml_tree_builder_new_closing_tag"
-  external text : t -> string -> unit = "caml_xml_tree_builder_new_text"
+  external open_tag : t -> string -> unit = "caml_xml_tree_builder_open_tag"
+  external close_tag : t -> string -> unit = "caml_xml_tree_builder_close_tag"
+  external text : t -> string -> unit = "caml_xml_tree_builder_text"
 
   let is_whitespace s =
     let rec loop len i =
@@ -264,14 +264,11 @@ let next_sibling t n = tree_next_sibling t.doc n
 external tree_next_element : tree -> [`Tree] Node.t -> [`Tree] Node.t = "caml_xml_tree_next_element"  "noalloc"
 let next_element t n = tree_next_element t.doc n
 
-external tree_next_node_before : tree -> [`Tree] Node.t -> [`Tree] Node.t -> [`Tree] Node.t = "caml_xml_tree_next_node_before"  "noalloc"
-let next_node_before t n ctx = tree_next_node_before t.doc n ctx
+external tree_tagged_sibling : tree -> [`Tree] Node.t -> Tag.t -> [`Tree] Node.t = "caml_xml_tree_tagged_sibling" "noalloc"
+let tagged_sibling t n tag = tree_tagged_sibling t.doc n tag
 
-external tree_tagged_following_sibling : tree -> [`Tree] Node.t -> Tag.t -> [`Tree] Node.t = "caml_xml_tree_tagged_following_sibling" "noalloc"
-let tagged_following_sibling t n tag = tree_tagged_following_sibling t.doc n tag
-
-external tree_select_following_sibling : tree -> [`Tree ] Node.t -> unordered_set -> [`Tree] Node.t = "caml_xml_tree_select_following_sibling" "noalloc"
-let select_following_sibling t n tag_set = tree_select_following_sibling t.doc n tag_set
+external tree_select_sibling : tree -> [`Tree ] Node.t -> unordered_set -> [`Tree] Node.t = "caml_xml_tree_select_sibling" "noalloc"
+let select_sibling t n tag_set = tree_select_sibling t.doc n tag_set
 
 external tree_prev_sibling : tree -> [`Tree] Node.t -> [`Tree] Node.t = "caml_xml_tree_prev_sibling" "noalloc"
 let prev_sibling t n = tree_prev_sibling t.doc n
@@ -296,11 +293,6 @@ let select_following_before t n tag_set ctx = tree_select_following_before t.doc
 external tree_parent : tree -> [`Tree] Node.t -> [`Tree] Node.t = "caml_xml_tree_parent" "noalloc"
 let parent t n = tree_parent t.doc n
 
-external tree_binary_parent : tree -> [`Tree] Node.t -> [`Tree] Node.t = "caml_xml_tree_binary_parent"
-  "noalloc"
-let binary_parent t n = tree_binary_parent t.doc n
-
-
 external tree_tag : tree -> [`Tree] Node.t -> Tag.t = "caml_xml_tree_tag" "noalloc"
 let tag t n = tree_tag t.doc n