<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
 XML Schema for common elements of Dictionary Markup Language.
 These elements are used to encode heterogeneous lexical databases 
 
 Namespace = http://www-clips.imag.fr/geta/services/dml

 This schema is identified by the location:

 http://www-clips.imag.fr/geta/services/dml/dml.xsd
  
 $Author: mangeot $ Mathieu MANGEOT-LEREBOURS Mathieu.Mangeot@imag.fr
 $Date: 2010/10/25 20:29:10 $
 $Revision: 1.122 $

 -->

<xs:schema
  xmlns:d='http://www-clips.imag.fr/geta/services/dml'
  xmlns:xs='http://www.w3.org/2001/XMLSchema'
  xmlns:xlink='http://www.w3.org/1999/xlink'
  targetNamespace='http://www-clips.imag.fr/geta/services/dml'>

<xs:annotation>
  <xs:documentation xml:lang="en">
 XML Schema for common elements of Dictionary Markup Language.
 These elements are used to encode heterogeneous lexical databases 
 
 Namespace = http://www-clips.imag.fr/geta/services/dml

 This schema is identified by the location:
 http://www-clips.imag.fr/geta/services/dml/dml.xsd
 </xs:documentation> 
</xs:annotation>

<!--================ importing other schemas ================-->

<!-- importing parts of xlink recommendation for dml links -->
 <xs:import 
  namespace='http://www.w3.org/1999/xlink'
  schemaLocation='http://www-clips.imag.fr/geta/services/dml/xlink.xsd' />


<!--================ common DML attributes and types ================-->
<!-- Note: the attributes are sorted in alphabetical order -->

<!-- classNameAttributeType Type -->
<!-- contains a class-name attribute. -->
<xs:complexType name="classNameAttributeType" mixed='true'>
 <xs:attribute name="class-name" type='xs:string' />
</xs:complexType>



<!-- dateType type -->
<!-- Used for all the dates in DML.
Equals to dateTime from XML schema basic type.
The following definition is taken for REC-xmlschema-2:
A single lexical representation, which is a subset of the lexical
representations allowed by ISO 8601, is allowed for dateTime. This lexical
representation is the ISO 8601 extended format CCYY-MM-DDThh:mm:ss where
"CC" represents the century, "YY" the year, "MM" the month and "DD" the day,
preceded by an optional leading "-" sign to indicate a negative number. If
the sign is omitted, "+" is assumed. The letter "T" is the date/time separator
and "hh", "mm", "ss" represent hour, minute and second respectively.
Additional digits can be used to increase the precision of fractional seconds
if desired i.e the format ss.ss... with any number of digits after the decimal
point is supported. The fractional seconds part is optional; other parts of
the lexical form are not optional. To accommodate year values greater than
9999 additional digits can be added to the left of this representation.
Leading zeros are required if the year value would otherwise have fewer than
four digits; otherwise they are forbidden. The year 0000 is prohibited. 

The CCYY field must have at least four digits, the MM, DD, SS, hh, mm and ss
fields exactly two digits each (not counting fractional seconds); leading
 zeroes must be used if the field would otherwise have too few digits. 

This representation may be immediately followed by a "Z" to indicate
Coordinated Universal Time (UTC) or, to indicate the time zone, i.e. the
difference between the local time and Coordinated Universal Time, immediately
followed by a sign, + or -, followed by the difference from UTC represented as
hh:mm (note: the minutes part is required). See ISO 8601 Date and Time Formats
(chapter D) for details about legal values in the various fields. If the time zone is
included, both hours and minutes must be present. 

For example, to indicate 1:20 pm on May the 31st, 1999 for Eastern Standard
Time which is 5 hours behind Coordinated Universal Time (UTC), one would
 write: 1999-05-31T13:20:00-05:00. 
 -->
<xs:simpleType name="dateType">
 <xs:restriction base="xs:dateTime" />
</xs:simpleType>

<!-- delay attribute -->
<!-- indicates the delay when querying the element wearing this attribute
eg: 5 seconds.
Maybe, the type could be a time type -->
<xs:attribute name="delay" type="d:durationType" />

<!-- durationType type -->
<!-- indicates a duration eg: 5 seconds and 10 cents= "5.10S"
I took the duration type of sxml schema.
PB: if > to 24H, it takes days.
It must be revised...
 -->
<xs:simpleType name="durationType">
 <xs:restriction base="xs:duration" />
</xs:simpleType>

<!-- history attribute -->
<!-- The history attribute is used to link an element with its
 history log file where all the changes are stored -->
<xs:attribute name="history" type="xs:ID" />

<!-- history-ref attribute -->
<!-- The history-ref attribute is used to reference the 
file where all the changes are stored -->
<xs:attribute name="history-ref" type="xlink:href" />

<!-- hrefAttributeType Type -->
<!-- contains only an href type. Like HTML hyperlinks -->
<xs:complexType name="hrefAttributeType" mixed='true'>
 <xs:attribute ref='xlink:href' />
</xs:complexType>

<!-- id attribute -->
<!-- the elements with the ID attribute have a unique ID for
 all the lexical database -->
<xs:attribute name="id" type="xs:ID" />

<!-- lang attribute -->
<!-- the DML lang attribute is based on ISO 639-2/T standard 
which uses 3 letters code instead of two letters code to indicate
the name of the languages.
We add also our proper codes for special purpose -->
<xs:attribute name="lang" type='d:lang' />

