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

RE: block="substitution"

From: Zafar Abbas <Zafar.Abbas@microsoft.com>
Date: Fri, 19 Jan 2007 13:58:27 -0800
Message-ID: <81BA5E955D6B4B4DB2F05075C345A5DE091F81FA@RED-MSG-42.redmond.corp.microsoft.com>
To: Michael Kay <mike@saxonica.com>, <xmlschema-dev@w3.org>
RE: block="substitution"

I agree with your analysis. The declaration of F just doesn't become a
member of the substitution group of E; the declaration itself is valid
per spec. But you are right that this looks more like an issue which is
better detected at schema compilation time as no one will ever be able
to substitute E with F.

-----Original Message-----
From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org]
On Behalf Of Michael Kay
Sent: Saturday, December 09, 2006 8:18 AM
To: xmlschema-dev@w3.org
Subject: block="substitution"


As far as I can see the following schema is valid:

<xsd:element name="E" type="A" block="substitution" />

<xsd:element name="F" type="A" substitutionGroup="E" />

The effect of the "block" is not to make the declaration of F invalid:
instead, it effectively causes the attribute substitutionGroup="E" to be
ignored, so that an instance that attempts to use F in place of E will
be
invalid.

Is this analysis correct? On the surface, this seems to be detecting an
error at run time that would be better detected at compile time.

Can someone explain the rationale?


Michael Kay
http://www.saxonica.com/
Received on Friday, 19 January 2007 21:59:26 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.