1<?xml version="1.0" encoding="UTF-8"?> 2<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> 3 <xs:element name="vit"> 4 <xs:complexType> 5 <xs:sequence> 6 <xs:element name="version" type="formatVersion"></xs:element> 7 <xs:element name="read-only" type="xs:boolean"></xs:element> 8 <xs:element name="notes" type="xs:string" minOccurs="0" maxOccurs="1"></xs:element> 9 <xs:element name="unit" type="units"></xs:element> 10 <xs:element name="personal"> 11 <xs:complexType> 12 <xs:sequence> 13 <xs:element name="family-name" type="xs:string"></xs:element> 14 <xs:element name="given-name" type="xs:string"></xs:element> 15 <xs:element name="birth-date" type="xs:date"></xs:element> 16 <xs:element name="sex" type="sex"></xs:element> 17 <xs:element name="email" type="xs:string"></xs:element> 18 </xs:sequence> 19 </xs:complexType> 20 </xs:element> 21 <xs:element name="body-measurements"> 22 <xs:complexType> 23 <xs:sequence> 24 <xs:element name="m" minOccurs="0" maxOccurs="unbounded"> 25 <xs:complexType> 26 <xs:attribute name="name" type="shortName" use="required"></xs:attribute> 27 <xs:attribute name="value" type="xs:string" use="required"></xs:attribute> 28 <xs:attribute name="full_name" type="xs:string"></xs:attribute> 29 <xs:attribute name="description" type="xs:string"></xs:attribute> 30 </xs:complexType> 31 </xs:element> 32 </xs:sequence> 33 </xs:complexType> 34 </xs:element> 35 </xs:sequence> 36 </xs:complexType> 37 <xs:unique name="measurementName"> 38 <xs:selector xpath="body-measurements/m"/> 39 <xs:field xpath="@name"/> 40 </xs:unique> 41 </xs:element> 42 <xs:simpleType name="shortName"> 43 <xs:restriction base="xs:string"> 44 <xs:pattern value="([^0-9*/^+\-=\s()?%:;!.,`'\\"]){1,1}([^*/^+\-=\s()?%:;!.,`'\\"]){0,}"/> 45 </xs:restriction> 46 </xs:simpleType> 47 <xs:simpleType name="formatVersion"> 48 <xs:restriction base="xs:string"> 49 <xs:pattern value="[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}"/> 50 </xs:restriction> 51 </xs:simpleType> 52 <xs:simpleType name="units"> 53 <xs:restriction base="xs:string"> 54 <xs:enumeration value="mm"/> 55 <xs:enumeration value="cm"/> 56 <xs:enumeration value="inch"/> 57 </xs:restriction> 58 </xs:simpleType> 59 <xs:simpleType name="sex"> 60 <xs:restriction base="xs:string"> 61 <xs:enumeration value="unknown"/> 62 <xs:enumeration value="male"/> 63 <xs:enumeration value="female"/> 64 </xs:restriction> 65 </xs:simpleType> 66</xs:schema> 67