forked from bitfehler/xs3p
-
Notifications
You must be signed in to change notification settings - Fork 0
/
address_annotated.xsd
99 lines (81 loc) · 2.99 KB
/
address_annotated.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<schema targetNamespace="http://www.example.com/IPO"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:ipo="http://www.example.com/IPO">
<annotation>
<documentation xml:lang="en">
**Addresses for International Purchase order schema
Copyright 2000 Example.com. All rights reserved.**
This version of the schema has enhanced documentation to
demonstrate the new capabilities of the xs3p doc tool:
* Display of `<annotation>` info with _markdown_ support
* UTF-8 output
The _markdown_ syntax is documented on the [Markdown homepage](https://daringfireball.net/projects/markdown/ "Markdown homepage").
</documentation>
</annotation>
<complexType name="Address">
<annotation>
<documentation>
The generic base type for all country-specific addresses.
This type could be used for addresses that don't have distinct type,
but then it would have poor validation. Just to demonstrate UTF-8 and
a markdown `<pre>` block, here is an example german address:
<name>Conrad Hoffmann</name>
<street>Beispielstraße 23</street>
<city>D-12345 Berlin</city>
**Note:** Whenever possible, a distinct subtype should be specified.
Also, note how you can click the _i_ next to the `name` element in the
_XML Instance Representation_ below to see the documentation for this
element.
</documentation>
</annotation>
<sequence>
<element name="name" type="string">
<annotation>
<documentation>
This should be the full name of the addressee, including, if appropriate:
* Academic titles
* Titles of nobility
* maybe more...
</documentation>
</annotation>
</element>
<element name="street" type="string"/>
<element name="city" type="string"/>
</sequence>
</complexType>
<complexType name="USAddress">
<annotation>
<documentation>
Address subtype for United States addresses.
The state comes from a list defined [below](#type_USState "Definition of type USState").
</documentation>
</annotation>
<complexContent>
<extension base="ipo:Address">
<sequence>
<element name="state" type="ipo:USState"/>
<element name="zip" type="positiveInteger"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- other Address derivations for more countries -->
<simpleType name="USState">
<annotation>
<documentation>
The list of states of the USA.
Standard markdown does not support tables, which would have been
a nice way to present those. Testing integration with other
markdown processors, like [snuownd](https://github.com/gamefreak/snuownd "snuownd Github page")
might be worth a try in the future.
</documentation>
</annotation>
<restriction base="string">
<enumeration value="AK"/>
<enumeration value="AL"/>
<enumeration value="AR"/>
<!-- and so on ... -->
</restriction>
</simpleType>
<!-- simple type definition for UKPostcode -->
</schema>