W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2003

xsi:type inheritance issues

From: Razvan Costea-Barlutiu <cbrazvan@laitek.com>
Date: Thu, 04 Sep 2003 11:41:53 +0200
Message-Id: <>
To: xmlschema-dev@w3.org


I have a huge problem with xsi:type, as seen by various parsers. I can't 
tell which of the parsers are right or wrong as I see suporters for both, 
arguing that one or the other is right.


When using xsi:type in an XML instance, does the specified type HAS to be 
derived from the original type of the element it modifies or not?

XMLSpy complains if the replacing type is not derived from the original 
type. Xerces does not. Is there a flavor to this?

If the schema does not specify a type for the element, can that type be 
replaced by just about anything? E.G:

<xs:element name="sample">;
<xs:complexType name="replacement">
	<xs:extension base="someOtherType">... etc

<sample xsi:type="replacement">

Is the above a valid construction? Again, XMLSpy (from 4.3 to 5.0) 
complains that the "replacement" is not derived from the original type of 
"sample". Xerces says it's aok.

Any help is hugely appreciated.
Best regards,
--Razvan Costea Barlutiu

Light Soft.
Received on Friday, 5 September 2003 04:50:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:13 UTC