<xs:simpleType name='lang'>
<xs:restriction base="xs:string">
<xs:enumeration value="aar" /> <!-- Afar; 639-1: aa -->
<xs:enumeration value="abk" /> <!-- Abkhazian; 639-1: ab -->
<xs:enumeration value="ace" /> <!-- Achinese -->
<xs:enumeration value="ach" /> <!-- Acoli -->
<xs:enumeration value="ada" /> <!-- Adangme -->
<xs:enumeration value="afa" /> <!-- Afro-Asiatic (Other) -->
<xs:enumeration value="afh" /> <!-- Afrihili -->
<xs:enumeration value="afr" /> <!-- Afrikaans; 639-1: af -->
<xs:enumeration value="ajm" /> <!-- Aljamia -->
<xs:enumeration value="aka" /> <!-- Akan -->
<xs:enumeration value="akk" /> <!-- Akkadian -->
<xs:enumeration value="ale" /> <!-- Aleut -->
<xs:enumeration value="alg" /> <!-- Algonquian languages -->
<xs:enumeration value="amh" /> <!-- Amharic; 639-1: am -->
<xs:enumeration value="ang" /> <!-- English, Old (ca. 450-1100) -->
<xs:enumeration value="apa" /> <!-- Apache languages -->
<xs:enumeration value="ara" /> <!-- Arabic; 639-1: ar -->
<xs:enumeration value="arc" /> <!-- Aramaic -->
<xs:enumeration value="arn" /> <!-- Araucanian -->
<xs:enumeration value="arp" /> <!-- Arapaho -->
<xs:enumeration value="art" /> <!-- Artificial (Other) -->
<xs:enumeration value="arw" /> <!-- Arawak-->
<xs:enumeration value="asm" /> <!-- Assamese; 639-1: as -->
<xs:enumeration value="ath" /> <!-- Athapascan languages -->
<xs:enumeration value="aus" /> <!-- Australian languages -->
<xs:enumeration value="ava" /> <!-- Avaric -->
<xs:enumeration value="ave" /> <!-- Avestan -->
<xs:enumeration value="awa" /> <!-- Awadhi -->
<xs:enumeration value="aym" /> <!-- Aymara; 639-1: ay -->
<xs:enumeration value="aze" /> <!-- Azerbaijani; 639-1: az -->
<xs:enumeration value="bad" /> <!-- Banda -->
<xs:enumeration value="bai" /> <!-- Bamileke languages -->
<xs:enumeration value="bak" /> <!-- Bashkir; 639-1: ba -->
<xs:enumeration value="bal" /> <!-- Baluchi -->
<xs:enumeration value="bam" /> <!-- Bambara -->
<xs:enumeration value="ban" /> <!-- Balinese -->
<xs:enumeration value="bas" /> <!-- Basa -->
<xs:enumeration value="bat" /> <!-- Baltic (Other) -->
<xs:enumeration value="bej" /> <!-- Beja -->
<xs:enumeration value="bel" /> <!-- Belarussian; 639-1: be -->
<xs:enumeration value="bem" /> <!-- Bemba -->
<xs:enumeration value="ben" /> <!-- Bengali; 639-1: bn -->
<xs:enumeration value="ber" /> <!-- Berber (Other) -->
<xs:enumeration value="bho" /> <!-- Bhojpuri -->
<xs:enumeration value="bih" /> <!-- Bihari; 639-1: bh -->
<xs:enumeration value="bik" /> <!-- Bikol -->
<xs:enumeration value="bin" /> <!-- Bini -->
<xs:enumeration value="bis" /> <!-- Bislama; 639-1: bi -->
<xs:enumeration value="bla" /> <!-- Siksika -->
<xs:enumeration value="bnt" /> <!-- Bantu (Other) -->
<xs:enumeration value="bod" /> <!-- Tibetan; 639-1: bo -->
<xs:enumeration value="bra" /> <!-- Braj -->
<xs:enumeration value="bre" /> <!-- Breton; 639-1: br -->
<xs:enumeration value="btk" /> <!-- Batak (Indonesia) -->
<xs:enumeration value="bua" /> <!-- Buriat -->
<xs:enumeration value="bug" /> <!-- Buginese -->
<xs:enumeration value="bul" /> <!-- Bulgarian; 639-1: bg -->
<xs:enumeration value="cad" /> <!-- Caddo -->
<xs:enumeration value="cai" /> <!-- Central American Indian (Other) -->
<xs:enumeration value="car" /> <!-- Carib -->
<xs:enumeration value="cat" /> <!-- Catalan; 639-1: ca -->
<xs:enumeration value="cau" /> <!-- Caucasian (Other) -->
<xs:enumeration value="ceb" /> <!-- Cebuano -->
<xs:enumeration value="cel" /> <!-- Celtic (Other) -->
<xs:enumeration value="ces" /> <!-- Czech; 639-1: cs -->
<xs:enumeration value="cha" /> <!-- Chamorro -->
<xs:enumeration value="chb" /> <!-- Chibcha -->
<xs:enumeration value="che" /> <!-- Chechen -->
<xs:enumeration value="chg" /> <!-- Chagatai -->
<xs:enumeration value="chk" /> <!-- Chuukese -->
<xs:enumeration value="chm" /> <!-- Mari -->
<xs:enumeration value="chn" /> <!-- Chinook jargon -->
<xs:enumeration value="cho" /> <!-- Choctaw -->
<xs:enumeration value="chp" /> <!-- Chipewyan -->
<xs:enumeration value="chr" /> <!-- Cherokee -->
<xs:enumeration value="chu" /> <!-- Church Slavic -->
<xs:enumeration value="chv" /> <!-- Chuvash -->
<xs:enumeration value="chy" /> <!-- Cheyenne -->
<xs:enumeration value="cmc" /> <!-- Chamic languages -->
<xs:enumeration value="cop" /> <!-- Coptic -->
<xs:enumeration value="cor" /> <!-- Cornish; 639-1: kw -->
<xs:enumeration value="cos" /> <!-- Corsican; 639-1: co -->
<xs:enumeration value="cpe" /> <!-- Creoles and pidgins, English-based (Other) -->
<xs:enumeration value="cpf" /> <!-- Creoles and pidgins, French-based (Other) -->
<xs:enumeration value="cpp" /> <!-- Creoles and pidgins, Portuguese-based (Other) -->
<xs:enumeration value="cre" /> <!-- Cree -->
<xs:enumeration value="crp" /> <!-- Creoles and pidgins (Other) -->
<xs:enumeration value="cus" /> <!-- Cushitic (Other) -->
<xs:enumeration value="cym" /> <!-- Welsh; 639-1: cy -->
<xs:enumeration value="dak" /> <!-- Dakota -->
<xs:enumeration value="dan" /> <!-- Danish; 639-1: da -->
<xs:enumeration value="day" /> <!-- Dayak -->
<xs:enumeration value="del" /> <!-- Delaware -->
<xs:enumeration value="den" /> <!-- Slave (Athapascan) -->
<xs:enumeration value="deu" /> <!-- German; 639-1: de -->
<xs:enumeration value="dgr" /> <!-- Dogrib -->
<xs:enumeration value="din" /> <!-- Dinka -->
<xs:enumeration value="div" /> <!-- Divehi -->
<xs:enumeration value="doi" /> <!-- Dogri -->
<xs:enumeration value="dra" /> <!-- Dravidian (Other) -->
<xs:enumeration value="dua" /> <!-- Duala -->
<xs:enumeration value="dum" /> <!-- Dutch, Middle (ca. 1050-1350) -->
<xs:enumeration value="dyu" /> <!-- Dyula -->
<xs:enumeration value="dzo" /> <!-- Dzongkha; 639-1: dz -->
<xs:enumeration value="efi" /> <!-- Efik -->
<xs:enumeration value="egy" /> <!-- Egyptian (Ancient) -->
<xs:enumeration value="eka" /> <!-- Ekajuk -->
<xs:enumeration value="ell" /> <!-- Greek, Modern (1453-); 639-1: el -->
<xs:enumeration value="elx" /> <!-- Elamite -->
<xs:enumeration value="eng" /> <!-- English; 639-1: en -->
<xs:enumeration value="enm" /> <!-- English, Middle (1100-1500) -->
<xs:enumeration value="epo" /> <!-- Esperanto; 639-1: eo -->
<xs:enumeration value="est" /> <!-- Estonian; 639-1: et -->
<xs:enumeration value="eth" /> <!-- Ethiopic -->
<xs:enumeration value="eus" /> <!-- Basque; 639-1: eu -->
<xs:enumeration value="ewe" /> <!-- Ewe -->
<xs:enumeration value="ewo" /> <!-- Ewondo -->
<xs:enumeration value="fan" /> <!-- Fang -->
<xs:enumeration value="fao" /> <!-- Faroese; 639-1: fo -->
<xs:enumeration value="fas" /> <!-- Persian; 639-1: fa -->
<xs:enumeration value="fat" /> <!-- Fanti -->
<xs:enumeration value="fij" /> <!-- Fijian; 639-1: fj -->
<xs:enumeration value="fin" /> <!-- Finnish; 639-1: fi -->
<xs:enumeration value="fiu" /> <!-- Finno-Ugrian (Other) -->
<xs:enumeration value="fon" /> <!-- Fon -->
<xs:enumeration value="fra" /> <!-- French; 639-1: fr -->
<xs:enumeration value="frm" /> <!-- French, Middle (ca. 1400-1600) -->
<xs:enumeration value="fro" /> <!-- French, Old (ca. 842-1400) -->
<xs:enumeration value="fry" /> <!-- Frisian; 639-1: fy -->
<xs:enumeration value="ful" /> <!-- Fulah -->
<xs:enumeration value="fur" /> <!-- Friulian -->
<xs:enumeration value="gaa" /> <!-- Ga -->
<xs:enumeration value="gai" /> <!-- Irish; 639-1: ga -->
<xs:enumeration value="gay" /> <!-- Gayo -->
<xs:enumeration value="gba" /> <!-- Gbaya -->
<xs:enumeration value="gdh" /> <!-- Gaelic (Scots); 639-1: gd -->
<xs:enumeration value="gem" /> <!-- Germanic (Other) -->
<xs:enumeration value="gez" /> <!-- Geez -->
<xs:enumeration value="gil" /> <!-- Gilbertese -->
<xs:enumeration value="glg" /> <!-- Gallegan; 639-1: gl -->
<xs:enumeration value="gmh" /> <!-- German, Middle High (ca. 1050-1500) -->
<xs:enumeration value="goh" /> <!-- German, Old High (ca. 750-1050) -->
<xs:enumeration value="gon" /> <!-- Gondi -->
<xs:enumeration value="gor" /> <!-- Gorontalo -->
<xs:enumeration value="got" /> <!-- Gothic -->
<xs:enumeration value="grb" /> <!-- Grebo -->
<xs:enumeration value="grc" /> <!-- Greek, Ancient (to 1453) -->
<xs:enumeration value="grn" /> <!-- Guarani; 639-1: gn -->
<xs:enumeration value="guj" /> <!-- Gujarati; 639-1: gu -->
<xs:enumeration value="gwi" /> <!-- Gwich'in -->
<xs:enumeration value="hai" /> <!-- Haida -->
<xs:enumeration value="hau" /> <!-- Hausa; 639-1: ha -->
<xs:enumeration value="haw" /> <!-- Hawaiian -->
<xs:enumeration value="heb" /> <!-- Hebrew; 639-1: he/iw -->
<xs:enumeration value="her" /> <!-- Herero -->
<xs:enumeration value="hil" /> <!-- Hiligaynon -->
<xs:enumeration value="him" /> <!-- Himachali -->
<xs:enumeration value="hin" /> <!-- Hindi; 639-1: hi -->
<xs:enumeration value="hit" /> <!-- Hittite -->
<xs:enumeration value="hmn" /> <!-- Hmong -->
<xs:enumeration value="hmo" /> <!-- Hiri Motu -->
<xs:enumeration value="hrv" /> <!-- Croatian; 639-1: hr -->
<xs:enumeration value="hun" /> <!-- Hungarian; 639-1: hu -->
<xs:enumeration value="hup" /> <!-- Hupa -->
<xs:enumeration value="hye" /> <!-- Armenian; 639-1: hy -->
<xs:enumeration value="iba" /> <!-- Iban -->
<xs:enumeration value="ibo" /> <!-- Igbo -->
<xs:enumeration value="ijo" /> <!-- Ijo -->
<xs:enumeration value="iku" /> <!-- Inuktitut; 639-1: iu -->
<xs:enumeration value="ile" /> <!-- Interlingue; 639-1: ie -->
<xs:enumeration value="ilo" /> <!-- Iloko -->
<xs:enumeration value="ina" /> <!-- Interlingua (International Auxilary Language Association); 639-1: ia -->
<xs:enumeration value="inc" /> <!-- Indic (Other) -->
<xs:enumeration value="ind" /> <!-- Indonesian; 639-1: id/in -->
<xs:enumeration value="ine" /> <!-- Indo-European (Other) -->
<xs:enumeration value="ipk" /> <!-- Inupiak; 639-1: ik -->
<xs:enumeration value="ira" /> <!-- Iranian (Other) -->
<xs:enumeration value="iro" /> <!-- Iroquoian languages -->
<xs:enumeration value="isl" /> <!-- Icelandic; 639-1: is -->
<xs:enumeration value="ita" /> <!-- Italian; 639-1: it -->
<xs:enumeration value="jaw" /> <!-- Javanese; 639-1: jw -->
<xs:enumeration value="jpn" /> <!-- Japanese; 639-1: ja -->
<xs:enumeration value="jpr" /> <!-- Judeo-Persian -->
<xs:enumeration value="jrb" /> <!-- Judeo-Arabic -->
<xs:enumeration value="kaa" /> <!-- Kara-Kalpak -->
<xs:enumeration value="kab" /> <!-- Kabyle -->
<xs:enumeration value="kac" /> <!-- Kachin -->
<xs:enumeration value="kal" /> <!-- Kalaallisut; 639-1: kl -->
<xs:enumeration value="kam" /> <!-- Kamba -->
<xs:enumeration value="kan" /> <!-- Kannada; 639-1: kn -->
<xs:enumeration value="kar" /> <!-- Karen -->
<xs:enumeration value="kas" /> <!-- Kashmiri; 639-1: ks -->
<xs:enumeration value="kat" /> <!-- Georgian; 639-1: ka -->
<xs:enumeration value="kau" /> <!-- Kanuri -->
<xs:enumeration value="kaw" /> <!-- Kawi -->
<xs:enumeration value="kaz" /> <!-- Kazakh; 639-1: kk -->
<xs:enumeration value="kha" /> <!-- Khasi -->
<xs:enumeration value="khi" /> <!-- Khoisan (Other) -->
<xs:enumeration value="khm" /> <!-- Khmer; 639-1: km -->
<xs:enumeration value="kho" /> <!-- Khotanese -->
<xs:enumeration value="kik" /> <!-- Kikuyu -->
<xs:enumeration value="kin" /> <!-- Kinyarwanda; 639-1: rw -->
<xs:enumeration value="kir" /> <!-- Kirghiz; 639-1: ky -->
<xs:enumeration value="kmb" /> <!-- Kimbundu -->
<xs:enumeration value="kok" /> <!-- Konkani -->
<xs:enumeration value="kom" /> <!-- Komi -->
<xs:enumeration value="kon" /> <!-- Kongo -->
<xs:enumeration value="kor" /> <!-- Korean; 639-1: ko -->
<xs:enumeration value="kos" /> <!-- Kosraean -->
<xs:enumeration value="kpe" /> <!-- Kpelle -->
<xs:enumeration value="kro" /> <!-- Kru -->
<xs:enumeration value="kru" /> <!-- Kurukh -->
<xs:enumeration value="kua" /> <!-- Kuanyama -->
<xs:enumeration value="kum" /> <!-- Kumyk -->
<xs:enumeration value="kur" /> <!-- Kurdish; 639-1: ku -->
<xs:enumeration value="kut" /> <!-- Kutenai -->
<xs:enumeration value="lad" /> <!-- Ladino -->
<xs:enumeration value="lah" /> <!-- Lahnda -->
<xs:enumeration value="lam" /> <!-- Lamba -->
<xs:enumeration value="lao" /> <!-- Lao; 639-1: lo -->
<xs:enumeration value="lat" /> <!-- Latin; 639-1: la -->
<xs:enumeration value="lav" /> <!-- Latvian; 639-1: lv -->
<xs:enumeration value="lez" /> <!-- Lezghian -->
<xs:enumeration value="lin" /> <!-- Lingala; 639-1: ln -->
<xs:enumeration value="lit" /> <!-- Lithuanian; 639-1: lt -->
<xs:enumeration value="lol" /> <!-- Mongo -->
<xs:enumeration value="loz" /> <!-- Lozi -->
<xs:enumeration value="ltz" /> <!-- Letzeburgesch; 639-1: lb -->
<xs:enumeration value="lua" /> <!-- Luba-Lulua -->
<xs:enumeration value="lub" /> <!-- Luba-Katanga -->
<xs:enumeration value="lug" /> <!-- Ganda -->
<xs:enumeration value="lui" /> <!-- Luiseno -->
<xs:enumeration value="lun" /> <!-- Lunda -->
<xs:enumeration value="luo" /> <!-- Luo (Kenya and Tanzania) -->
<xs:enumeration value="lus" /> <!-- Lushai -->
<xs:enumeration value="mad" /> <!-- Madurese -->
<xs:enumeration value="mag" /> <!-- Magahi -->
<xs:enumeration value="mah" /> <!-- Marshall -->
<xs:enumeration value="mai" /> <!-- Maithili -->
<xs:enumeration value="mak" /> <!-- Makasar -->
<xs:enumeration value="mal" /> <!-- Malayalam; 639-1: ml -->
<xs:enumeration value="man" /> <!-- Mandingo -->
<xs:enumeration value="map" /> <!-- Austronesian (Other) -->
<xs:enumeration value="mar" /> <!-- Marathi; 639-1: mr -->
<xs:enumeration value="mas" /> <!-- Masai -->
<xs:enumeration value="max" /> <!-- Manx -->
<xs:enumeration value="mdr" /> <!-- Mandar -->
<xs:enumeration value="men" /> <!-- Mende -->
<xs:enumeration value="mga" /> <!-- Irish, Middle (900-1200) -->
<xs:enumeration value="mic" /> <!-- Micmac -->
<xs:enumeration value="min" /> <!-- Minangkabau -->
<xs:enumeration value="mis" /> <!-- Miscellaneous languages -->
<xs:enumeration value="mkd" /> <!-- Macedonian; 639-1: mk -->
<xs:enumeration value="mkh" /> <!-- Mon-Khmer (Other) -->
<xs:enumeration value="mlg" /> <!-- Malagasy; 639-1: mg -->
<xs:enumeration value="mlt" /> <!-- Maltese; 639-1: mt -->
<xs:enumeration value="mni" /> <!-- Manipuri -->
<xs:enumeration value="mno" /> <!-- Manobo languages -->
<xs:enumeration value="moh" /> <!-- Mohawk -->
<xs:enumeration value="mol" /> <!-- Moldavian; 639-1: mo -->
<xs:enumeration value="mon" /> <!-- Mongolian; 639-1: mn -->
<xs:enumeration value="mos" /> <!-- Mossi -->
<xs:enumeration value="mri" /> <!-- Maori; 639-1: mi -->
<xs:enumeration value="msa" /> <!-- Malay; 639-1: ms -->
<xs:enumeration value="mul" /> <!-- Multiple languages -->
<xs:enumeration value="mun" /> <!-- Munda languages -->
<xs:enumeration value="mus" /> <!-- Creek -->
<xs:enumeration value="mwr" /> <!-- Marwari -->
<xs:enumeration value="mya" /> <!-- Burmese; 639-1: my -->
<xs:enumeration value="myn" /> <!-- Mayan languages -->
<xs:enumeration value="nah" /> <!-- Aztec -->
<xs:enumeration value="nai" /> <!-- North American Indian (Other) -->
<xs:enumeration value="nau" /> <!-- Nauru; 639-1: na -->
<xs:enumeration value="nav" /> <!-- Navajo -->
<xs:enumeration value="nbl" /> <!-- Ndebele, South -->
<xs:enumeration value="nde" /> <!-- Ndebele, North -->
<xs:enumeration value="ndo" /> <!-- Ndonga -->
<xs:enumeration value="nep" /> <!-- Nepali; 639-1: ne -->
<xs:enumeration value="new" /> <!-- Newari -->
<xs:enumeration value="nia" /> <!-- Nias -->
<xs:enumeration value="nic" /> <!-- Niger-Kordofanian (Other) -->
<xs:enumeration value="niu" /> <!-- Niuean -->
<xs:enumeration value="nld" /> <!-- Dutch; 639-1: nl -->
<xs:enumeration value="non" /> <!-- Norse, Old -->
<xs:enumeration value="nor" /> <!-- Norwegian; 639-1: no -->
<xs:enumeration value="nso" /> <!-- Sohto, Northern -->
<xs:enumeration value="nub" /> <!-- Nubian languages -->
<xs:enumeration value="nya" /> <!-- Nyanja -->
<xs:enumeration value="nym" /> <!-- Nyamwezi -->
<xs:enumeration value="nyn" /> <!-- Nyankole -->
<xs:enumeration value="nyo" /> <!-- Nyoro -->
<xs:enumeration value="nzi" /> <!-- Nzima -->
<xs:enumeration value="oci" /> <!-- Occitan (post 1500); 639-1: oc -->
<xs:enumeration value="oji" /> <!-- Ojibwa -->
<xs:enumeration value="ori" /> <!-- Oriya -->
<xs:enumeration value="orm" /> <!-- Oromo; 639-1: om -->
<xs:enumeration value="osa" /> <!-- Osage -->
<xs:enumeration value="oss" /> <!-- Ossetic -->
<xs:enumeration value="ota" /> <!-- Turkish, Ottoman (1500-1928) -->
<xs:enumeration value="oto" /> <!-- Otomian languages -->
<xs:enumeration value="paa" /> <!-- Papuan (Other) -->
<xs:enumeration value="pag" /> <!-- Pangasinan -->
<xs:enumeration value="pal" /> <!-- Pahlavi -->
<xs:enumeration value="pam" /> <!-- Pampanga -->
<xs:enumeration value="pan" /> <!-- Panjabi; 639-1: pa -->
<xs:enumeration value="pap" /> <!-- Papiamento -->
<xs:enumeration value="pau" /> <!-- Palauan -->
<xs:enumeration value="peo" /> <!-- Persian, Old (ca. 600-400 B.C.) -->
<xs:enumeration value="phi" /> <!-- Philippine (Other) -->
<xs:enumeration value="phn" /> <!-- Phoenician -->
<xs:enumeration value="pli" /> <!-- Pali -->
<xs:enumeration value="pol" /> <!-- Polish; 639-1: pl -->
<xs:enumeration value="pon" /> <!-- Pohnpeian -->
<xs:enumeration value="por" /> <!-- Portuguese; 639-1: pt -->
<xs:enumeration value="pra" /> <!-- Prakrit languages -->
<xs:enumeration value="pro" /> <!-- Provencal, Old (to 1500) -->
<xs:enumeration value="pus" /> <!-- Pushto; 639-1: ps -->
<xs:enumeration value="qaa" /> <!-- reserved for local use -->
<xs:enumeration value="qtz" /> <!-- reserved for local use -->
<xs:enumeration value="que" /> <!-- Quechua; 639-1: qu -->
<xs:enumeration value="raj" /> <!-- Rajasthani -->
<xs:enumeration value="rap" /> <!-- Rapanui -->
<xs:enumeration value="rar" /> <!-- Rarotongan -->
<xs:enumeration value="roa" /> <!-- Romance (Other) -->
<xs:enumeration value="roh" /> <!-- Rhaeto-Romance; 639-1: rm -->
<xs:enumeration value="rom" /> <!-- Romany -->
<xs:enumeration value="ron" /> <!-- Romanian; 639-1: ro -->
<xs:enumeration value="run" /> <!-- Rundi; 639-1: rn -->
<xs:enumeration value="rus" /> <!-- Russian; 639-1: ru -->
<xs:enumeration value="sad" /> <!-- Sandawe -->
<xs:enumeration value="sag" /> <!-- Sango; 639-1: sg -->
<xs:enumeration value="sai" /> <!-- South American Indian (Other) -->
<xs:enumeration value="sal" /> <!-- Salishan languages -->
<xs:enumeration value="sam" /> <!-- Samaritan Aramaic -->
<xs:enumeration value="san" /> <!-- Sanskrit; 639-1: sa -->
<xs:enumeration value="sas" /> <!-- Sasak -->
<xs:enumeration value="sat" /> <!-- Santali -->
<xs:enumeration value="sco" /> <!-- Scots -->
<xs:enumeration value="sel" /> <!-- Selkup -->
<xs:enumeration value="sem" /> <!-- Semitic (Other) -->
<xs:enumeration value="sga" /> <!-- Irish, Old (to 900) -->
<xs:enumeration value="shn" /> <!-- Shan -->
<xs:enumeration value="sid" /> <!-- Sidamo -->
<xs:enumeration value="sin" /> <!-- Sinhalese; 639-1: si -->
<xs:enumeration value="sio" /> <!-- Siouan languages -->
<xs:enumeration value="sit" /> <!-- Sino-Tibetan (Other) -->
<xs:enumeration value="sla" /> <!-- Slavic (Other) -->
<xs:enumeration value="slk" /> <!-- Slovak; 639-1: sk -->
<xs:enumeration value="slv" /> <!-- Slovenian; 639-1: sl -->
<xs:enumeration value="smi" /> <!-- Sami languages; 639-1: se -->
<xs:enumeration value="smo" /> <!-- Samoan; 639-1: sm -->
<xs:enumeration value="sna" /> <!-- Shona; 639-1: sn -->
<xs:enumeration value="snd" /> <!-- Sindhi; 639-1: sd -->
<xs:enumeration value="snk" /> <!-- Soninke -->
<xs:enumeration value="sog" /> <!-- Sogdian -->
<xs:enumeration value="som" /> <!-- Somali; 639-1: so -->
<xs:enumeration value="son" /> <!-- Songhai -->
<xs:enumeration value="sot" /> <!-- Sotho, Southern; 639-1: st -->
<xs:enumeration value="spa" /> <!-- Spanish; 639-1: es -->
<xs:enumeration value="sqi" /> <!-- Albanian; 639-1: sq -->
<xs:enumeration value="srd" /> <!-- Sardinian -->
<xs:enumeration value="srp" /> <!-- Serbian; 639-1: sr -->
<xs:enumeration value="srr" /> <!-- Serer -->
<xs:enumeration value="ssa" /> <!-- Nilo-Saharan (Other) -->
<xs:enumeration value="ssw" /> <!-- Swati; 639-1: ss -->
<xs:enumeration value="suk" /> <!-- Sukuma -->
<xs:enumeration value="sun" /> <!-- Sundanese; 639-1: su -->
<xs:enumeration value="sus" /> <!-- Susu -->
<xs:enumeration value="sux" /> <!-- Sumerian -->
<xs:enumeration value="swa" /> <!-- Swahili; 639-1: sw -->
<xs:enumeration value="swe" /> <!-- Swedish; 639-1: sv -->
<xs:enumeration value="syr" /> <!-- Syriac -->
<xs:enumeration value="tah" /> <!-- Tahitian -->
<xs:enumeration value="tai" /> <!-- Tai (Other) -->
<xs:enumeration value="tam" /> <!-- Tamil; 639-1: ta -->
<xs:enumeration value="tat" /> <!-- Tatar; 639-1: tt -->
<xs:enumeration value="tel" /> <!-- Telugu; 639-1: te -->
<xs:enumeration value="tem" /> <!-- Timne -->
<xs:enumeration value="ter" /> <!-- Tereno -->
<xs:enumeration value="tet" /> <!-- Tetum -->
<xs:enumeration value="tgk" /> <!-- Tajik; 639-1: tg -->
<xs:enumeration value="tgl" /> <!-- Tagalog; 639-1: tl -->
<xs:enumeration value="tha" /> <!-- Thai; 639-1: th -->
<xs:enumeration value="tig" /> <!-- Tigre -->
<xs:enumeration value="tir" /> <!-- Tigrinya -->
<xs:enumeration value="tiv" /> <!-- Tiv -->
<xs:enumeration value="tkl" /> <!-- Tokelau -->
<xs:enumeration value="tli" /> <!-- Tlingit -->
<xs:enumeration value="tmh" /> <!-- Tamashek -->
<xs:enumeration value="tog" /> <!-- Tonga (Nyasa) -->
<xs:enumeration value="ton" /> <!-- Tonga (Tonga Islands) -->
<xs:enumeration value="tpi" /> <!-- Tok Pisin -->
<xs:enumeration value="tsi" /> <!-- Tsimshian -->
<xs:enumeration value="tsn" /> <!-- Tswana; 639-1: ts -->
<xs:enumeration value="tso" /> <!-- Tsonga -->
<xs:enumeration value="tuk" /> <!-- Turkmen; 639-1: tk -->
<xs:enumeration value="tum" /> <!-- Tumbuka -->
<xs:enumeration value="tur" /> <!-- Turkish -->
<xs:enumeration value="tut" /> <!-- Altaic (Other) -->
<xs:enumeration value="tvl" /> <!-- Tuvalu -->
<xs:enumeration value="twi" /> <!-- Twi; 639-1: tw -->
<xs:enumeration value="tyv" /> <!-- Tuvinian -->
<xs:enumeration value="uga" /> <!-- Ugaritic -->
<xs:enumeration value="uig" /> <!-- Uighur; 639-1: ug -->
<xs:enumeration value="ukr" /> <!-- Ukrainian; 639-1: uk -->
<xs:enumeration value="umb" /> <!-- Umbundu -->
<xs:enumeration value="und" /> <!-- Undetermined -->
<xs:enumeration value="urd" /> <!-- Urdu; 639-1: ur -->
<xs:enumeration value="uzb" /> <!-- Uzbek; 639-1: uz -->
<xs:enumeration value="vai" /> <!-- Vai -->
<xs:enumeration value="ven" /> <!-- Venda -->
<xs:enumeration value="vie" /> <!-- Vietnamese; 639-1: vi -->
<xs:enumeration value="vol" /> <!-- Volapuk; 639-1: vo -->
<xs:enumeration value="vot" /> <!-- Votic  -->
<xs:enumeration value="wak" /> <!-- Wakashan languages  -->
<xs:enumeration value="wal" /> <!-- Walamo  -->
<xs:enumeration value="war" /> <!-- Waray  -->
<xs:enumeration value="was" /> <!-- Washo  -->
<xs:enumeration value="wen" /> <!-- Sorbian languages  -->
<xs:enumeration value="wol" /> <!-- Wolof; 639-1: wo -->
<xs:enumeration value="xho" /> <!-- Xhosa; 639-1: xh -->
<xs:enumeration value="yao" /> <!-- Yao  -->
<xs:enumeration value="yap" /> <!-- Yapese  -->
<xs:enumeration value="yid" /> <!-- Yiddish; 639-1: yi/ji -->
<xs:enumeration value="yor" /> <!-- Yoruba -->
<xs:enumeration value="ypk" /> <!-- Yupik languages  -->
<xs:enumeration value="zap" /> <!-- Zapotec  -->
<xs:enumeration value="zen" /> <!-- Zenaga  -->
<xs:enumeration value="zha" /> <!-- Zhuang; 639-1: za -->
<xs:enumeration value="zho" /> <!-- Chinese; 639-1: zh -->
<xs:enumeration value="znd" /> <!-- Zande  -->
<xs:enumeration value="zul" /> <!-- Zulu; 639-1: zu -->
<xs:enumeration value="zun" /> <!-- Zuni  --> 

