[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Disallowed substitutions

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

xml block restriction
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/


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.