| 1 |
|
| 2 |
open Schema_types
|
| 3 |
|
| 4 |
type validator
|
| 5 |
|
| 6 |
(** {2 validator constructors} *)
|
| 7 |
|
| 8 |
val validator_of_simple_type : simple_type_def -> validator
|
| 9 |
|
| 10 |
val validator_of_complex_type :
|
| 11 |
complex_type_def ->
|
| 12 |
((string * string) list -> Value.t) * validator
|
| 13 |
|
| 14 |
val validator_of_elt_decl : elt_decl -> validator
|
| 15 |
|
| 16 |
(** {2 validation} *)
|
| 17 |
|
| 18 |
(** validate a PXP stream against a validator *)
|
| 19 |
val validate : validator:validator -> Pxp_yacc.event Stream.t -> Value.t
|
| 20 |
|
| 21 |
(** validate a string against a simple type *)
|
| 22 |
val validate_simple_type : simple_type_def -> string -> Value.t
|
| 23 |
|