W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2001

RE: Howto: Enforce unique attribute

From: Chris Aaa <chrisaaa@email.com>
Date: Wed, 25 Apr 2001 12:31:01 -0400 (EDT)
Message-ID: <380291940.988216261325.JavaMail.root@web576-ec>
To: www-xml-schema-comments@w3.org
Ashok,

Thanks for the quick reply,

> You can define the attribute as a key and the system
> Will check whether it is unique.

How do I do that?, I had tried changing the number to an ID, a NMTOKEN and a
KEY, I just got errors:

<xsd:attribute name="Number" type="xsd:key" use="required"/>

gives:

<schemaError char='18' line='123' phase='instance'
resource='file:/C:/Work/XML/config.xsd'>Undefined
type xsd{http://www.w3.org/2000/10/XMLSchema}:key
referenced as type definition of {None}Number
</schemaError>

I must be missing something in the grammar, I miss those little syntax
diagrams you used to get with Turbo Pascal :)

TIA

Chris


-----------------------------------------------
FREE! The World's Best Email Address @email.com
Reserve your name now at http://www.email.com
Received on Wednesday, 25 April 2001 12:31:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:50 GMT