<!-- DML additions to the ISO 639-2/T for special purpose -->    
<!-- axi for interlingual acceptions -->    
<xs:enumeration value='axi'/>
<!-- unl for universal network language -->    
<xs:enumeration value='unl'/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="iso639TwoLetterLanguageCode">
 <xs:restriction base="xs:string">
  <!-- AFAR            AA     HAMITIC -->
  <xs:enumeration value="aa" />

  <!-- ABKHAZIAN       AB     IBERO-CAUCASIAN -->
  <xs:enumeration value="ab" />

  <!-- AFRIKAANS       AF     GERMANIC -->
  <xs:enumeration value="af" />

  <!-- AMHARIC         AM     SEMITIC -->
  <xs:enumeration value="am" />

  <!-- ARABIC          AR     SEMITIC -->
  <xs:enumeration value="ar" />

  <!-- ASSAMESE        AS     INDIAN -->
  <xs:enumeration value="as" />

  <!-- AYMARA          AY     AMERINDIAN -->
  <xs:enumeration value="ay" />

  <!-- AZERBAIJANI     AZ     TURKIC/ALTAIC -->
  <xs:enumeration value="az" />

  <!-- BASHKIR         BA     TURKIC/ALTAIC -->
  <xs:enumeration value="ba" />

  <!-- BYELORUSSIAN    BE     SLAVIC -->
  <xs:enumeration value="be" />

  <!-- BULGARIAN       BG     SLAVIC -->
  <xs:enumeration value="bg" />

  <!-- BIHARI          BH     INDIAN -->
  <xs:enumeration value="bh" />

  <!-- BISLAMA         BI     [not given] -->
  <xs:enumeration value="bi" />

  <!-- BENGALI;BANGLA  BN     INDIAN -->
  <xs:enumeration value="bn" />

  <!-- TIBETAN         BO     ASIAN -->
  <xs:enumeration value="bo" />

  <!-- BRETON          BR     CELTIC -->
  <xs:enumeration value="br" />

  <!-- CATALAN         CA     ROMANCE -->
  <xs:enumeration value="ca" />

  <!-- CORSICAN        CO     ROMANCE -->
  <xs:enumeration value="co" />

  <!-- CZECH           CS     SLAVIC -->
  <xs:enumeration value="cs" />

  <!-- WELSH           CY     CELTIC -->
  <xs:enumeration value="cy" />

  <!-- DANISH          DA     GERMANIC -->
  <xs:enumeration value="da" />

  <!-- GERMAN          DE     GERMANIC -->
  <xs:enumeration value="de" />

  <!-- BHUTANI         DZ     ASIAN -->
  <xs:enumeration value="dz" />

  <!-- GREEK           EL     LATIN/GREEK -->
  <xs:enumeration value="el" />

  <!-- ENGLISH         EN     GERMANIC -->
  <xs:enumeration value="en" />

  <!-- ESPERANTO       EO     INTERNATIONAL AUX. -->
  <xs:enumeration value="eo" />

  <!-- SPANISH         ES     ROMANCE -->
  <xs:enumeration value="es" />

  <!-- ESTONIAN        ET     FINNO-UGRIC -->
  <xs:enumeration value="et" />

  <!-- BASQUE          EU     BASQUE -->
  <xs:enumeration value="eu" />

  <!-- PERSIAN (farsi) FA     IRANIAN -->
  <xs:enumeration value="fa" />

  <!-- FINNISH         FI     FINNO-UGRIC -->
  <xs:enumeration value="fi" />

  <!-- FIJI            FJ     OCEANIC/INDONESIAN -->
  <xs:enumeration value="fj" />

  <!-- FAROESE         FO     GERMANIC -->
  <xs:enumeration value="fo" />

  <!-- FRENCH          FR     ROMANCE -->
  <xs:enumeration value="fr" />

  <!-- FRISIAN         FY     GERMANIC -->
  <xs:enumeration value="fy" />

  <!-- IRISH           GA     CELTIC -->
  <xs:enumeration value="ga" />

  <!-- SCOTS GAELIC    GD     CELTIC -->
  <xs:enumeration value="gd" />

  <!-- GALICIAN        GL     ROMANCE -->
  <xs:enumeration value="gl" />

  <!-- GUARANI         GN     AMERINDIAN -->
  <xs:enumeration value="gn" />

  <!-- GUJARATI        GU     INDIAN -->
  <xs:enumeration value="gu" />

  <!-- HAUSA           HA     NEGRO-AFRICAN -->
  <xs:enumeration value="ha" />

  <!-- HEBREW          HE     SEMITIC [*Changed 1989 from original ISO 639:1988, IW]  -->
  <xs:enumeration value="he" />

  <!-- HINDI           HI     INDIAN -->
  <xs:enumeration value="hi" />

  <!-- CROATIAN        HR     SLAVIC -->
  <xs:enumeration value="hr" />

  <!-- HUNGARIAN       HU     FINNO-UGRIC -->
  <xs:enumeration value="hu" />

  <!-- ARMENIAN        HY     INDO-EUROPEAN (OTHER) -->
  <xs:enumeration value="hy" />

  <!-- INTERLINGUA     IA     INTERNATIONAL AUX. -->
  <xs:enumeration value="ia" />

  <!-- INTERLINGUE     IE     INTERNATIONAL AUX. -->
  <xs:enumeration value="ie" />

  <!-- INUPIAK         IK     ESKIMO -->
  <xs:enumeration value="ik" />

  <!-- INDONESIAN      ID     OCEANIC/INDONESIAN [*Changed 1989 from original ISO 639:1988, IN]  -->
  <xs:enumeration value="id" />

  <!-- ICELANDIC       IS     GERMANIC -->
  <xs:enumeration value="is" />

  <!-- ITALIAN         IT     ROMANCE -->
  <xs:enumeration value="it" />

  <!-- INUKTITUT       IU     [        ] -->
  <xs:enumeration value="iu" />

  <!-- JAPANESE        JA     ASIAN -->
  <xs:enumeration value="ja" />

  <!-- JAVANESE        JV     OCEANIC/INDONESIAN -->
  <xs:enumeration value="jv" />

  <!-- GEORGIAN        KA     IBERO-CAUCASIAN -->
  <xs:enumeration value="ka" />

  <!-- KAZAKH          KK     TURKIC/ALTAIC -->
  <xs:enumeration value="kk" />

  <!-- GREENLANDIC     KL     ESKIMO -->
  <xs:enumeration value="kl" />

  <!-- CAMBODIAN       KM     ASIAN -->
  <xs:enumeration value="km" />

  <!-- KANNADA         KN     DRAVIDIAN -->
  <xs:enumeration value="kn" />

  <!-- KOREAN          KO     ASIAN -->
  <xs:enumeration value="ko" />

  <!-- KASHMIRI        KS     INDIAN -->
  <xs:enumeration value="ks" />

  <!-- KURDISH         KU     IRANIAN -->
  <xs:enumeration value="ku" />

  <!-- KIRGHIZ         KY     TURKIC/ALTAIC -->
  <xs:enumeration value="ky" />

  <!-- LATIN           LA     LATIN/GREEK -->
  <xs:enumeration value="la" />

  <!-- LINGALA         LN     NEGRO-AFRICAN -->
  <xs:enumeration value="ln" />

  <!-- LAOTHIAN        LO     ASIAN -->
  <xs:enumeration value="lo" />

  <!-- LITHUANIAN      LT     BALTIC -->
  <xs:enumeration value="lt" />

  <!-- LATVIAN;LETTISH LV     BALTIC -->
  <xs:enumeration value="lv" />

  <!-- MALAGASY        MG     OCEANIC/INDONESIAN -->
  <xs:enumeration value="mg" />

  <!-- MAORI           MI     OCEANIC/INDONESIAN -->
  <xs:enumeration value="mi" />

  <!-- MACEDONIAN      MK     SLAVIC -->
  <xs:enumeration value="mk" />

  <!-- MALAYALAM       ML     DRAVIDIAN -->
  <xs:enumeration value="ml" />

  <!-- MONGOLIAN       MN     [not given] -->
  <xs:enumeration value="mn" />

  <!-- MOLDAVIAN       MO     ROMANCE -->
  <xs:enumeration value="mo" />

  <!-- MARATHI         MR     INDIAN -->
  <xs:enumeration value="mr" />

  <!-- MALAY           MS     OCEANIC/INDONESIAN -->
  <xs:enumeration value="ms" />

  <!-- MALTESE         MT     SEMITIC -->
  <xs:enumeration value="mt" />

  <!-- BURMESE         MY     ASIAN -->
  <xs:enumeration value="my" />

  <!-- NAURU           NA     [not given] -->
  <xs:enumeration value="na" />

  <!-- NEPALI          NE     INDIAN -->
  <xs:enumeration value="ne" />

  <!-- DUTCH           NL     GERMANIC -->
  <xs:enumeration value="nl" />

  <!-- NORWEGIAN       NO     GERMANIC -->
  <xs:enumeration value="no" />

  <!-- OCCITAN         OC     ROMANCE -->
  <xs:enumeration value="oc" />

  <!-- AFAN (OROMO)    OM     HAMITIC -->
  <xs:enumeration value="om" />

  <!-- ORIYA           OR     INDIAN -->
  <xs:enumeration value="or" />

  <!-- PUNJABI         PA     INDIAN -->
  <xs:enumeration value="pa" />

  <!-- POLISH          PL     SLAVIC -->
  <xs:enumeration value="pl" />

  <!-- PASHTO;PUSHTO   PS     IRANIAN -->
  <xs:enumeration value="ps" />

  <!-- PORTUGUESE      PT     ROMANCE -->
  <xs:enumeration value="pt" />

  <!-- QUECHUA         QU     AMERINDIAN -->
  <xs:enumeration value="qu" />

  <!-- RHAETO-ROMANCE  RM     ROMANCE -->
  <xs:enumeration value="rm" />

  <!-- KURUNDI         RN     NEGRO-AFRICAN -->
  <xs:enumeration value="rn" />

  <!-- ROMANIAN        RO     ROMANCE -->
  <xs:enumeration value="ro" />

  <!-- RUSSIAN         RU     SLAVIC -->
  <xs:enumeration value="ru" />

  <!-- KINYARWANDA     RW     NEGRO-AFRICAN -->
  <xs:enumeration value="rw" />

  <!-- SANSKRIT        SA     INDIAN -->
  <xs:enumeration value="sa" />

  <!-- SINDHI          SD     INDIAN -->
  <xs:enumeration value="sd" />

  <!-- SANGHO          SG     NEGRO-AFRICAN -->
  <xs:enumeration value="sg" />

  <!-- SERBO-CROATIAN  SH     SLAVIC -->
  <xs:enumeration value="sh" />

  <!-- SINGHALESE      SI     INDIAN -->
  <xs:enumeration value="si" />

  <!-- SLOVAK          SK     SLAVIC -->
  <xs:enumeration value="sk" />

  <!-- SLOVENIAN       SL     SLAVIC -->
  <xs:enumeration value="sl" />

  <!-- SAMOAN          SM     OCEANIC/INDONESIAN -->
  <xs:enumeration value="sm" />

  <!-- SHONA           SN     NEGRO-AFRICAN -->
  <xs:enumeration value="sn" />

  <!-- SOMALI          SO     HAMITIC -->
  <xs:enumeration value="so" />

  <!-- ALBANIAN        SQ     INDO-EUROPEAN (OTHER) -->
  <xs:enumeration value="sq" />

  <!-- SERBIAN         SR     SLAVIC -->
  <xs:enumeration value="sr" />

  <!-- SISWATI         SS     NEGRO-AFRICAN -->
  <xs:enumeration value="ss" />

  <!-- SESOTHO         ST     NEGRO-AFRICAN -->
  <xs:enumeration value="st" />

  <!-- SUNDANESE       SU     OCEANIC/INDONESIAN -->
  <xs:enumeration value="su" />

  <!-- SWEDISH         SV     GERMANIC -->
  <xs:enumeration value="sv" />

  <!-- SWAHILI         SW     NEGRO-AFRICAN -->
  <xs:enumeration value="sw" />

  <!-- TAMIL           TA     DRAVIDIAN -->
  <xs:enumeration value="ta" />

  <!-- TELUGU          TE     DRAVIDIAN -->
  <xs:enumeration value="te" />

  <!-- TAJIK           TG     IRANIAN -->
  <xs:enumeration value="tg" />

  <!-- THAI            TH     ASIAN -->
  <xs:enumeration value="th" />

  <!-- TIGRINYA        TI     SEMITIC -->
  <xs:enumeration value="ti" />

  <!-- TURKMEN         TK     TURKIC/ALTAIC -->
  <xs:enumeration value="tk" />

  <!-- TAGALOG         TL     OCEANIC/INDONESIAN -->
  <xs:enumeration value="tl" />

  <!-- SETSWANA        TN     NEGRO-AFRICAN -->
  <xs:enumeration value="tn" />

  <!-- TONGA           TO     OCEANIC/INDONESIAN -->
  <xs:enumeration value="to" />

  <!-- TURKISH         TR     TURKIC/ALTAIC -->
  <xs:enumeration value="tr" />

  <!-- TSONGA          TS     NEGRO-AFRICAN -->
  <xs:enumeration value="ts" />

  <!-- TATAR           TT     TURKIC/ALTAIC -->
  <xs:enumeration value="tt" />

  <!-- TWI             TW     NEGRO-AFRICAN -->
  <xs:enumeration value="tw" />

  <!-- UIGUR           UG     [       ] -->
  <xs:enumeration value="ug" />

  <!-- UKRAINIAN       UK     SLAVIC -->
  <xs:enumeration value="uk" />

  <!-- URDU            UR     INDIAN -->
  <xs:enumeration value="ur" />

  <!-- UZBEK           UZ     TURKIC/ALTAIC -->
  <xs:enumeration value="uz" />

  <!-- VIETNAMESE      VI     ASIAN -->
  <xs:enumeration value="vi" />

  <!-- VOLAPUK         VO     INTERNATIONAL AUX. -->
  <xs:enumeration value="vo" />

  <!-- WOLOF           WO     NEGRO-AFRICAN -->
  <xs:enumeration value="wo" />

  <!-- XHOSA           XH     NEGRO-AFRICAN -->
  <xs:enumeration value="xh" />

  <!-- YIDDISH         YI     GERMANIC [*Changed 1989 from original ISO 639:1988, JI]  -->
  <xs:enumeration value="yi" />

  <!-- YORUBA          YO     NEGRO-AFRICAN -->
  <xs:enumeration value="yo" />

  <!-- ZHUANG          ZA     [       ] -->
  <xs:enumeration value="za" />

  <!-- CHINESE         ZH     ASIAN -->
  <xs:enumeration value="zh" />

  <!-- ZULU            ZU     NEGRO-AFRICAN -->
  <xs:enumeration value="zu" />
 </xs:restriction>
