[Home] [By Thread] [By Date] [Recent Entries]

  • From: "Anderson, John" <John@B...>
  • To: "'ht@c...'" <ht@c...>,"Anderson, John" <John@B...>
  • Date: Thu, 27 Sep 2001 13:05:26 +0200

Title: RE: Disallowed substitutions

Henry,

Thanks. I wish there was more of this in the spec!

John

-----Original Message-----
From: ht@c... [mailto:ht@c...]
Sent: 26 September 2001 21:56
To: Anderson, John
Cc: xml-dev@l...
Subject: Re: Disallowed substitutions


"Anderson, John" <John@B...> 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
      declaration]

block='extension' is similar, but blocking extension instead of
restriction.

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.

ht
--
  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: ht@c...
                     URL: http://www.ltg.ed.ac.uk/~ht/


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member