projects
/
tatoo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a test case for attribute handling.
[tatoo.git]
/
src
/
tree
/
naive.ml
diff --git
a/src/tree/naive.ml
b/src/tree/naive.ml
index
37683f3
..
db1b202
100644
(file)
--- a/
src/tree/naive.ml
+++ b/
src/tree/naive.ml
@@
-14,7
+14,7
@@
(***********************************************************************)
(*
(***********************************************************************)
(*
- Time-stamp: <Last modified on 2013-03-0
4 23:40:26
CET by Kim Nguyen>
+ Time-stamp: <Last modified on 2013-03-0
5 16:20:32
CET by Kim Nguyen>
*)
open Utils
*)
open Utils
@@
-72,7
+72,7
@@
struct
"NODE " ^ string_of_int n.preorder)
let debug_node fmt node =
"NODE " ^ string_of_int n.preorder)
let debug_node fmt node =
- Format.fprintf fmt "{ tag=%s; preorder=%i; data=%
s
; first_child=%a; next_sibling=%a; parent=%a }"
+ Format.fprintf fmt "{ tag=%s; preorder=%i; data=%
S
; first_child=%a; next_sibling=%a; parent=%a }"
(QName.to_string node.tag)
node.preorder
node.data
(QName.to_string node.tag)
node.preorder
node.data
@@
-264,7
+264,7
@@
let rec print_xml out tree_ node =
in
print_xml out tree_ node.next_sibling
in
print_xml out tree_ node.next_sibling
-
+let print_xml out tree_ node = print_xml out tree_ { node with next_sibling = nil }
let root t = t.root
let first_child _ n = n.first_child
let next_sibling _ n = n.next_sibling
let root t = t.root
let first_child _ n = n.first_child
let next_sibling _ n = n.next_sibling
@@
-272,3
+272,5
@@
let parent _ n = n.parent
let tag _ n = n.tag
let data _ n = n.data
let preorder _ n = n.preorder
let tag _ n = n.tag
let data _ n = n.data
let preorder _ n = n.preorder
+
+let print_node fmt n = Parser.debug_node fmt n