Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: XML schema for ordinal/nominal variables

From: "Moog, Thomas H" <thomas.h.moog@-----.--->
To: "Christian Setzkorn" <christian@--------.-->, <xmlschema-dev@--.--->
Date: 9/4/2006 7:07:00 AM
Why not use

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

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


Dear all,

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

Example of the nominal variable Gender:

code/string
#######
1/male
0/female

Example of the ordinal variable Agreement:

code/string 
#######
0/strongly disagree
1/disagree
2/agree
3/strongly agree

My first attempt to define 'Gender' is this:

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

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:
01/09/2006
 

From noah_mendelsohn@u... Mon Sep 04 19:49:16 2006
Received: from lisa.w3.org ([128.30.52.41])
	by fri


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent