[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xml-dev] Disallowed substitutions
- From: firstname.lastname@example.org (Henry S. Thompson)
- To: "Anderson, John" <John@Barbadosoft.com>
- Date: Wed, 26 Sep 2001 20:56:13 +0100
"Anderson, John" <John@Barbadosoft.com> writes:
> Can anyone explain in relatively plain English what the effect of the block
> attribute is on an element (rec section 3.3.1)?
> Substitution group exclusions ("final" attribute) are fairly clear, but I
> don't clearly see what "disallowed substitutions" adds to this. More to the
> point, it is not very clear (I actually can't find it anywhere in the Rec)
> what the value block="subsitution" does that block="#all" does not.
For the uninitiated, this is a question about W3C XML Schema.
'final' determines what is or isn't allowed in schemas.
'block' determines what is or isn't allowed in documents.
block='#all' means that what you see in a content model is precisely what
must be in the instance at that point: i.e.
a) no xsi:type=[some type derived from that in the declaration]
b) no element which is in the declared element's substGroup
block='restriction' loosens that to allow such things as long as they
don't involve restriction, i.e.
a') no xsi:type=[some type derived by (a chain involving) restriction
from that in the declaration]
b') no element from the declared element's substGroup whose type is
derived by (a chain involving) restriction from that in the
block='extension' is similar, but blocking extension instead of
block='substitution' is like block='#all' except it allows case (a),
i.e. xsi:type _can_ be used in the instance, only substitution group
replacement is foreclosed.
Hope this helps.
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
W3C Fellow 1999--2001, part-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: email@example.com