Re: question about substitutionGroup tests

On Wednesday 12 November 2008 17:10:13 Michael Kay wrote:
Hej Michael,

> {type definition}	--- The type definition corresponding to the
> <simpleType> or <complexType> element information item in the [children],
> if either is present, otherwise the type definition .resolved. to by the
> .actual value. of the type [attribute], otherwise the {type definition} of
> the element declaration .resolved. to by the .actual value. of the
> substitutionGroup [attribute], if present, otherwise the .ur-type
> definition..
Ahh ic, thanks!

But now I have another problem with the testcase elemZ021a.

According to the meta data it is valid, however my algorithm defines it as
invalid: The global element 'e' is of type xsd:AnyType (this time for real ;))
and the element 'e1' of type xsd:int.

So to satisfy the inheritance I check all rules from 
http://www.w3.org/TR/xmlschema11-1/#key-val-sub-type
where the 3rd rule applies (as xsd:int) is a simple type.

But which rule of http://www.w3.org/TR/xmlschema11-1/#cos-st-derived-ok 
applies? Rule 2.2.2 is applied here recursively and the following is checked:

  xsd:int <-> xsd:anyType
  xsd:long <-> xsd:anyType
  xsd:integer <-> xsd:anyType
  xsd:decimal <-> xsd:anyType
  xsd:numeric <-> xsd:anyType
  xsd:anyAtomicType <-> xsd:anyType

and then no other rule applies, as the base type of anyAtomicType is 
anySimpleType and that is explicitely ruled out in 2.2.2.

So how is it supposed to succeed?

Ciao,
Tobias

Received on Friday, 14 November 2008 14:18:15 UTC