Question about Final Attributes on Elements

Okay, I'm a little confused as to what the block and final attributes
mean in all of the different places they can appear.  I'm having trouble
finding the applicable parts of the spec, so I thought I would consult
the list.

I understand that "block" controls the substitution of one element or type
for another at validation time, and "final" controls derivation and things
easily determined only from a schema.

On a type, therefore, it seems clear what final and block represent.
Final prevents one from deriving another type from the finalized 
type, at least via restriction or extension etc.  Block prevents xsi:type
substitution in the input document.

On an element, however, it's less clear to me.  The valid values of block
are "substitution", "restriction", and "extension."  Obviously, "substitution"
prevents substitution groups from operating on this element.  I assume
you can use this either on the actual def'n of the global element, or on a
particular instance where it is referenced.

If the element's block specifies "restriction" or "extension," then I would 
guess that this is equivalent to the type specifying the same block value 
except that it only applies to this instance of the type.

Okay, now we come to an element specifying "final".  The only valid values
for this are "substitution" and "restriction" --- but I have no idea what
this means.  You can't derive from an element as far as I know, only from
a type, so I'm confused what final might be restricting. 

Any help on untangling this puzzle, and especially pointers into the spec, 
would be appreciated.



niko

Received on Thursday, 3 January 2002 15:28:25 UTC