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

Substitution groups

  • From: Ben Ryan <b_ryan@c...>
  • To: xml-dev@l...
  • Date: Fri, 15 Jun 2001 10:27:12 +0100

xsd substitution group
Hi,
	I am trying to a schema where I want to model addresses that can handle
both UK and US style codes e.g. postcode and zip code. I wanted to use
substitution groups as follows:

<xsd:element name="code" type="astring" abstract="true">
</xsd:element>

<xsd:element name="postcode" type="astring" substitutionGroup="code">
</xsd:element>

<xsd:element name="zip" type="astring" substitutionGroup="code">
</xsd:element>

where the complex type astring is defined as follows:

<xsd:complexType name="astring" mixed="true">
  <xsd:sequence minOccurs="0" maxOccurs="unbounded">
    <xsd:any namespace="##other"/>
  </xsd:sequence>
</xsd:complexType>

Using XMLSpy this validates OK, but using the IBM Schema Quality Checker
I get the following errors:

SUBSTITUTION GROUP ERROR : the type of the element declaration,element
postcode, is not compatible with the type of its substitution group
head.  
 
SUBSTITUTION GROUP ERROR : the type of the element declaration,element
zip, is not compatible with the type of its substitution group head.  

Can anyone explain this as I assumed :) that as they all are the same
type there should be no problem.


Thanks,

Ben

-- 
***************************
Dr Benjamin Ryan
Senior Technical Consultant
C-Elect
Tel: +(44) 1484 517077
Fax: +(44) 1484 517068
***************************

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.