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

Re: block attribute and substitution groups

From: Sandy Gao <sandygao@ca.ibm.com>
Date: Wed, 7 Jan 2009 11:54:12 -0500
To: Tobias Koenig <tobias.koenig@trolltech.com>
Cc: xmlschema-dev@w3.org
Message-ID: <OFED437CF6.03A3A5F6-ON85257537.005BE96B-85257537.005CD8F3@ca.ibm.com>
Re: block attribute and substitution groups

Interesting...

Are you looking at the schema 1.1 draft? I was answering using my memory of
schema 1.0. Seems this is a change between 1.0 and 1.1. I don't recall
off-hand whether this was intended. Need to dig up the history and possibly
talk to other members of the WG.

In 1.0, bullet 4 of "Element Declaration Properties Correct" refers to
"Type Derivation OK (Complex) (ยง3.4.6)". Neither constraint mentions the
{prohibited substitutions} property of the base type (type of the
{substitution group affiliation}). So in 1.0, your example schema is valid.
(But during instance validation, the constraint "Substitution Group OK
(Transitive)" is used, which does take into account "block" on the base
type.)

But in 1.1, bullet 4 refers to the definition of "validly substitutable",
which takes {prohibited substitutions} of the base type into account. So in
1.1, your example schema is invalid.

Thanks,
Sandy Gao
XML Technologies, IBM Canada
Editor, W3C XML Schema WG
Member, W3C SML WG
(1-905) 413-3255 T/L 313-3255



                                                                           
             Tobias Koenig                                                 
             <tobias.koenig@tr                                             
             olltech.com>                                               To 
             Sent by:                  xmlschema-dev@w3.org                
             xmlschema-dev-req                                          cc 
             uest@w3.org                                                   
                                                                   Subject 
                                       Re: block attribute and             
             07/01/2009 09:54          substitution groups                 
             AM                                                            
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           





On Wednesday 07 January 2009 15:36:05 Sandy Gao wrote:
Hej Sandy,

> The "validly substitutable" rule is checked when the instance is
validated,
> and not when the schema is built.
Ok, but why is it listed in rule 4) of Element Declaration Properties
Correct
which (as far as the 'Declaration' in the name suggests) should be tested
when the schema is built?

Ciao,
Tobias






graycol.gif
(image/gif attachment: graycol.gif)

pic17393.gif
(image/gif attachment: pic17393.gif)

ecblank.gif
(image/gif attachment: ecblank.gif)

Received on Wednesday, 7 January 2009 16:54:57 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
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-2007 All Rights Reserved.