Commit 5ade8ec7 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2005-03-06 23:01:52 by afrisch] Cosmestique

Original author: afrisch
Date: 2005-03-06 23:01:52+00:00
parent bacc56cd
...@@ -65,8 +65,8 @@ let concat v1 v2 = ...@@ -65,8 +65,8 @@ let concat v1 v2 =
let append v1 v2 = let append v1 v2 =
concat v1 (Pair (v2,nil)) concat v1 (Pair (v2,nil))
let failwith' s = raise (CDuceExn (string_latin1 s))
let raise' v = raise (CDuceExn v) let raise' v = raise (CDuceExn v)
let failwith' s = raise' (string_latin1 s)
let rec const = function let rec const = function
......
...@@ -478,8 +478,10 @@ let int_type (name,min,max) = ...@@ -478,8 +478,10 @@ let int_type (name,min,max) =
let min = Intervals.V.mk min in let min = Intervals.V.mk min in
Intervals.right min Intervals.right min
| None, None -> | None, None ->
Intervals.any in Intervals.any
ignore (primitive name (Types.interval ival) (validate_interval ival name in
ignore (primitive name (Types.interval ival) (validate_interval ival name))
let () = let () =
List.iter int_type [ List.iter int_type [
"integer", None, None; "integer", None, None;
......
...@@ -154,7 +154,7 @@ let stream_of_value v = ...@@ -154,7 +154,7 @@ let stream_of_value v =
stack := tl; stack := tl;
Some (E_end_tag (Atoms.V.value atom)) Some (E_end_tag (Atoms.V.value atom))
| (Fully (Value.Xml (_, _, _)))::_ | (Half (Value.Xml (_, _, _)))::_ -> | (Fully (Value.Xml (_, _, _)))::_ | (Half (Value.Xml (_, _, _)))::_ ->
failwith "Schema_xml.pxp_stream_of_value: non-atom-tag xml value" Value.failwith' "Validate: non XML element"
| (Backlog ev) :: tl -> (* consume backlog *) | (Backlog ev) :: tl -> (* consume backlog *)
stack := tl; stack := tl;
Some ev Some ev
...@@ -162,8 +162,7 @@ let stream_of_value v = ...@@ -162,8 +162,7 @@ let stream_of_value v =
stack := tl; stack := tl;
Some (E_char_data v) Some (E_char_data v)
| [] -> None | [] -> None
| _ -> | _ -> Value.failwith' "Validate: non XML element"
failwith "Non XML element"
in in
Stream.from f Stream.from f
......
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