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

> 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"/>

Received on Wednesday, 29 August 2001 20:25:11 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:52 UTC