W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2001

Re: Table lookup datatype

From: Eddie Robertsson <eddie@allette.com.au>
Date: Thu, 30 Aug 2001 10:24:06 +1000
Message-ID: <3B8D87A6.234F55F6@allette.com.au>
To: KK Aw <kkaw@multicentric.com>
CC: xmlschema-dev@w3.org
Hi,

> How do I define my own datatype for a table lookup? What I want is to
> be able to define in my schema something like this: <xsd:element
> name="states" type="tablelookup" category="states"/> where the
> category field defines howI should get the list of enumerated values.

I'm not really sure what you're asking but if it is "can I use my own
attributes on XML Schema components?" then the answer is yes. XML Schema
allow you to include any attribute from a namespace other than
http://www.w3.org/2001/XMLSchema. In your example above that would be
something like:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" xmlns:other="www.other.com">
<xs:element name="states" type="tablelookup" other:category="states"/>
.....

Cheers,
/Eddie
Received on Wednesday, 29 August 2001 20:25:11 GMT

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