</xs:simpleType>

<!-- nameHrefAttributeType Type -->
<!-- contains a name and an href attribute. Like HTML hyperlinks -->
<xs:complexType name="nameHrefAttributesType" mixed='true'>
 <xs:attribute name="name" type='xlink:label' />
 <xs:attribute ref='xlink:href' />
</xs:complexType>

<!-- objectRefType type -->
<!-- references to another object with an xlink.
The link can be tagged with a gloss.
lang is the language of the gloss. -->
<xs:complexType name='objectRefType' mixed='true'>
<xs:attribute ref="xlink:href" use='required' />
<xs:attribute ref="d:lang" />
<xs:attribute name='tag' type="xs:string" />
<xs:attribute name='tag-type' type="xs:string" />
</xs:complexType>

<!-- status attribute -->
<!-- The status attribute is used to indicate the status
of a linguistic element  -->
<xs:attribute name="status"> 
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="auto" />
<xs:enumeration value="rough" />
<xs:enumeration value="revised" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>

<!-- weight attribute -->
<!-- Indicates the weight of a linguistic element.
It can be a frequency score, etc.
This weight can be used to choose between various elements
of the same type eg between two translations/
The possible values are between 0.0 and 1.0.

It is better to use the IDs and to store the different
weights in a table. It allows to store various
weights (frequency in corpora, neuronal weigth,
frequency in search engines, etc.). 

