OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [xml-dev] Disallowed substitutions



Title: RE: [xml-dev] Disallowed substitutions

Henry,

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

John

-----Original Message-----
From: ht@cogsci.ed.ac.uk [mailto:ht@cogsci.ed.ac.uk]
Sent: 26 September 2001 21:56
To: Anderson, John
Cc: xml-dev@lists.xml.org
Subject: Re: [xml-dev] Disallowed substitutions


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