Reasons for the XSD 1.1 restriction on ancestors

I should add that I have had three explanations on why the restriction  
exists. Here they are:

"in order to ensure that an element valid against type T in one location  
will not become invalid against type T when moved to a different location"

"the schema types of the ancestors would not be known (and possibly also  
default attribute values), since they can't be validated until their  
children have been processed."

"the context-independence of types, that is, the ability to say
that type-validity applies to subtrees without qualification: given a
subtree you can say unequivocally whether or not it is type-valid wrt
any type definition.  This has a powerful simplicity both for
implementors and for users."

Steven

Received on Wednesday, 27 August 2008 10:09:47 UTC