|
From: Mark F. B. <sa...@co...> - 2004-11-18 13:54:27
|
Hi again (Mark Bean writing from home) Validation of AnIML Schema. I believe that XMLSpy may not be catching all the Schema errors in validation. Our reference point is always http://www.w3.org/XML/Schema. By the way, Schema 1.1 is in the works and open for comment and those changes may well effect this discussion. The point here is derivation from a complex type by restriction. Here are the w3 definitions: "[Definition:] A type definition whose declarations or facets are in a one-to-one relation with those of another specified type definition, with each in turn restricting the possibilities of the one it corresponds to, is said to be a restriction. The specific restrictions might include narrowed ranges or reduced alternatives. Members of a type, A, whose definition is a ·restriction· of the definition of another type, B, are always members of type B as well. [Definition:] A complex type definition which allows element or attribute content in addition to that allowed by another specified type definition is said to be an extension. See also http://www.w3.org/TR/xmlschema-1/#Complex_Type_Definitions An example of the types in question is TemplateType: <xs:complexType name="TemplateType"> <xs:complexContent> <xs:restriction base="ExperimentStepType"> If we loook at TemplateType and ExperimentStepType we will see a different number of elements. It is my contention that as ExperimentStepType has new elements not seen in TemplateType, that it should be derived by extension from TemplateType rather than TemplateType being derived from ExperimentStepType by restriction. This may also require changes in the complexContent tagging. I have NOT made these changes and request help in doing so (which means that I tried to do it but it wouldn't validate!) regards, Mark |