W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2006

RE: XML schema for ordinal/nominal variables

From: Moog, Thomas H <thomas.h.moog@intel.com>
Date: Mon, 4 Sep 2006 11:06:36 -0400
Message-ID: <93EBD06E7FC53940A911468FF9BBAD7D6BA2E3@hdsmsx412.amr.corp.intel.com>
To: "Christian Setzkorn" <christian@setzkorn.eu>, <xmlschema-dev@w3.org>

Why not use

  <xs:restriction base=xs:string >
    <xs:enumeration value="1 male" />
    <xs:enumeration value="2 female" />

-----Original Message-----
From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org]
On Behalf Of Christian Setzkorn
Sent: Monday, September 04, 2006 5:55 AM
To: xmlschema-dev@w3.org
Subject: XML schema for ordinal/nominal variables

Dear all,

I would like to define nominal/ordinal variables as XML schema. Both
of variables are characterized by code/string pairs. Here code is a real

Example of the nominal variable Gender:


Example of the ordinal variable Agreement:

0/strongly disagree
3/strongly agree

My first attempt to define 'Gender' is this:

<xs:element name = "gender" >
		<xs:restriction base = "xs:string" >
			<xs:pattern value "0 female | 1 male" />

Could this be improved?

Any feedback would be very much appreciated. Many thanks in advance.

Best wishes,
Christian Setzkorn

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.7/436 - Release Date:
Received on Monday, 4 September 2006 15:07:14 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:10 UTC