-->
<xs:attribute name="weight" type="d:weightType" />

<xs:simpleType name="weightType">
<xs:restriction base="xs:float">
<xs:maxInclusive value="1.0"/>
<xs:minInclusive value="0.0"/>
</xs:restriction>
</xs:simpleType>


<!--================ DML definitions for a database ================-->

<!-- database element  -->
<!--The database element is the top element of the database.
It describes the whole database with the dictionaries, the various groups
and pointers to the users file -->

<xs:element name='database'>
<xs:complexType>
<xs:sequence>
<xs:element ref='d:users' />
<xs:element ref='d:groups' />
<xs:element ref='d:partner-servers' />
<xs:element ref='d:dictionaries' />
</xs:sequence>
<xs:attribute name='creation-date' type='d:dateType' use='optional'/>
<xs:attribute name='name' type="xs:string" use='optional'/>
<xs:attribute name='nickname' type="xs:string" use='optional'/>
<xs:attribute name='owner' type="xs:string" use='optional'/>
<xs:attribute ref='d:history' use='optional'/>
<xs:attribute ref='d:history-ref' use='optional'/>
</xs:complexType>
</xs:element>



<!-- partner-servers element  -->
<!-- Lists all the users or groups that have the rights to exchange
some data with the database. The partners are other programs
(databases, lemmatizers, etc.), not humans. -->
<xs:element name='partner-servers'>
<xs:complexType>
<xs:choice minOccurs='0' maxOccurs='unbounded'>
<xs:element ref='d:group-ref'/>
<xs:element ref='d:user-ref'/>
</xs:choice>
</xs:complexType>
</xs:element>

<!-- users element  -->
<!-- Lists all the various users of the database. -->
<xs:element name='users'>
<xs:complexType>
<xs:sequence>
<xs:element ref='d:user-ref' minOccurs='0' maxOccurs='unbounded'/>
</xs:sequence>
</xs:complexType>
</xs:element>

<!-- group-ref element  -->
<!-- This element is used to make a reference to a group of the database. -->
<xs:element name='group-ref'>
<xs:complexType>
<xs:attribute name='name' type="xs:string" use='optional'/>
</xs:complexType>
</xs:element>

<!-- groups element  -->
<!-- Lists all the various groups of the database. -->
<xs:element name='groups'>
<xs:complexType>
<xs:sequence>
<xs:element ref='d:group' minOccurs='0' maxOccurs='unbounded'/>
</xs:sequence>
</xs:complexType>
</xs:element>

<!-- group element  -->
<!-- describes a group of the database by listing its users -->
<!-- 3 groups exist in every database by default: administrators,
lexicologists and the universe of all users -->
<xs:element name='group'>
 <xs:complexType>
  <xs:sequence>
   <xs:element ref='d:user-ref' minOccurs='1' maxOccurs='unbounded'/>
  </xs:sequence>
  <xs:attribute name='name' type="xs:string" use='optional'/>
 </xs:complexType>
</xs:element>

<!-- user-ref element  -->
<!-- This element is used to make a reference to a user of the database. -->
<xs:element name='user-ref' type="d:nameHrefAttributesType" />

<!-- dictionaries element  -->
<!-- lists all the heterogeneous dictionaries available locally
or through the network from the database. -->
<xs:element name='dictionaries'>
 <xs:complexType>
  <xs:sequence>
   <xs:element ref='d:dict-ref' minOccurs='0' maxOccurs='unbounded'/>
  </xs:sequence>
 </xs:complexType>
</xs:element>

<!-- dict-ref element  -->
<!-- links to a dictionary element that describes a dictionary -->
<xs:element name='dict-ref' type="d:nameHrefAttributesType"/>

<!--================ DML definitions for a user ================-->

<!-- user element  -->
<!--The user element describes all information relative to each
user of the database with his/her settings, preferences, etc. -->
<xs:element name='user'>
<xs:complexType>
<xs:sequence>
<xs:element ref='d:login' />
<xs:element ref='d:password' />
<xs:element ref='d:email' />
<xs:element ref='d:profiles' />
<xs:element ref='d:credits' />
<xs:element ref='d:annotations' />
<xs:element ref='d:contributions' />
<xs:element ref='d:requests' />
<xs:element ref='d:xml-stylesheet' />
<xs:element ref='d:groups' />
</xs:sequence>
<xs:attribute ref='d:history' use='optional'/>
<xs:attribute ref='d:history-ref' use='optional'/>
<xs:attribute name='creation-date' type='d:dateType' use='optional'/>
<xs:attribute name='name' type="xs:string" use='optional'/>
</xs:complexType>
</xs:element>

<!-- login element  -->
<!-- used by a user to log into the database -->
<xs:element name='login' type="xs:string" />

<!-- password element  -->
<!-- used by a user to log into the database.
Has to be encrypted -->
<xs:element name='password' type="xs:string" />

<!-- email element  -->
<!-- email address -->
<xs:element name='email' type='d:emailType' />

<xs:simpleType name='emailType'>
<xs:restriction base="xs:string">
<!-- regular expression: at least on char followed by a "@" followed
by at least one char followed by a "." followed by at least one char -->
<xs:pattern value=".+@.+[.]+.+"/> 
</xs:restriction>
</xs:simpleType>

<!-- profiles element  -->
<!-- User profiles -->
<xs:element name='profiles'>
<xs:complexType>
<xs:sequence>
<xs:element ref='d:competences' maxOccurs='1'/>
<xs:element ref='d:interests' maxOccurs='1'/>
<xs:element ref='d:activities' maxOccurs='1'/>
</xs:sequence>
</xs:complexType>
</xs:element>


<!-- competences element  -->
<!-- Indicates the linguistic competences of a user/contributor -->
<xs:element name='competences'>
<xs:complexType>
<xs:sequence>
<!-- The declaration of these elements should be more structured
and systematic ie: 1 element for each language of the dml:lang type.-->
<xs:element name='cat' maxOccurs='1' type="xs:string" />
<xs:element name='eng' maxOccurs='1' type="xs:string" />
<xs:element name='fra' maxOccurs='1' type="xs:string" />
<xs:element name='spa' maxOccurs='1' type="xs:string" />
<xs:element name='hun' maxOccurs='1' type="xs:string" />
<xs:element name='jpn' maxOccurs='1' type="xs:string" />
<xs:element name='ita' maxOccurs='1' type="xs:string" />
<xs:element name='spa' maxOccurs='1' type="xs:string" />
<xs:element name='tha' maxOccurs='1' type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>

<!-- interests element  -->
<!-- Indicates the interests of a user/contributor -->
<xs:element name='interests'>
<xs:complexType>
<xs:sequence>
<xs:element name='interest' type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<!-- activities element  -->
<!-- Indicates the activities of a user/contributor -->
<xs:element name='activities'>
<xs:complexType>
<xs:sequence>
<xs:element name='activity' type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<!-- credits element  -->
<!-- contributions credits of a contributors. 
If a contributor sends a contribution to the database, his/her credits 
increase.
If s/he extracts a customised dictionary from the database, 
his/her credits decrease. -->
<xs:element name='credits' type='xs:integer' />

<!-- annotations element  -->
<!-- groups the annotations of a contributors.-->
<xs:element name='annotations'>
<xs:complexType>
<xs:sequence>
<xs:element ref="d:annotation" />
</xs:sequence>
</xs:complexType>
</xs:element>

<!-- annotation element  -->
<!-- Links to an annotation of a contributor. These files are
conformant with the RDF schema like amaya annotations. -->
<xs:element name='annotation' type="d:hrefAttributeType" />

