Re: L3 Core: Followup on TypeInfo.isDerivedFrom tests

Curt Arnold <[email protected]> Wed, 21 Jan 2004 10:25:42 -0600
Newsgroups gmane.comp.web.dom.test-suites.general
Message-ID <[email protected]>
One more tweak:

If

<complexType name="b">
       <extension base="a"/>
</complexType>

b.isDerivedFrom(otherType, METHOD_RESTRICTION) =
-     otherType == xsd:anySimpleType || otherType == xsd:anyType
+     otherType == xsd:anyType

b.isDerivedFrom(otherType, METHOD_UNION) =
       false

b.isDerivedFrom(otherType, METHOD_EXTENSION) =
-      otherType == a || a.isDerivedFrom(otherType, METHOD_EXTENSION)
+      otherType == a || a.isDerivedFrom(otherType, METHOD_EXTENSION) ||
+          a.isDerivedFrom(otherType, METHOD_RESTRICTION)


b.isDerivedFrom(otherType, METHOD_LIST)
       false