W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2002

Re: Unions and Enumerations

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 3 Apr 2002 23:13:16 +0100
Message-ID: <69139192598.20020403231316@jenitennison.com>
To: "Snow, Corey" <CSNOW@ddpwa.com>
CC: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
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 GMT

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