Enumerations in schema

G'day all,

Am not sure if this has been raised before, but I've been playing with 
schema validation of the various messages and have run into a problem 
with Xerces rejecting messages because of the (amongst others) KeyUsage 
Elements.  In particular, the schema defines the KeyUsageType 
enumeration as follows :

	<simpleType name="KeyUsageType">
		<restriction base="QName">
			<enumeration value="xkms:Encryption"/>
			<enumeration value="xkms:Signature"/>
			<enumeration value="xkms:Exchange"/>

I'm not a huge expert in XMLSchema, but my understanding is that 
enumeration values are literal.  So if I use a different qualifier (or 
even no qualifier) it will fail strict validation.

E.g. the snippet


will fail, whereas


will succeed.

I think KeyBindingStatus will also have the same problem.

Am I misunderstanding XMLSchema?  If not - do we really need to 
enumerate these values in the schema?


Received on Sunday, 4 July 2004 04:59:05 UTC