- From: Hugh Wallis <hugh_wallis@hyperion.com>
- Date: Wed, 12 Feb 2003 13:08:29 -0500
- To: "Jeni Tennison" <jeni@jenitennison.com>
- Cc: <xmlschema-dev@w3.org>
Hmm - but at http://www.w3.org/TR/xmlschema-1/#Type_Definition_Summary it says: [Definition:] Except for a distinguished ·ur-type definition·, every ·type definition· is, by construction, either a ·restriction· or an ·extension· of some other type definition. The graph of these relationships forms a tree known as the Type Definition Hierarchy. and [Definition:] A distinguished ur-type definition is present in each ·XML Schema·, serving as the root of the type definition hierarchy for that schema. The ur-type definition, whose name is anyType, has the unique characteristic that it can function as a complex or a simple type definition, according to context. Specifically, ·restrictions· of the ur-type definition can themselves be either simple or complex type definitions. Which I would of thought meant that any type, simple or complex, can be derived from anyType Hugh ----- Original Message ----- To: "Hugh Wallis" <hugh_wallis@hyperion.com> Cc: <xmlschema-dev@w3.org> Sent: Wednesday, 12 February, 2003 12:00 PM Subject: Re: substitutionGroup and anyType Hi Hugh, > Validates fine in XML-Spy, Topologi Schematron Validator (uses MSXML > 4.0), using JAXP/Xerces2 but not using .NET validator which gives > the error message > > 'library' cannot be a member of the substitution group with head > element 'item'. An error occurred at > file:///C:/temp/AnyType.xsd(4,2) > > Which is right? Hmm... I think that technically the .NET validator is right because the type of the library element (xs:string) is a simple type definition and therefore, based on the Schema Component Constraint: Type Derivation OK (Simple) [1] isn't validly derived from xs:anyType. On the other hand, I think that the spirit of the XML Schema spec is that xs:string is a subtype of xs:anyType so perhaps I'm misreading that constraint and the other validators are correct. Sorry for such a wooly answer, Jeni [1] http://www.w3.org/TR/xmlschema-1/#cos-st-derived-ok --- Jeni Tennison http://www.jenitennison.com/
Received on Wednesday, 12 February 2003 13:09:01 UTC