Commit f2bb44af authored by Pietro Abate's avatar Pietro Abate

[r2004-10-20 16:31:05 by afrisch] ...

Original author: afrisch
Date: 2004-10-20 16:31:07+00:00
parent 514518e0
......@@ -135,7 +135,6 @@ CLEAN_DIRS = $(DIRS) cdo2cmo tools tests
# Objects to build
SCHEMA_OBJS = \
schema/schema_components.cmo schema/schema_import.cmo \
schema/schema_types.cmo \
schema/schema_xml.cmo \
schema/schema_common.cmo \
......@@ -143,6 +142,9 @@ SCHEMA_OBJS = \
schema/schema_validator.cmo \
schema/schema_parser.cmo \
NEW_SCHEMA_OBJS = \
schema/schema_components.cmo schema/schema_import.cmo \
OBJECTS = \
driver/config.cmo \
misc/stats.cmo \
......@@ -214,7 +216,7 @@ CDUCE = $(OBJECTS) driver/run.cmo $(CQL_OBJECTS_RUN)
WEBIFACE = $(OBJECTS) driver/examples.cmo driver/webiface.cmo
DTD2CDUCE = tools/dtd2cduce.cmo
ALL_OBJECTS = $(OBJECTS) \
ALL_OBJECTS = $(OBJECTS) $(NEW_SCHEMA_OBJS) \
driver/run.cmo driver/examples.cmo driver/webiface.cmo \
tools/dtd2cduce.cmo tools/validate.cmo \
$(ML_INTERFACE_OBJS) parser/cduce_curl.cmo \
......@@ -231,6 +233,11 @@ cduce: $(CDUCE:.cmo=.$(EXTENSION))
@echo "Build $@"
$(HIDE)$(LINK) $(INCLUDES) -o $@ $^ $(EXTRA_LINK_OPTS)
test_schema: $(OBJECTS:.cmo=.$(EXTENSION)) $(NEW_SCHEMA_OBJS:.cmo=.$(EXTENSION))
@echo "Build $@"
$(HIDE)$(LINK) $(INCLUDES) -o $@ $^ $(EXTRA_LINK_OPTS)
cduce_packed.ml: $(CDUCE:.cmo=.ml)
rm -f cduce_packed.ml
ocaml tools/pack.ml $^ > cduce_packed.ml
......
......@@ -80,6 +80,12 @@ runtime/value.cmo: types/atoms.cmi types/builtin_defs.cmi types/chars.cmi \
runtime/value.cmx: types/atoms.cmx types/builtin_defs.cmx types/chars.cmx \
misc/encodings.cmx types/ident.cmx types/intervals.cmx compile/lambda.cmx \
misc/ns.cmx types/sequence.cmx types/types.cmx runtime/value.cmi
schema/schema_components.cmo: misc/ns.cmi runtime/value.cmi
schema/schema_components.cmx: misc/ns.cmx runtime/value.cmx
schema/schema_import.cmo: misc/encodings.cmi misc/ns.cmi \
schema/schema_components.cmo
schema/schema_import.cmx: misc/encodings.cmx misc/ns.cmx \
schema/schema_components.cmx
schema/schema_types.cmo: misc/encodings.cmi types/intervals.cmi misc/ns.cmi \
runtime/value.cmi schema/schema_types.cmi
schema/schema_types.cmx: misc/encodings.cmx types/intervals.cmx misc/ns.cmx \
......
......@@ -5,6 +5,7 @@ struct
include Custom.String
type uindex = int
let empty = ""
(* TODO: handle UTF-8 viewport *)
let to_string s =
......
......@@ -9,6 +9,7 @@ sig
val to_string: t -> string
val print: Format.formatter -> t -> unit
val empty: t
val end_index: t -> uindex
val start_index: t -> uindex
val equal_index: uindex -> uindex -> bool
......
......@@ -2,6 +2,7 @@
Reference: http://www.w3.org/TR/xmlschema-1/
*)
open Ns
open Encodings
type xs_nonNegativeInteger = Big_int.big_int
type white_space_handling = [ `Preserve | `Replace | `Collapse ]
......@@ -19,12 +20,14 @@ type facets = {
type value_constraint =
| No_constraint
| Default of string
| Fixed of string
| Default of Utf8.t
| Fixed of Utf8.t
type 'a ptr = 'a option ref
type attribute_declaration = {
ad_name: qname;
ad_type: simple_type_definition ref;
ad_type: simple_type_definition ptr;
ad_cstr: value_constraint;
}
and element_declaration = {
......@@ -76,8 +79,8 @@ and schema = {
sch_model_groups: model_group_definition list
}
and type_definition =
| Simple of simple_type_definition
| Complex of complex_type_definition
| Simple of simple_type_definition ptr
| Complex of complex_type_definition ptr
and term =
| Model_group of model_group
| Wildcard of wildcard
......@@ -92,15 +95,15 @@ and derivation_method =
and content_type =
| Ct_empty
| Ct_simple of simple_type_definition
| Ct_model of particle * mixed
| Ct_model of mixed * particle
and mixed =
| Mixed
| Element_only
and ns_wildcard =
| Aw_any
| Aw_ns of Ns.t list
| Aw_not of Ns.t
| W_any
| W_ns of Ns.t list
| W_not of Ns.t
and variety =
| Restriction of simple_type_definition ref * facets
| List of simple_type_definition ref
| Union of simple_type_definition ref list
| VRestriction of simple_type_definition ptr * facets
| VList of simple_type_definition ptr
| VUnion of simple_type_definition ptr list
This diff is collapsed.
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