-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathCommonTypes.xsd
45 lines (40 loc) · 1.59 KB
/
CommonTypes.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:common="http://allastudier.se/CommonTypes" targetNamespace="http://allastudier.se/CommonTypes">
<xs:simpleType name="email">
<xs:restriction base="xs:string">
<xs:pattern value="[^@]+@[^\.]+\..+"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="locationalAddress">
<xs:all>
<xs:element name="geoData" type="common:coordinate" minOccurs="0"/>
<xs:element name="streetAddress" type="xs:string" minOccurs="0"/>
<xs:element name="zipCode" type="xs:string" minOccurs="0"/>
<xs:element name="city" type="xs:string" minOccurs="1"/>
<xs:element name="municipalityCode" type="common:municipalityCode" minOccurs="0"/>
<xs:element name="country" type="xs:string" minOccurs="0"/>
</xs:all>
</xs:complexType>
<xs:simpleType name="percentage">
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="100"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="positiveDouble">
<xs:restriction base="xs:double">
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="municipalityCode">
<xs:restriction base="xs:string">
<xs:pattern value="[\d]{4}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="coordinate">
<xs:restriction base="xs:string">
<!-- Example N55.6124E12.9915 -->
<xs:pattern value="[N][\d]*[\.]?[\d]*E[\d]*[\.]?[\d]*"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>