-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxsd.mli
84 lines (68 loc) · 3.29 KB
/
xsd.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
(******************************************************************************
Rainbow, a termination proof certification tool
See the COPYRIGHTS and LICENSE files.
- Frederic Blanqui, 2009-10-20
internal representation of XSD files
******************************************************************************)
type bound = Bound of int | Unbounded;;
type xsd =
| Elt of string * xsd option * int * bound
| Group of string * xsd option * int * bound
| GroupRef of string * int * bound
| Choice of xsd list
| Sequence of xsd list
| SimpleType of string;;
val xsd : xsd Util.bprint;;
(*****************************************************************************)
(* xsds *)
(*****************************************************************************)
val name_of_elt : xsd -> string
val name_eq : string -> xsd -> bool
val init_types : xsd list -> unit
val _is_group : Util.StrSet.elt -> bool
val next_type : unit -> xsd
val add_type : string option -> xsd -> string * bool
(*
(*val new_type_id : unit -> int;;*)
val init_types : Xsd.xsd list -> unit;;
val _is_group : Util.StrSet.elt -> bool;;
val next_type : unit -> Xsd.xsd;;
val add_type : string option -> Xsd.xsd -> string * bool;;*)
(*****************************************************************************)
(* flattening replace inner choice to groupref and generate Group *)
(*****************************************************************************)
val flatten_innerchoice_xsd : string option -> xsd -> xsd * xsd list
val flatten_innerchoice_xsds : xsd list -> xsd list * xsd list
val flatten_top_innerchoice_xsd : xsd -> xsd * xsd list
val flatten_innerchoice_def : xsd -> xsd list
val flatten_innerchoice : xsd list -> xsd list
(*****************************************************************************)
(* flattening replace inner sequence to groupref and generate Group *)
(*****************************************************************************)
(*
val flatten_innersequence_xsd :
string -> string option -> xsd -> xsd * xsd list
val flatten_innersequence_xsds : string -> xsd list -> xsd list * xsd list
val flatten_top_innersequence_xsd : string -> xsd -> xsd * xsd list
val flatten_innersequence_def : xsd -> xsd list
val flatten_innersequence : xsd list -> xsd list*)
(*****************************************************************************)
(* Flattening replace <SimpleType> by <GroupRef> *)
(*****************************************************************************)
(*
val flatten_simpl_to_groupref_xsd : string option -> xsd -> xsd * xsd list
val flatten_simpl_to_groupref_xsds : xsd list -> xsd list * xsd list
val flatten_top_simpl_to_groupref : xsd -> xsd * xsd list
val flatten_def_simpl_to_groupref : xsd -> xsd list
val flatten_simpl_to_groupref : xsd list -> xsd list*)
(*****************************************************************************)
(* split xsds *)
(*****************************************************************************)
val get_name_sequence : xsd -> string list
val get_par_name_sequence : xsd -> string list
val get_name_choice : xsd -> string list
val get_name_lists : xsd list -> string list
val get_list_name : xsd -> string list
val get_pair_name : xsd -> string * string list
val get_list_xsds : xsd list -> (string * string list) list
val constructor_name : string -> string -> string;;