Re: Enumerations in schema

OK - I'm confused. :>.

But to paraphrase what you say below, and how I understand what I've 
just re-read in the schema spec.....  For normal QNames, this should not 
be a problem as the value space is the set of {URI,local part} tuples. 
I.e. prefix is translated to URI to give value space.  For enumerations, 
the problem is that the enumeration has to give the "actual value", 
which is reprented as a string, which leads to a problem.

Do I have that right?  Or have I just made it even less clear than it 
was ? :>.

Leading from that, I have two questions :

Firstly - do we agree there is a problem?  (I believe there is, both 
based on my understanding and your information below, but Tommy I think 
believes not?)

Secondly - If the answer to 1 is yes, do we need to actually define the 
values in the schema at all?  Can we leave it as a QName and define the 
allowed values in the spec?

Cheers,
	Berin



Rich Salz wrote:
>>>I'm not a huge expert in XMLSchema, but my understanding is that
>>>enumeration values are literal.
>>
> 
> When I said you were right, I was wrong.  In fact, you are wrong. :)
> Sorry for the confusion (but hey, it's XML Schema, confusion is standard).
> 
> The XSD "enumeration" element specifies a restriction on the *value
> space*,  not the *lexical space.*  This means that yes, it shouldn't
> match the exact string literal "xkms:Signature".  Unfortunately, the
> way you specify the (err..) value-space value is to uses the lexical
> space syntax.  For most things like strings, numbers, etc., this isn't
> a problem, for since QName's are a tuple (ns,localname) you have to
> use the nsprefix:localname syntax.... ugh.
> 
> I got that from sections 3.2.18 and 4.3.5 of part 2 of the Schema
> recommendation.
> 
> Let's move to URI's. :)
> 	/r$
> 
> --
> Rich Salz                  Chief Security Architect
> DataPower Technology       http://www.datapower.com
> XS40 XML Security Gateway  http://www.datapower.com/products/xs40.html
> XML Security Overview      http://www.datapower.com/xmldev/xmlsecurity.html
> 
> 
> 
> 

Received on Wednesday, 7 July 2004 07:51:18 UTC