(* The external XML representation of XML Schema. This file was obtained by dtd2types applied to the DTD for XML Schema and then made more precise and cleaner by hand. *) {{ namespace "http://www.w3.org/2001/XMLSchema" }} type formChoice = {{ "qualified" | "unqualified" }} type boolean = {{ "true" | "false" | "0" | "1" }} type nonNegInt = {{ ['0'--'9'+] }} type minOccurs = nonNegInt type maxOccurs = {{ minOccurs | "unbounded" }} type use = {{ "prohibited" | "optional" | "required" }} type whitespace = {{ "collapse" | "preserve" | "replace" }} type default_fixed = {{ <_ default=Any fixed=Any ..>_ }} type attr_constr = {{ <_ default=Any fixed=?Empty use=?"optional" ..>_ | <_ default=?Empty ..>_ }} type processContents = {{ "skip" | "lax" | "strict" }} type schema = {{ [ (_include|import|redefine|ann)* (ann|toplevel_components)* ] }} (* Toplevel components *) and toplevel_items = {{ _include|import|redefine|ann|toplevel_components }} and toplevel_components = {{ topLevelSimpleType | topLevelComplexType | topLevelElement | topLevelAttribute | topLevelAttributeGroup | topLevelGroup | topLevelNotation }} and topLevelSimpleType = {{ simpleType & <_ name=String ..>_ }} and topLevelComplexType = {{ complexType & <_ name=String ..>_ }} and topLevelElement = {{ element_decl & <_ form=?Empty minOccurs=?Empty maxOccurs=?Empty ..>_ }} and topLevelAttribute = {{ attribute_decl & <_ form=?Empty use=?Empty ..>_ }} and topLevelAttributeGroup = {{ [ ann? attribute_use* anyAttribute? ]}} and topLevelGroup = {{ [ ann? ( all | choice | sequence ) ] }} and topLevelNotation = {{ [ ann? ]}} (* References *) and attribute_ref = {{[ ann? ] & attr_constr }} and element_ref = {{ [ ann? ] - default_fixed }} and group_ref = {{ [ ann? ] }} and attributeGroup_ref = {{ [ ann? ]}} (* Annotations *) and documentation = {{ [ Any* ]}} and appinfo = {{ [ Any* ]}} and ann = {{ [ ( appinfo | documentation )* ]}} (* Include and co *) and _include = {{[ ann? ]}} and redefine = {{ [ (ann|topLevelSimpleType|topLevelComplexType|topLevelAttributeGroup| topLevelGroup)* ]}} and import = {{ [ ann? ]}} (* Simple types *) and simpleType = {{ [ ann? ( simple_restriction | simple_list | simple_union ) ]}} and localSimpleType = {{ simpleType & <_ name=?Empty final=?Empty>_ }} and simple_restriction = {{ [ ann? facet* ] | [ ann? simpleType facet* ] }} and simple_union = {{ [ ann? simpleType* ] }} and simple_list = {{ [ ann? ] | [ ann? simpleType ] }} (* Attributes *) and attribute_decl = {{ [ ann? localSimpleType? ] - <_ type=Any..>[ ann? localSimpleType ] & attr_constr }} and attribute = {{ attribute_ref | attribute_decl }} and attribute_use = {{ attribute | attributeGroup_ref }} (* Complex types *) and complexType = {{ [ ann? ( simpleContent | complexContent | (typedef_particle? attribute_use* anyAttribute?) ) ]}} and localComplexType = {{ complexType & <_ name=?Empty abstract=?Empty final=?Empty block=?Empty ..>_ }} (* Complex content *) and complexContent = {{ [ ann? ( complex_restriction | complex_extension ) ]}} and complex_restriction = {{ [ ann? typedef_particle? attribute_use* anyAttribute? ]}} and complex_extension = {{ [ ann? typedef_particle? attribute_use* anyAttribute? ]}} (* Simple content *) and simpleContent = {{ [ ann? ( simple_content_restriction | simple_content_extension ) ]}} and simple_content_restriction = {{ [ ann? simpleType? facet* attribute_use* anyAttribute? ] }} and simple_content_extension = {{ [ ann? attribute_use* anyAttribute? ] }} (* Elements declarations *) and element_decl = {{[ ann? (localComplexType|localSimpleType)? (unique|key|keyref)* ] - default_fixed }} and local_element = {{ element_ref | element_decl & <_ substitutionGroup=?Empty final=?Empty abstract=?Empty ..>_ }} (* Wildcards *) and anyAttribute = {{ [ ann? ]}} and any = {{ [ ann? ]}} (* Particles *) and typedef_particle = {{ group_ref | all | choice | sequence }} and nested_particle = {{ local_element | group_ref | choice | sequence | any }} and particle = {{ typedef_particle | nested_particle }} and sequence = {{ [ ann? nested_particle* ]}} and choice = {{ [ ann? nested_particle* ] }} and all = {{ [ ann? local_element* ]}} (* Facets *) and facet = {{ minExclusive | minInclusive | maxExclusive | maxInclusive | totalDigits | fractionDigits | length | minLength | maxLength | enumeration | whiteSpace | pattern }} and facet_value = {{ <_ fixed=?boolean id=?String value=String>[ ann? ]}} and nonneg_facet = {{ <_ fixed=?boolean id=?String value=nonNegInt>[ ann? ]}} and pattern = {{[ann?]}} and whiteSpace = {{[ ann? ] }} and enumeration = {{[ ann? ]}} and maxLength = {{_ & nonneg_facet}} and minLength = {{_ & nonneg_facet}} and length = {{_ & nonneg_facet}} and fractionDigits = {{_ & nonneg_facet}} and totalDigits = {{_ & nonneg_facet}} and minInclusive = {{_ & facet_value}} and maxInclusive = {{_ & facet_value}} and minExclusive = {{_ & facet_value}} and maxExclusive = {{_ & facet_value}} (* Others *) and field = {{[ ann? ]}} and selector = {{[ ann? ]}} and keyref = {{[ ann? selector field+ ]}} and key = {{[ ann? selector field+ ]}} and unique = {{[ ann? selector field+ ]}}