Re: xsi:type inheritance issues

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 UTC