<!-- contributions element  -->
<!-- groups the contributions of a contributors. These contributions
are stored in a virtual space before being reviewed and integrated
into the database by a specialist in lexicology. -->
<xs:element name='contributions'>
<xs:complexType>
<xs:sequence>
<xs:element ref="d:contribution" />
</xs:sequence>
</xs:complexType>
</xs:element>

<!-- contribution element  -->
<!-- Links to a contribution of a contributor. These contributions
are represented by an XSLT stylesheet on the source file. -->
<xs:element name='contribution' type="d:hrefAttributeType" />

<!-- requests element  -->
<!-- Links to a file where all the requests of a user are stored. -->
<xs:element name='requests' type="d:hrefAttributeType" />

<!-- xml-stylesheet element  -->
<!-- links to a CSS or XSL stylesheet used by a user
to indicate its preferences. -->
<xs:element name='xml-stylesheet'>
<xs:complexType>
<xs:attribute name='type' type="xs:string" use='optional'/>
<xs:attribute ref='xlink:href' use='optional'/>
</xs:complexType>
</xs:element>

<!--================ DML definitions for dictionary metadata ================-->

<!-- dictionary-metadata element  -->
<!-- This elements describes the dictionary metadata. 
It notes the meta-information available on a dictionary:
languages, content, domain, dates, encoding, format, etc.
It describes also the macrostructure of the dictionary, ie
monolingual, bilingual, multilingual, etc. -->

<xs:element name='dictionary-metadata'>
 <xs:complexType>
  <xs:sequence>
   <xs:element ref='d:languages' minOccurs="1" maxOccurs="1"/>
   <xs:element ref='d:contents' minOccurs="1" maxOccurs="1"/>
   <xs:element ref='d:domain' minOccurs="1" maxOccurs="1"/>
   <xs:element ref='d:source' minOccurs="1" maxOccurs="1"/>
   <xs:element ref='d:authors' minOccurs="0" maxOccurs="1"/>
   <xs:element ref='d:legal' minOccurs="1" maxOccurs="1"/>
   <xs:element ref='d:comments' minOccurs="0" maxOccurs="1"/>
   <xs:element ref='d:administrators' minOccurs="0" maxOccurs="1"/>
   <xs:element ref='d:volumes' minOccurs="1" maxOccurs="1"/>
   <xs:element ref='d:links' minOccurs="0" maxOccurs="1"/>
   <xs:element ref='d:result-formatter' minOccurs="0" maxOccurs="1"/>
   <xs:element ref='d:result-preprocessor' minOccurs="0" maxOccurs="1"/>
   <xs:element ref='d:result-postupdateprocessor' minOccurs="0" maxOccurs="1"/>
   <xs:element ref='d:result-postsaveprocessor' minOccurs="0" maxOccurs="1"/>
   <xs:element ref='d:other-files' minOccurs="0" maxOccurs="1"/>
   <xs:element ref='d:xsl-stylesheet' minOccurs="0" maxOccurs="unbounded"/>
  </xs:sequence>
<xs:attribute name='category' type='d:categoryType' use='optional'/>
<xs:attribute name='creation-date' type='d:dateType' use='optional'/>
<xs:attribute ref='d:history' use='optional'/>
<xs:attribute ref='d:history-ref' use='optional'/>
<xs:attribute name='installation-date' type='d:dateType' use='optional'/>
<xs:attribute name='fullname' type="xs:string" use='optional'/>
<!-- used as a nickname for the dictionary and the volumes  -->
<xs:attribute name='name' type='d:nameType' use='optional'/>
<xs:attribute name='owner' type="xs:string" use='optional'/>
<xs:attribute name='type' type='d:dictType' use='optional'/>
<!-- If the dictionary is described elsewhere on the Web, indicate its URL  -->
<xs:attribute name='homepage' type='xlink:href'/>
</xs:complexType>
</xs:element>

<!-- element languages  -->
<!-- lists the languages present in a dictionary --> 
<xs:element name='languages'>
<xs:complexType>
<xs:choice minOccurs='0' maxOccurs='unbounded'>
<xs:element ref='d:source-language'/>
<xs:element ref='d:target-language'/>
</xs:choice>
</xs:complexType>
</xs:element>

<!-- element source-language  -->
<!-- source-language present in a dictionary --> 
<xs:element name="source-language">
<xs:complexType>
<xs:attribute ref="d:lang" />
</xs:complexType>
</xs:element>

<!-- element target-language  -->
<!-- target-language present in a dictionary --> 
<xs:element name="target-language">
<xs:complexType>
<xs:attribute ref="d:lang" />
</xs:complexType>
</xs:element>

<!-- type categoryType  -->
<!-- macrostructure of a dictionary --> 
<xs:simpleType name='categoryType'>
<xs:restriction base="xs:string">
<xs:enumeration value="monolingual" />
<xs:enumeration value="bilingual" />
<xs:enumeration value="multilingual" />
</xs:restriction>
</xs:simpleType>

<!-- type dictType  -->
<!-- macrostructure type of a multilingual dictionary --> 
<xs:simpleType name='dictType'>
<xs:restriction base="xs:string">
<!-- From one language to another, all languages are in the same volume -->
<xs:enumeration value="monodirectional" />
<!-- From one language to another, all languages are in the same volume -->
<xs:enumeration value="bidirectional" />
<!-- From one language to another, each language is in a separated volume -->
<xs:enumeration value="direct" />
<!-- From one language to a pivot volume and then to another, each language is in a separated volume -->
<xs:enumeration value="pivot" />
<xs:enumeration value="mixed" />
</xs:restriction>
</xs:simpleType>

<!-- element contents  -->
<!-- It describes with a text the contents of a dictionary --> 
<xs:element name='contents' type="xs:string" />

<!-- element domain  -->
<!-- It describes the domain of a dictionary 
e.g. : general, medecine, computer science, etc.
Maybe it could be a closed list ... -->
<xs:element name='domain' type="xs:string" />

<!-- element source  -->
<!-- describes from where does the dictionary come from,
who gave it to Papillon --> 
<xs:element name='source' type="xs:string" />

<!-- element legal  -->
<!-- describes the legal rights attached to the use of this dictionary
e.g. :research purpose only, public, open source, etc. --> 
<xs:element name='legal' type="xs:string" />

<!-- element comments  -->
<!-- general comments on a dictionary, text -->
<xs:element name='comments' type="xs:string" />

<!-- element volumes -->
<!-- Lists all the volumes/files of a dictionary with an xlink. -->
<xs:element name='volumes'>
 <xs:complexType>
  <xs:sequence>
   <xs:element ref="d:volume-metadata-ref" minOccurs='1' maxOccurs='unbounded'/>
  </xs:sequence>
 </xs:complexType>
</xs:element>

<!-- element volume-metadata-ref -->
<!-- references a volume-metadata file with an xlink. -->
<xs:element name='volume-metadata-ref'>
 <xs:complexType mixed='true'>
  <xs:attribute name="source-language" type='d:lang' />
  <xs:attribute name="name" type='xlink:label' />
  <xs:attribute ref='xlink:href' />
 </xs:complexType>
</xs:element>

<!-- element result-formatter -->
<!-- indicates the java class used for formatting the query results.
-->
<xs:element name='result-formatter' type="d:classNameAttributeType"/>

<!-- element result-preprocessor -->
<!-- indicates the java class used for pre-processing the entry before editing it.
-->
<xs:element name='result-preprocessor' type="d:classNameAttributeType"/>

<!-- element result-postupdateprocessor -->
<!-- indicates the java class used for post-processing the entry once edited.
-->
<xs:element name='result-postupdateprocessor' type="d:classNameAttributeType"/>

<!-- element result-postsaveprocessor -->
<!-- indicates the java class used for postsaveprocessor the entry once edited.
-->
<xs:element name='result-postsaveprocessor' type="d:classNameAttributeType"/>


<!-- element links -->
<!-- indicates the links between the volumes files in the dictionary.
-->
<xs:element name='links'>
 <xs:complexType>
  <xs:sequence>
   <xs:element ref="d:link" minOccurs='1' maxOccurs='unbounded' />
  </xs:sequence>
 </xs:complexType>
</xs:element>

<xs:element name="link" type="d:arcType" />

<!-- element other-files -->
<!-- Gives info on other files about the dictionary. -->
<xs:element name='other-files'>
 <xs:complexType>
  <xs:sequence>
   <xs:element ref="d:file" />
  </xs:sequence>
 </xs:complexType>
</xs:element>

<!-- element file -->
<!-- Gives info on a file about the dictionary. -->
<xs:element name='file' type="d:hrefAttributeType" />

<!-- element xsl-stylesheet -->
<!-- references an xsl stylesheet file with an xlink. 
This file is used to display the entries in HTML  -->
<xs:element name='xsl-stylesheet'>
 <xs:complexType>
 <xs:attribute name="default" type='xs:boolean' />
 <xs:attribute name="name" type='xlink:label' />
 <xs:attribute ref='xlink:href' />
 </xs:complexType>
</xs:element>

<!--================ DML definitions for volume metadata ================-->

<!-- volume-metadata element  -->
<!-- This elements describes a volume. 
It notes the meta-information available on a volume:
size, dates, number of headwords, etc. -->

<xs:element name='volume-metadata'>
 <xs:complexType>
  <xs:sequence>
   <xs:element ref='d:authors' minOccurs="0" maxOccurs="1"/>
   <xs:element ref='d:comments' minOccurs="0" maxOccurs="1"/>
   <xs:element ref='d:cdm-elements' minOccurs="0" maxOccurs="1"/>
   <xs:element ref='d:administrators' minOccurs="0" maxOccurs="1"/>
   <xs:choice>
   		<xs:element ref='d:volume-ref' minOccurs="1" maxOccurs="1"/>
   		<xs:element ref='d:api-ref' minOccurs="1" maxOccurs="1"/>
   </xs:choice>
   <xs:element ref='d:xmlschema-ref' minOccurs="0" maxOccurs="1"/>
   <xs:element ref='d:template-entry-ref' minOccurs="0" maxOccurs="1"/>
   <xs:element ref='d:template-interface-ref' minOccurs="0" maxOccurs="1"/>
   <xs:element ref='d:xsl-stylesheet' minOccurs="0" maxOccurs="1"/>
  </xs:sequence>
<xs:attribute name='location' type='d:locationType'/>
<xs:attribute name='source-language' type='d:lang'/>
<xs:attribute name='target-languages' type="xs:string" use='optional'/>
<xs:attribute name='creation-date' type='d:dateType' use='optional'/>
<xs:attribute name='installation-date' type='d:dateType' use='optional'/>
<xs:attribute ref='d:history' use='optional'/>
<xs:attribute ref='d:history-ref' use='optional'/>
<xs:attribute name='bytes' type='xs:positiveInteger' use='optional'/>
<xs:attribute name='hw-number' type='xs:positiveInteger' use='optional'/>
<xs:attribute name='modification-date' type='d:dateType' use='optional'/>
<xs:attribute name='name' type='d:nameType'/>
<!-- Name of the dictionary containing the volume -->
<xs:attribute name='dictname' type='d:nameType' use='optional'/>
<xs:attribute name='encoding' type='d:characterEncodingType' use='optional'/>
<xs:attribute name='format' type='d:fileFormatType' use='optional'/>
<!-- Name of the corresponding database table
where the volume entries are stored. -->
<xs:attribute name='dbname' type='d:dbnameType'/>
<xs:attribute name='version' type="xs:string" use='optional'/>
</xs:complexType>
</xs:element>


<xs:simpleType name='dbnameType'>
<xs:restriction base="xs:string">
<!-- regular expression: only a-z lowercase characters -->
<xs:pattern value="[a-z]+"/> 
</xs:restriction>
</xs:simpleType>

<xs:simpleType name='nameType'>
<xs:restriction base="xs:string">
<!-- regular expression: only a-z lowercase characters -->
<xs:pattern value="[a-zA-Z\-_]+"/> 
</xs:restriction>
</xs:simpleType>


