Commit 18e70bd5 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2006-03-17 14:19:53 by afrisch] Deal with 'namespace on'

Original author: afrisch
Date: 2006-03-17 14:19:53+00:00
parent 13be5723
......@@ -131,7 +131,8 @@ let stream_of_value v =
let f _ = (* lazy visit of a tree of CDuce XML values, stack keeps track of
what has still to be visited *)
match !stack with
| (Fully ((Value.Xml (Value.Atom atom, attrs, _)) as v)) :: tl ->
| (Fully ((Value.Xml (Value.Atom atom, attrs, _))
|(Value.XmlNs (Value.Atom atom, attrs, _, _)) as v)) :: tl ->
stack := (Half v) :: tl;
let children = ref [] in (* TODO inefficient *)
let push v s = (s := v :: !s) in
......@@ -139,7 +140,7 @@ let stream_of_value v =
(fun pcdata -> push (Other pcdata) children)
(fun v ->
match v with
| (Value.Xml (_, _, _)) as v -> push (Fully v) children
| (Value.Xml _ | Value.XmlNs _) as v -> push (Fully v) children
| v -> raise (Invalid_argument "Schema_events.stream_of_value"))
v;
stack := (List.rev !children) @ !stack;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment