question about disallowedSubst test cases

View: New views
3 Messages — Rating Filter:   Alert me  

question about disallowedSubst test cases

by Tobias Koenig :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hej,

in schema 1.1 spec there is stated under Schema Component Constraint:
Substitution Group OK (Transitive):

  2.1  H. {disallowed substitutions} does not contain substitution.

According to that test case disallowedSubst00101m would be invalid, however it
is marked as valid and saxon conformance result lists it as valid as well...
So why it is valid?!? The head element contains 'substitution' in its
disallowed substitution property.

Ciao,
Tobias


RE: question about disallowedSubst test cases

by Michael Kay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> in schema 1.1 spec there is stated under Schema Component Constraint:
> Substitution Group OK (Transitive):
>
>   2.1  H. {disallowed substitutions} does not contain substitution.
>
> According to that test case disallowedSubst00101m would be
> invalid, however it is marked as valid and saxon conformance
> result lists it as valid as well...
> So why it is valid?!? The head element contains
> 'substitution' in its disallowed substitution property.

For reasons which I don't claim to understand, violation of this constraint
does not invalidate a schema, it only invalidates an instance. Specifically,
the constraint is only referenced from validation rules, and not from the
rules determining schema validity.

Given

  element A

  element B substitutionGroup=A block=substitution

  element C substitutionGroup=B

An instance of C is allowed to substitute for A, but not for B.

This spec moves in mysterious ways...

Michael Kay
http://www.saxonica.com/



Re: question about disallowedSubst test cases

by Tobias Koenig :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Wednesday 12 November 2008 16:48:18 Michael Kay wrote:

> For reasons which I don't claim to understand, violation of this constraint
> does not invalidate a schema, it only invalidates an instance.
> Specifically, the constraint is only referenced from validation rules, and
> not from the rules determining schema validity.
>
> Given
>
>   element A
>
>   element B substitutionGroup=A block=substitution
>
>   element C substitutionGroup=B
>
> An instance of C is allowed to substitute for A, but not for B.
>
> This spec moves in mysterious ways...
So does the same apply for test case disallowedSubst00105m?
There the HEAD element contains 'extension' in its block attribute but
the type definition of the member element is created by extension.
According to rule 1 of http://www.w3.org/TR/xmlschema11-1/#cos-ct-derived-ok 
that would be not allowed...

Ciao,
Tobias