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 11:59:09 UTC