Commit 63328458 authored by Jérôme Maloberti's avatar Jérôme Maloberti

Correct previous fix + improve error message in case of missing namespace.

parent ce53c58e
......@@ -81,7 +81,7 @@ module Token = struct
let extract_string =
function
| KEYWORD s | IDENT s | INT s | STRING1 s | STRING2 s |
ANY_IN_NS -> s
ANY_IN_NS s -> s
| tok ->
invalid_arg ("Cannot extract a string from this token: "^
to_string tok)
......
......@@ -100,7 +100,8 @@ let load_xml ?(ns=false) s =
| _ -> Value.failwith' "No XML stream to parse"
with e -> stack := Empty; txt.pos <-0;
match e with
| Ns.UnknownPrefix _ -> Value.failwith' "Unknown namespace prefix"
| Ns.UnknownPrefix n -> Value.failwith'
("Unknown namespace prefix: " ^ (U.get_str n))
| e -> raise e
......
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