W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2002

Re: Substitution group and abstract element

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Tue, 12 Feb 2002 10:08:44 +0100
Message-ID: <3C68DB9C.9010004@dyomedea.com>
To: Piccand Régis <regis.piccand@imtf.ch>
Cc: " 'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Piccand Régis wrote:

> Error (XML Spy 4.3) : This file is not valid : Schema error - element or
> complexType 'contentType' is declared as abstract='true' ; please use
> xsi:type to specify a derived type that is not abstract, or use a member of
> a substitutionGroup instead.
> 
> Am I doing something wrong here ?

Yes ;=) ...

Declaring the element "contentType" as abstract means that you will not 
be able to use the element in an instance document.

Here, it looks like you want to be able to use the element but want to 
impose a xsi:type in which case, this is not the element but the complex 
type which needs to be declared as abstract.

BTW, I don't see the declaration of this complex type in your schema!

Hope this helps.

Eric

> 
> Thanks in advance for your help.
> 
> Régis
> 
> 
> 



-- 
Rendez-vous a Paris pour mes formations XML/XSLT.
                                           http://dyomedea.com/formation/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org
------------------------------------------------------------------------
Received on Tuesday, 12 February 2002 04:09:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:26 GMT