Re: Unions and Enumerations

Hi Corey,

> When i attempt to add the schema to an XMLSchemaCache object, I get
> an error that says "USStatesAbbreviationsEnum" refers to an
> undeclared XSD type. If I reverse the order of the two "memberTypes"
> in the "xs:union" element, the error references the other
> enumeration- basically it barfs on whichever one comes first.

My guess would be that it's something to do with the fact that
datatypes.xsd is acting as a "chameleon" schema -- adopting the
target namespace of master.xsd. To test this hypothesis, try adding a
target namespace (and a default namespace declaration) to
datatypes.xsd, so that USStatesAbbreviationsEnum and USStatesNamesEnum
are both actually defined in the target namespace, and so that the
memberTypes attribute references them in this target namespace, or
simply moving the definitions into master.xsd, and see whether that
makes a difference.

Schema validators *should* change the references in the memberTypes
attribute so that it finds the relevant types - from the looks of it,
this is a bug in MSXML rather than in your schema.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

Received on Wednesday, 3 April 2002 17:13:23 UTC