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

Re: xsi:type inheritance issues

From: Jeni Tennison <jeni@jenitennison.com>
Date: Fri, 5 Sep 2003 11:04:20 +0100
Message-ID: <111813676218.20030905110420@jenitennison.com>
To: Razvan Costea-Barlutiu <cbrazvan@laitek.com>
Cc: xmlschema-dev@w3.org

Hi Razvan,

> 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?

Yes, it does. See Clause 4.3 of Validation Rule: Element Locally Valid
(Element) at
http://www.w3.org/TR/xmlschema-1/#section-Element-Declaration-Validation-Rules

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

Yes. If you don't explicitly give a type for an element, then its type
is xs:anyType. Every type is derived from xs:anyType.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Friday, 5 September 2003 06:04:34 GMT

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