aboutsummaryrefslogtreecommitdiffstats
path: root/data/epiphany-extension.xsd
blob: aca452b2b415e728716c1c9c3a39e5a7cd95c1da (plain) (blame)
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:annotation>
        <xsd:documentation xml:lang="en">
            Epiphany Web Browser extension metadata schema.
            Copyright (c) 2004 Adam Hooper
        </xsd:documentation>
    </xsd:annotation>

    <xsd:element name="extension-list" type="ExtensionListType"/>

    <xsd:complexType name="ExtensionListType">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                List of extensions. Each extension has its set
                of metadata.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="extension"
                     type="ExtensionType"
                     minOccurs="1"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="ExtensionType">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                Metadata about an extension.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="filename"
                     type="ExtensionFilenameType"
                     minOccurs="1" maxOccurs="1"/>
            <xsd:element name="name"
                     type="xsd:string"
                     minOccurs="1" maxOccurs="1"/>
            <xsd:element name="description"
                     type="xsd:string"
                     minOccurs="1" maxOccurs="1"/>
            <xsd:element name="version"
                     type="ExtensionVersionType"
                     minOccurs="1" maxOccurs="1"/>
<!--
            <xsd:element name="min-epiphany-version"
                     type="EpiphanyVersionType"
                     maxOccurs="1"/>
            <xsd:element name="max-epiphany-version"
                     type="EpiphanyVersionType"
                     maxOccurs="1"/>
            <xsd:element name="min-mozilla-version"
                     type="MozillaVersionType"
                     maxOccurs="1"/>
            <xsd:element name="max-mozilla-version"
                     type="MozillaVersionType"
                     maxOccurs="1"/>
-->
            <xsd:element name="author" type="AuthorType"/>
            <xsd:element name="url" type="xsd:anyURI"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:simpleType name="ExtensionFilenameType">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                The &quot;core&quot; of the extension's
                filename. For example, use &quot;gestures&quot;
                for an extension with a shared object name of
                &quot;libgesturesextension.so&quot;.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:pattern value="[a-zA-Z0-9_-]+"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="ExtensionVersionType">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                The version of the extension's API. For most
                extensions, this number will remain at
                &quot;1&quot; indefinitely. The only reason to
                increase it would be if any GObject classess
                within the extension change parents.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:positiveInteger"/>
    </xsd:simpleType>

<!--
    <xsd:complexType name="EpiphanyVersionType">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                An Epiphany version (major.minor.micro).
                Extensions may function properly across a range
                of Epiphany versions, as long as the relevant
                parts of the Epiphany API have not changed.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="major"
                     type="xsd:positiveInteger"
                     minOccurs="1" maxOccurs="1"/>
            <xsd:element name="minor"
                     type="xsd:positiveInteger"
                     minOccurs="1" maxOccurs="1"/>
            <xsd:element name="micro"
                     type="xsd:positiveInteger"
                     minOccurs="1" maxOccurs="1"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="MozillaVersionType">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                A Mozilla version (major, minor, type, micro).
                Extensions my function properly across a range
                of Mozilla versions, as long as the relevant
                parts of the Mozilla API have not changed.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="major"
                     type="xsd:positiveInteger"
                     minOccurs="1" maxOccurs="1"/>
            <xsd:element name="minor"
                     type="xsd:positiveInteger"
                     minOccurs="1" maxOccurs="1"/>
            <xsd:element name="type"
                     type="MozillaVersionTypeType"
                     minOccurs="1" maxOccurs="1"/>
            <xsd:element name="micro"
                     type="xsd:positiveInteger"
                     minOccurs="1" maxOccurs="1"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:simpleType name="MozillaVersionTypeType">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                The &quot;type&quot; of a Mozilla version. 1
                means Alpha, 2 means Beta, 3 means RC and 4
                means release.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:positiveInteger">
            <xsd:minInclusive value="1"/>
            <xsd:maxInclusive value="4"/>
        </xsd:restriction>
    </xsd:simpleType>
-->

    <xsd:complexType name="AuthorType">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                An extension author -- a name and (optionally)
                an email address.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="name"
                     type="xsd:normalizedString"
                     minOccurs="1" maxOccurs="1"/>
            <xsd:element name="email"
                     type="EmailType"
                     maxOccurs="1"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:simpleType name="EmailType">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                An email address
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:pattern value="[\.a-zA-Z0-9_-]+@([a-zA-Z0-9_-])+(([a-zA-Z0-9_-])*\.([a-zA-Z0-9_-])+)+"/>
        </xsd:restriction>
    </xsd:simpleType>
</xsd:schema>