Restrictions in the current implementation ========================================== Order of items in the schema document: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1. All global elements and attributes must be defined before they are referenced in a complexType definition using "ref=...". 2. All element groups and attribute groups must be defined before they are referenced in a complex or simple type definition using "") to indicate the end of the element's start tag, * element(s) for the base class, * element(s) for the derived class. 2. Since Demeter only allows for **abstract** superclasses, inheritance relationships involving concrete superclasses are not preserved in the resultant CD. However, the "common" parts in the base class are moved to the "derived" class, as in the case of abstract "base" types. 3. Since XML schema does not allow simpleType definitions to be declared "abstract", simple type derivations in schema definitions are not mapped to inheritance relationships in the CD, because Demeter does not allow concrete superclasses. In the CD, the derived type is represented as having the same part as the class corresponding to the "base" type, with the necessary restrictions added to represent any constraining facet. Validation of XML schemas: ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1. The application assumes that input schema documents are valid according to current specifications, and does not expect invalid constructs. It may also accept some schema documents that are not valid but satisfy an extended grammar - this has been done to simplify the class-dictionary used in the adaptive program. Checking the validity of schemas is also considered to be out of scope of this application. Syntax in the instance documents: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1. For XML instance documents, there is no implementation to accept the short-hand syntax that is used for representing empty contents of elements. The content in the instance may be empty because it has only attributes or the content parts are all optional. Such elements have to be written in the expanded format. For example, the following will be accepted: but the following will cause a parsing error to be generated: *** Please note that the schema definition does not need to have this restriction, and either notation can be used as appropriate. 2. As also mentioned elsewhere in this document, in an XML instance document: * the "xsi:null" attribute, whenever present, must be the **last** attribute for the element; and * the "xsi:type" attribute, whenever present, must be the **last** attribute (except for "xsi:null") for the element. In other words, if both "xsi:null" and "xsi:type" are to be defined for a certain element in the instance document, then specify "xsi:null" last and "xsi:type" just before it.