module Schema_norm: sig
.. end
Normalize a Schema schema to XQuery core.
val normalize : Namespace_context.nsenv ->
Xquery_type_ast.xschema -> Xquery_type_core_ast.cxschema
val normalize_type : Namespace_context.nsenv ->
Xquery_type_ast.xschema ->
Xquery_type_ast.xtype -> Xquery_type_core_ast.cxtype
The input source schema is supposed to contain definitions for all
the components that are referenced in it; in particular it must
already contain all imported schemas.
The input source schema is supposed to contain definitions for all
the components that are referenced in it; in particular it must
already contain all imported schemas.
Tasks performed by the normalization:
- Flattening the hierarchical schema import structure into a flat
list of definitions. (TODO)
- Resolving names w.r.t namespaces.
- Inventing names for anonymous types.
- Translating derivations by extension into derivations by restriction
(relying on the "closed world assumption") (TODO)
- Eliminating group definitions by inlining them into types (TODO)