<!-- type characterEncodingType  -->
<!-- character encoding type of a dictionary. The values are taken from 
the Internet Assigned Number Authority IANA Character Set registry.
For more info, please refer to: 
http://www.iana.org/assignments/character-sets
These encoding types are also used for MIME types --> 
<xs:simpleType name='characterEncodingType'>
<xs:restriction base="xs:string">
<xs:enumeration value="Big5" />
<xs:enumeration value="EUC-JP" />
<xs:enumeration value="EUC-KR" />
<xs:enumeration value="GB2312" />
<xs:enumeration value="ISO-2022-JP" />
<xs:enumeration value="ISO-2022-KR" />
<xs:enumeration value="ISO-8859-1" />
<xs:enumeration value="ISO-8859-2" />
<xs:enumeration value="ISO-8859-3" />
<xs:enumeration value="ISO-8859-4" />
<xs:enumeration value="ISO-8859-5" />
<xs:enumeration value="ISO-8859-6" />
<xs:enumeration value="ISO-8859-7" />
<xs:enumeration value="ISO-8859-8" />
<xs:enumeration value="ISO-8859-9" />
<xs:enumeration value="ISO-8859-10" />
<xs:enumeration value="ISO-8859-15" />
<xs:enumeration value="KOI8-R" />
<xs:enumeration value="US-ASCII" />
<xs:enumeration value="Shift_JIS" />
<xs:enumeration value="UTF-7" />
<xs:enumeration value="UTF-8" />
<xs:enumeration value="UTF-16" />
</xs:restriction>
</xs:simpleType>

<!-- type fileFormatType  -->
<!-- format of a dictionary --> 
<xs:simpleType name='fileFormatType'>
<xs:restriction base="xs:string">
<xs:enumeration value="rtf" />
<xs:enumeration value="xml" />
<xs:enumeration value="html" />
<xs:enumeration value="sgml" />
<xs:enumeration value="txt" />
</xs:restriction>
</xs:simpleType>

<!-- type locationType  -->
<!-- location of a dictionary --> 
<xs:simpleType name='locationType'>
<xs:restriction base="xs:string">
<xs:enumeration value="local" />
<xs:enumeration value="remote" />
</xs:restriction>
</xs:simpleType>


<!-- element authors  -->
<!-- describes who were the authors of the dictionary --> 
<xs:element name='authors' type="xs:string" />

<!-- element cdm-elements  -->
<!-- lists all the common dictionary markup (CDM) elements
presents in a dictionary.
The CDM elements have a fixed semantics. It allows one to merge
two dictionaries following their CDM elements or to query these elements -->
<!-- These elements are also used to upload a dictionary into a database.-->
<xs:element name='cdm-elements'>
<xs:complexType>
 <xs:sequence>
<!-- all CDM elements -->
<xs:element ref='d:cdm-volume' minOccurs="1" maxOccurs='1'/>
<xs:element ref='d:cdm-entry' minOccurs="1" maxOccurs='1'/>
<xs:element ref='d:cdm-entry-id' minOccurs="1" maxOccurs='1'/>
<xs:element ref='d:cdm-entry-level' minOccurs="0" maxOccurs='1'/>
<xs:element ref='d:cdm-headword' minOccurs="1" maxOccurs='1'/>
<xs:element ref='d:cdm-headword-variant' minOccurs="0" maxOccurs='1'/>
<xs:element ref='d:cdm-writing' minOccurs="0" maxOccurs='1'/>
<xs:element ref='d:cdm-reading' minOccurs="0" maxOccurs='1'/>
<xs:element ref='d:cdm-pronunciation' minOccurs="0" maxOccurs='1'/>
<xs:element ref='d:cdm-pos' minOccurs="0" maxOccurs='1'/>
<xs:element ref='d:cdm-sense-id' minOccurs="0" maxOccurs='1'/>
<xs:element ref='d:cdm-sense-level' minOccurs="0" maxOccurs='1'/>
<xs:element ref='d:cdm-definition' minOccurs="0" maxOccurs="1"/>
<xs:element ref='d:cdm-translation' minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref='d:cdm-translation-ref' minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref='d:cdm-example' minOccurs="0" maxOccurs='unbounded'/>
<xs:element ref='d:cdm-idiom' minOccurs="0" maxOccurs='unbounded'/>
<xs:element ref='d:cdm-corpus' minOccurs="0" maxOccurs='unbounded'/>
<xs:element ref='d:cdm-key1' minOccurs="0" maxOccurs='unbounded'/>
<xs:element ref='d:cdm-key2' minOccurs="0" maxOccurs='unbounded'/>
<xs:element ref='d:cdm-key3' minOccurs="0" maxOccurs='unbounded'/>
<xs:element ref='d:cdm-key4' minOccurs="0" maxOccurs='unbounded'/>
<xs:element ref='d:cdm-key5' minOccurs="0" maxOccurs='unbounded'/>
<xs:element ref='d:cdm-history' minOccurs="0" maxOccurs='1'/>
<xs:element ref='d:cdm-modification' minOccurs="0" maxOccurs='1'/>
<xs:element ref='d:cdm-modification-author' minOccurs="0" maxOccurs='1'/>
<xs:element ref='d:cdm-modification-date' minOccurs="0" maxOccurs='1'/>
<xs:element ref='d:cdm-modification-comment' minOccurs="0" maxOccurs='1'/>
</xs:sequence>
</xs:complexType>
</xs:element>


<!-- All CDM elements -->
<!-- cdm-volume is the root element of the volume xml file -->
<!-- has to be unique in the file -->
<xs:element name='cdm-volume' type="d:cdmType"/>

<!-- cdm-entry is the root element of an entry -->
<!-- can be multiple in the volume -->
<xs:element name='cdm-entry' type="d:cdmType"/>

<!-- cdm-entry-id is a unique id noting the entry -->
<!-- has to be unique in the entry AND in the volume -->
<xs:element name='cdm-entry-id' type="d:cdmType"/>

<!-- cdm-entry-level is the quality level of the entry -->
<xs:element name='cdm-entry-level' type="d:cdmType"/>

<!-- cdm-headword is a headord of the entry -->
<!-- can be multiple in the entry -->
<xs:element name='cdm-headword' type="d:cdmType"/>

<!-- cdm-headword-variant is a headord variant of the entry -->
<!-- can be multiple in the entry -->
<xs:element name='cdm-headword-variant' type="d:cdmType"/>

<!-- cdm-reading is the reading of the headword. -->
<!-- This element is used to indicate a transcription of a writing system into
 another writing system.
Sometimes, the IPA can be too complex to read for a non specialist. Therefore, we
can also use a more simple phonetic transcription.
For example, in Japanese, romaji is a roman transcription of Japanese words,
in Chinese, there is pinyin, etc.-->
<!-- can be multiple in the entry -->
<xs:element name='cdm-reading' type="d:cdmType"/>

<!-- cdm-writing is the writing of the headword. 
It is used for the moment only for Japanese to write the Kanji in kana for yomigana -->
<!-- can be multiple in the entry -->
<xs:element name='cdm-writing' type="d:cdmType"/>

<!-- cdm-pronunciation is the pronunciation of the headword. 
It should be written only in International Phonetic Alphabet.
Otherwise pelase use the reading element. -->
<!-- can be multiple in the entry -->
<xs:element name='cdm-pronunciation' type="d:cdmType"/>

<!-- cdm-pos is a part-of-speech of the headword -->
<!-- can be multiple in the entry -->
<xs:element name='cdm-pos' type="d:cdmType"/>

<!-- cdm-definition is the definition of the entry. 
It is mainly used in Papillon server when a list of entries is displayed in a table in order to choose between similar entries. The definition is displayed as raw text, unformatted.
For bilingual dictionaries without definition, cdm-definition can indicate translations instead.
-->
<!-- is unique in the entry -->
<xs:element name='cdm-definition' type="d:cdmType"/>

<!-- cdm-sense-id is the id of the senses of the entry. 
It is mainly used in Motamot project when links are established between senses and not entries -->
<xs:element name='cdm-sense-id' type="d:cdmType"/>

<!-- cdm-sense-level is the quality level of the senses of the entry. 
It is mainly used in Motamot project when links are established between senses and not entries -->
<xs:element name='cdm-sense-level' type="d:cdmType"/>

<!-- cdm-translation is a translation of the headword in another language -->
<!-- can be multiple in the entry -->
<xs:element name='cdm-translation' type="d:cdmType"/>

<!-- cdm-translation-ref is a reference to an entrey in another volume, 
translation of the headword in another language -->
<!-- can be multiple in the entry -->
<xs:element name='cdm-translation-ref' type="d:cdmType"/>

<!-- cdm-example is a usage example of the headword -->
<!-- can be multiple in the entry -->
<xs:element name='cdm-example' type="d:cdmType"/>

<!-- cdm-idiom is a full idiom with the headword -->
<!-- can be multiple in the entry -->
<xs:element name='cdm-idiom' type="d:cdmType"/>

<!-- corpus element -->
<!-- Special element to indicate if all the text of the entry can be searched
like in a corpus. -->
<xs:element name='cdm-corpus' type='d:cdmType'/>

<!-- cdm-key[1-5] element -->
<!-- Special element to indicate if other elements or attributes of
the dictionary have to be used as a database key. -->
<!-- can be multiple in the entry -->
<xs:element name='cdm-key1' type='d:cdmType'/>
<xs:element name='cdm-key2' type='d:cdmType'/>
<xs:element name='cdm-key3' type='d:cdmType'/>
<xs:element name='cdm-key4' type='d:cdmType'/>
<xs:element name='cdm-key5' type='d:cdmType'/>

<!-- CDM elements for history of modifications -->
<xs:element name='cdm-history' type='d:cdmType'/>

<xs:element name='cdm-modification' type='d:cdmType'/>

<xs:element name='cdm-modification-author' type='d:cdmType'/>

<xs:element name='cdm-modification-date' type='d:cdmType'/>

<xs:element name='cdm-modification-comment' type='d:cdmType'/>



<!-- type cdmType -->
<!-- DML type for cdm elements -->
<!-- The attribute xpath indicates an xpath pointer to the information
corresponding to the CDM element in the dictionary. -->
<!-- The attribute delay indicate the response delay when querying
this CDM element.-->
<!-- The attribute lang indicate the languages of the translations.-->
<xs:complexType name='cdmType'>
<xs:attribute name="xpath" type="xs:string" use="optional" />
<xs:attribute ref="d:delay" />
<xs:attribute ref="d:lang" />
</xs:complexType>

<!-- element administrators -->
<!-- Lists all the administrators of a dictionary. -->
<xs:element name='administrators' >
 <xs:complexType>
  <xs:sequence>
   <xs:element ref="d:user-ref" minOccurs='0' maxOccurs='unbounded'/>
  </xs:sequence>
 </xs:complexType>
</xs:element>

<!-- element volume-ref -->
<!-- references a volume file ie list of entries with an xlink. -->
<xs:element name='volume-ref' type="d:hrefAttributeType" />

<!-- element api-ref -->
<!-- references a remote volume api file with an xlink. -->
<xs:element name='api-ref' type="d:hrefAttributeType" />

<!-- element xmlschema-ref -->
<!-- references an xml schema describing the microstructure of the volume.
Is mainly used for the building of the editing interface.
  -->
<xs:element name='xmlschema-ref' type="d:hrefAttributeType" />

<!-- element template-entry-ref -->
<!-- references an template xml entry of the volume.
Is mainly used for the building of the editing interface.
  -->
<xs:element name='template-entry-ref' type="d:hrefAttributeType" />

<!-- element template-interface-ref -->
<!-- references an xmu edition file.
Is mainly used for the building of the editing interface.
  -->
<xs:element name='template-interface-ref' type="d:hrefAttributeType" />



<!--================ DML definitions for CDM elements ================-->

<!-- headword element -->
<!-- This is the headword of the articles of the monolingual
dictionaries. It is the name of the lexies and vocables. -->
<xs:element name='headword' type="d:headwordType" />

<xs:complexType name="headwordType" mixed='true'>
<!-- hn attribute -->
<!-- Homograph number of the headword. -->
<xs:attribute name='hn' type='d:homographNumberType' use='optional'/>
</xs:complexType>

<xs:simpleType name="homographNumberType">
 <xs:restriction base="xs:string"/>
</xs:simpleType>

<!-- pos element -->
<!-- Part-of-speech of the headword 
The type has to be redefined  in the schemas for 
the volumes. -->
<xs:element name='pos' type='d:posType' />

<xs:simpleType name='posType'>
 <xs:restriction base="xs:string"/>
</xs:simpleType>


