W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2003

Re: substitutionGroup and anyType

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 12 Feb 2003 16:59:01 +0000
Message-ID: <142351180290.20030212165901@jenitennison.com>
To: "Hugh Wallis" <hugh_wallis@hyperion.com>
CC: xmlschema-dev@w3.org

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,


[1] http://www.w3.org/TR/xmlschema-1/#cos-st-derived-ok

Jeni Tennison
Received on Wednesday, 12 February 2003 11:59:09 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:59 UTC