Project

Profile

Help

How to connect?
Download (1.69 KB) Statistics
| Branch: | Tag: | Revision:

he / src / use-cases / strong / address.xsd @ a31dd97a

1
<schema targetNamespace="http://www.example.com/IPO" 
2
        xmlns="http://www.w3.org/2001/XMLSchema" 
3
        xmlns:ipo="http://www.example.com/IPO">
4

    
5
 <annotation>
6
   <documentation xml:lang="en">
7
     Addresses for International Purchase order schema
8
     Copyright 2000 Example.com. All rights reserved.
9
   </documentation>
10
 </annotation>
11

    
12
 <complexType name="Address">
13
   <sequence>
14
     <element name="name" type="string"/>
15
     <element name="street" type="string"/>
16
     <element name="city" type="string"/>
17
   </sequence>
18
 </complexType>
19

    
20
 <complexType name="USAddress">
21
   <complexContent>
22
     <extension base="ipo:Address">
23
       <sequence>
24
         <element name="state" type="ipo:USState"/>
25
         <element name="zip" type="positiveInteger"/>
26
       </sequence>
27
     </extension>
28
   </complexContent>
29
 </complexType>
30

    
31
 <complexType name="UKAddress">
32
   <complexContent>
33
     <extension base="ipo:Address">
34
       <sequence>
35
         <element name="postcode" type="ipo:UKPostcode"/>
36
       </sequence>
37
       <attribute name="exportCode" type="positiveInteger" fixed="1"/>
38
     </extension>
39
   </complexContent>
40
 </complexType>
41

    
42
 <!-- other Address derivations for more countries -->
43

    
44
 <simpleType name="USState">
45
   <restriction base="string">
46
     <enumeration value="AK"/>
47
     <enumeration value="AL"/>
48
     <enumeration value="AR"/>
49
     <!-- and so on ... -->
50
     <enumeration value="PA"/>
51
   </restriction>
52
 </simpleType>
53

    
54
 <!-- simple type definition for UKPostcode -->
55

    
56
 <simpleType name="UKPostcode">
57
    <restriction base="string">
58
        <pattern value="[A-Z]{1,2}[0-9R][0-9A-Z]? [0-9][A-Z]{2}"/>
59
    </restriction>
60
 </simpleType>
61
</schema>  
(1-1/27)