<!-- pronunciation element -->
<!-- pronunciation of the headword.
It has to be encoded in International Phonetic Alphabet (IPA) -->
<xs:element name='pronunciation'>
 <xs:complexType mixed='true'>
  <xs:attribute name='encoding' type='d:pronunciationEncodingType' use='optional'/>
 </xs:complexType>
</xs:element>

<!-- This type has to be redefined in dictionary specific schemata. -->
<xs:simpleType name="pronunciationEncodingType">
 <xs:restriction base="xs:string">
   <xs:enumeration value="GETA" />
   <xs:enumeration value="romaji" />
 </xs:restriction>
</xs:simpleType>

<!-- translation element -->
<!-- translation of the headword. -->
<xs:element name='translation'>
<xs:complexType mixed="true">
<xs:attribute ref='d:lang'/>
</xs:complexType>
</xs:element>

<!-- missing example, idiom elements -->
<!--  -->

<!--================ DML definitions for a volume file ================-->

<!-- volume element  -->
<!-- This element describes a volume.
It is a list of entries sorted following
the nomenclature of the dictionary -->

<xs:element name='volume' type="d:volumeType"/>

<xs:complexType name="volumeType">
<!-- entry group  -->
<!-- Its content is a dictionary entry.
It has to be redefined in other schemas 
for specific volumes -->
<!-- I don't know yet how to redefine a group even if it is
written in the primer that it is possible.
There may be a bug in XSV (redefinition is not implemented)
Now, the type volumeType have to be extended in
dictionary specific schemata.
It is a temporary solution. 
-->
 <!--sequence>
  <group ref='d:entry' minOccurs='0' maxOccurs='unbounded'/>
 </xs:sequence-->
 <xs:sequence/>
<xs:attribute ref='d:history' use='optional'/>
<xs:attribute ref='d:history-ref' use='optional'/>
<xs:attribute name='name' type="xs:string" use='optional'/>
<xs:attribute name='source-language' type='d:lang' use='optional'/>
<xs:attribute name='target-languages' type='d:lang' use='optional'/>
</xs:complexType>

<!--================ DML definitions for APIs ====-->

<!--== API element ==-->
<!-- This element encodes the APIs used by clients and suppliers
of the database to exchange data with it. 
API = Application Programming Interface -->

<xs:element name='api'>
<xs:complexType>
 <xs:sequence>
  <!-- provides general information on the API -->
  <xs:element name='info' type="xs:string"/>
  <!-- indicates the URLs used for connection -->
  <xs:element ref='d:url'/>
  <!-- indicates the protocols used for connection -->
  <xs:element ref='d:protocol'/>
  <!-- indicates the connection delays -->
  <xs:element ref='d:delay'/>
  <!-- indicates the input and output encodings -->
  <xs:element ref='d:encodings'/>
  <!-- indicates the input and output formats -->
  <xs:element ref='d:formats'/>
  <!-- format of the arguments -->
  <xs:element name='arguments' type='d:argumentsType' />
  <!-- format of the result -->
  <xs:element name='result' type='d:resultType' />
 </xs:sequence>
 <xs:attribute name='creation-date' type='d:dateType' use='optional'/>
 <xs:attribute name='name' type="xs:string" use='optional'/>
 <xs:attribute name='type'>
  <xs:simpleType>
   <xs:restriction base="xs:string">
    <xs:enumeration value="supplier" />
    <xs:enumeration value="client" />
   </xs:restriction>
  </xs:simpleType>
 </xs:attribute>
 <!-- indicates the input and output formats -->
 <xs:attribute name='category'>
  <xs:simpleType>
   <xs:restriction base="xs:string">
    <xs:enumeration value="preprocessing" />
    <xs:enumeration value="meta-info" />
    <xs:enumeration value="consultation" />
    <xs:enumeration value="modification" />
   </xs:restriction>
  </xs:simpleType>
 </xs:attribute>
</xs:complexType>
</xs:element>

<!-- url element -->
<!-- indicates the URLs used for connection -->
<xs:element name='url' type="d:hrefAttributeType" />

<!-- protocol element -->
<!-- indicates the protocol used for connection -->
<xs:element name='protocol'>
<xs:complexType>
<xs:attribute name='type' type="xs:string" />
<xs:attribute name='login' type="xs:string" />
<xs:attribute name='password' type="xs:string" />
</xs:complexType>
</xs:element>

<!-- delay element -->
<!-- indicates the connection delays for the API -->
<xs:element name='delay'>
<xs:complexType>
<xs:attribute name='min' type='d:durationType' />
<xs:attribute name='average' type='d:durationType' />
<xs:attribute name='max' type='d:durationType' />
</xs:complexType>
</xs:element>

<!-- encodings element -->
<!-- indicates the input and output encodings.
The type used is characterEncodingType defined before. -->
<xs:element name='encodings'>
<xs:complexType>
<xs:attribute name='input' type='d:characterEncodingType' />
<xs:attribute name='output' type='d:characterEncodingType' />
</xs:complexType>
</xs:element>

<!-- formats element -->
<!-- indicates the input and output formats.
The type used is fileFormatType defined before. -->
<xs:element name='formats'>
<xs:complexType>
<xs:attribute name='input' type='d:fileFormatType' />
<xs:attribute name='output' type='d:fileFormatType' />
</xs:complexType>
</xs:element>

<!-- argumentsType type -->
<!-- indicates the format of the arguments.
The XML schema syntax is used.
The type has to be redefined in another schema. -->
<xs:simpleType name='argumentsType'>
<xs:restriction base="xs:string" />
</xs:simpleType>

<!-- resultType type -->
<!-- indicates the format of the result.
The XML schema syntax is used.
The type has to be redefined in another schema. -->
<xs:simpleType name='resultType'>
<xs:restriction base="xs:string" />
</xs:simpleType>

<!--================ DML definitions for the history file ================-->

<!-- the history has been simplified -->
<!-- element history -->
<xs:element name='history'>
  <xs:complexType>
    <xs:sequence>
      <xs:element ref='d:modification' minOccurs='1' maxOccurs='unbounded' />
    </xs:sequence>
  </xs:complexType>
</xs:element>

<!-- element modification -->
<xs:element name='modification'>
  <xs:complexType>
    <xs:sequence>
      <xs:element ref='d:author' minOccurs='1' maxOccurs='1' />
      <xs:element ref='d:date' minOccurs='1' maxOccurs='1' />
      <xs:element ref='d:comment' minOccurs='1' maxOccurs='1' />
    </xs:sequence>
  </xs:complexType>
</xs:element>

<!-- element author -->
<xs:element name='author' type="xs:string"/>

<!-- element date -->
<xs:element name='date' type="xs:string"/>

<!-- element comment already defined elsewhere -->

<!-- element history -->
<!-- The history file contains the logs of the modifications performed
on every element of the database. A log is referenced
with the DML history attribute -->
<!-- element name='history'>
<xs:complexType>
<xs:sequence>
<xs:element ref='d:administration' />
</xs:sequence>
<xs:attribute name='creation-date' type='d:dateType' use='optional'/>
<xs:attribute name='name' type="xs:string" use='optional'/>
</xs:complexType>
</xs:element -->

<!-- element administration -->
<!-- The element administration contains the administration
information and the history of the changes performed on the
element with the history attribute which references this element
through this id attribute -->
<!-- element name='administration'>
<xs:complexType>
<xs:sequence>
<xs:element ref='d:creation' minOccurs='1' maxOccurs='1'/>
<xs:element ref='d:modification' minOccurs='0' maxOccurs='unbounded'/>
<xs:element ref='d:revision' minOccurs='0' maxOccurs='unbounded'/>
</xs:sequence>
<xs:attribute ref='d:id' />
</xs:complexType>
</xs:element -->

<!-- type annotation -->
<!-- to describe all the changes on one element of the database.
It indicates the name of the person which has changed the element
and the date of the change.
It can contain some text for various comments -->
<!-- complexType name='annotationType' mixed='true'>
<xs:attribute name='indexer' type="xs:string" />
<xs:attribute name='date' type='d:dateType' />
</xs:complexType -->

<!-- element creation -->
<!-- describes the creation of an element -->
<!-- element name='creation' type='d:annotationType' / -->

<!-- element modification -->
<!-- describes the modification of an element -->
<!-- element name='modification' type='d:annotationType' /-->

<!-- element revision -->
<!-- describes the revision of an element -->
<!--element name='revision' type='d:annotationType' /-->

<!--================ DML definitions for common elements and structures ====-->

<!--== Tree structure ==-->
<!-- DML element to represent a tree -->
<xs:element name='nd'>
<xs:complexType mixed='true'>
<xs:sequence>
<xs:element ref="d:nd" />
</xs:sequence>
</xs:complexType>
</xs:element>

<!--== Graph structure ==-->
<!-- DML element to represent a graph -->
<xs:element name='graph'>
<xs:complexType>
<xs:sequence>
<xs:element ref="d:nodes" minOccurs="1" maxOccurs="1" />
<xs:element ref="d:arcs" minOccurs="1" maxOccurs="1" />
</xs:sequence>
<xs:attribute ref="xlink:type" fixed="extended" />
</xs:complexType>
</xs:element>

<!-- DML element to represent a list of nodes -->
<xs:element name='nodes'>
<xs:complexType>
<xs:sequence>
<xs:element ref="d:node" minOccurs="1" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>

<!-- DML element to represent a node -->
<xs:element name='node'>
<xs:complexType mixed='true'>
<xs:attribute ref="xlink:type" fixed="locator" />
<xs:attribute ref="xlink:label" />
<xs:attribute ref="xlink:title" />
<!-- There should be a restriction:
we note only the starting and ending nodes of an automaton
<xs:restriction base='xlink:title'>
to note the starting node of an automaton
<xs:enumeration value="starting-node" />
to note an ending node of an automaton
<xs:enumeration value="ending-node" />
</xs:restriction>
</xs:simpleType -->

</xs:complexType>
</xs:element>

<!-- DML element to represent a list of arcs -->
<xs:element name='arcs'>
<xs:complexType>
<xs:sequence>
<xs:element ref="d:arc" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>

<!-- DML element to represent an arc -->
<xs:element name='arc' type="d:arcType" />

<!-- DML type to represent an arc -->
<xs:complexType name='arcType' mixed='true'>
<xs:attribute ref="xlink:type" fixed="arc" />
<xs:attribute ref="xlink:from" />
<xs:attribute ref="xlink:to" />
<!-- an oriented arc has the attribute oriented='true' -->
<xs:attribute name="oriented" type="xs:boolean" />
</xs:complexType>


<!--== Automaton structure ==-->
<!-- DML element to represent a graph -->
<xs:element name='automaton'>
<xs:complexType>
<xs:sequence>
<xs:element ref="d:nodes" minOccurs="1" maxOccurs="1" />
<xs:element ref="d:arcs" minOccurs="1" maxOccurs="1" />
</xs:sequence>
<xs:attribute ref="xlink:type" fixed="locator" />
</xs:complexType>
</xs:element>

<!--== Function structure ==-->
<!-- DML element to represent a function -->
<xs:element name='function' type="d:functionType" />

<!-- functionType type -->
<xs:complexType name="functionType">
   <xs:sequence>
     <xs:element ref="d:name" minOccurs="1" maxOccurs="1" />
     <xs:element ref="d:valgroup" minOccurs="1" maxOccurs="unbounded" />
   </xs:sequence>
</xs:complexType>

<!-- DML element for group of values of a function -->
<!--It has to be redefined in schemas specific to the dictionaries -->
<xs:element name='valgroup' type='d:valgroupType' />

 <xs:complexType name='valgroupType'>
  <xs:sequence/>
 </xs:complexType>

<!-- nameType type -->
<!-- DML element to represent the name of a function -->
<xs:element name='name' type="d:functionNameType" />


<!-- Name of a function -->
<xs:simpleType name='functionNameType'>
<xs:restriction base="xs:string"/>
</xs:simpleType>


<!-- DML element for arguments of a function -->
<!--It has to be redefined in schemas specific to the dictionaries -->
<xs:element name='arguments'>
 <xs:complexType>
  <xs:sequence/>
 </xs:complexType>
</xs:element>

<!-- comment element -->
<!-- comment in a function -->
<!-- There is work to do on comments: do we allow them everywhere ?
Are there various categories of comments? -->
<xs:element name='comment' type="xs:string" />

</xs:schema>

