[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Substitution groups
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|