~zorba-coders/zorba/zorba_zip_module

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
<?xml version="1.0"?>
 
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://www.expath.org/ns/archive"
  xmlns="http://www.expath.org/ns/archive"
  elementFormDefault="qualified"
  attributeFormDefault="unqualified">
 
  <xs:simpleType name="compression-type">
    <xs:restriction base="xs:string">
      <xs:enumeration value="store"/>
      <xs:enumeration value="deflate"/>
      <xs:enumeration value="bzip2"/>
      <xs:enumeration value="lzma"/>
      <xs:enumeration value="STORE"/>
      <xs:enumeration value="DEFLATE"/>
      <xs:enumeration value="BZIP2"/>
      <xs:enumeration value="LZMA"/>
    </xs:restriction>
  </xs:simpleType>
 
  <xs:simpleType name="format-type">
    <xs:restriction base="xs:string">
      <xs:enumeration value="zip"/>
      <xs:enumeration value="pax"/>
      <xs:enumeration value="pax"/>
      <xs:enumeration value="ZIP"/>
      <xs:enumeration value="TAR"/>
      <xs:enumeration value="PAX"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="entry-name-type">
    <xs:restriction base="xs:string"/>
  </xs:simpleType>

  <xs:simpleType name="entry-datetime-type">
    <xs:restriction base="xs:dateTime"/>
  </xs:simpleType>

  <xs:simpleType name="entry-size-type">
    <xs:restriction base="xs:short"/>
  </xs:simpleType>

  <xs:simpleType name="entry-encoding-type">
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  
  <!-- elements -->
  <xs:element name="archive-option-element"
    abstract="true" type="xs:string"/>
 
  <xs:element name="compression"
        type="compression-type"
        substitutionGroup="archive-option-element"/>
 
  <xs:element name="format" type="format-type"
        substitutionGroup="archive-option-element"/>
 
  <xs:element name="options">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="archive-option-element"
              minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="entry">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="entry-name-type">
          <xs:attributeGroup ref="entry-attributes"/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>
 
  <!-- entry attributes -->
  <xs:attributeGroup name="entry-attributes">
    <xs:attribute name="size" type="entry-size-type"/>
    <xs:attribute name="last-modified" type="entry-datetime-type"/>
    <xs:attribute name="encoding" type="entry-encoding-type"/>
    <xs:attribute name="compression" type="compression-type"/>
  </xs:attributeGroup>

</xs:schema>