projects
/
tatoo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix a bug: attributes were considered as nodes -> using first_child_x
[tatoo.git]
/
src
/
tree.mli
diff --git
a/src/tree.mli
b/src/tree.mli
index
c75fd26
..
b64b0ff
100644
(file)
--- a/
src/tree.mli
+++ b/
src/tree.mli
@@
-49,6
+49,12
@@
val first_child : t -> node -> node
Returns [nil] if [n] is a leaf. Returns [nil] if [n == nil].
*)
Returns [nil] if [n] is a leaf. Returns [nil] if [n == nil].
*)
+val first_child_x : t -> node -> node
+(** [first_child t n] returns the first child which is not an attribute
+ of node [n] in tree [t].
+ Returns [nil] if [n] is a leaf. Returns [nil] if [n == nil].
+*)
+
val next_sibling : t -> node -> node
(** [next_sibling t n] returns the next_sibling of node [n] in tree [t].
Returns [nil] if [n] is the last child of a node.
val next_sibling : t -> node -> node
(** [next_sibling t n] returns the next_sibling of node [n] in tree [t].
Returns [nil] if [n] is the last child of a node.
@@
-62,7
+68,10
@@
val parent : t -> node -> node
*)
val is_leaf : t -> node -> bool
*)
val is_leaf : t -> node -> bool
-(** Return true if the node is a *)
+(** Return true if the node is a leaf or an attribute *)
+
+val is_attribute : t -> node -> bool
+(** Return true if the node is an attribute *)
val tag : t -> node -> QName.t
(** Returns the label of a given node *)
val tag : t -> node -> QName.t
(** Returns the label of a given node *)
@@
-81,3
+90,6
@@
val preorder : t -> node -> int
val print_xml_preorder : out_channel -> t -> node -> unit
(** Outputs the tree with IDs for nodes as an XML document on the
given output_channel *)
val print_xml_preorder : out_channel -> t -> node -> unit
(** Outputs the tree with IDs for nodes as an XML document on the
given output_channel *)
+
+val debug_node : Format.formatter -> t -> node -> unit
+(** DEBUG *)