Fwd: Re: Question: Enumerations in schema

Norm Walsh who is on the TAG [1] responded to this issue.
 
[1]  http://www.w3.org/2001/tag/

Note: forwarded message attached.

		
---------------------------------
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!

Forwarded message 1

  • From: Norman Walsh <Norman.Walsh@Sun.COM>
  • Date: Thu, 12 Aug 2004 15:23:50 -0400
  • Subject: Re: Question: Enumerations in schema
  • To: Shivaram Mysore <shivarammysore@yahoo.com>
/ Shivaram Mysore <shivarammysore@yahoo.com> was heard to say:
| 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
|
| <xk:KeyUsage xmlns:xk="http://www.w3.org/2002/03/xkms#">xk:Signature</xk:KeyUsage>
|
| will fail, whereas
|
| <xk:KeyUsage xmlns:xkms="http://www.w3.org/2002/03/xkms#">xkms:Signature</xkms:KeyUsage>
|
| will succeed.

Well, Part 2 says:

  Validation Rule: enumeration valid

    A value in a ·value space· is facet-valid with respect to
    ·enumeration· if the value is one of the values specified in
    {value}

And

  3.2.18 QName

    [Definition:] QName represents XML qualified names. The ·value
    space· of QName is the set of tuples {namespace name, local part},
    where namespace name is an anyURI and local part is an NCName. The
    ·lexical space· of QName is the set of strings that ·match· the
    QName production of [Namespaces in XML].

Which I interpret to mena that the values given in the enumeration are
(uri,localname) pairs and the matching is done against (uri,localname)
pairs in the document being validated. I don't think the prefixes come
into play.

| 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?

I can't answer either of those questions :-), but I think the
enumeration you're using *should* do the logically correct thing with
respect to qnames in the document being validated.

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@Sun.COM / XML Standards Architect / Sun Microsystems, Inc.
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

Received on Thursday, 12 August 2004 19:37:33 UTC