Skip to content

Commit 672fcf3

Browse files
authored
Merge pull request #5113 from evolvedbinary/6.x.x/feature/expath-schema
[6.x.x] Add Schema for EXPath Packaging System
2 parents fc5b9d4 + 11e6795 commit 672fcf3

File tree

12 files changed

+607
-117
lines changed

12 files changed

+607
-117
lines changed

schema/collection.xconf.xsd

Lines changed: 110 additions & 106 deletions
Large diffs are not rendered by default.

schema/conf.xsd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
TODO: Remove optional attributes in favour of well defined/named parent elements
77
-->
88

9-
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0">
9+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
10+
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.1"
11+
version="1.0.0">
1012

1113
<!-- Shared types -->
1214
<xs:simpleType name="yes_no">

schema/controller-config.xsd

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://exist.sourceforge.net/NS/exist" xmlns:exist="http://exist.sourceforge.net/NS/exist">
2+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3+
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.1"
4+
xmlns:exist="http://exist.sourceforge.net/NS/exist"
5+
elementFormDefault="qualified"
6+
targetNamespace="http://exist.sourceforge.net/NS/exist"
7+
version="1.0.0">
38
<xs:element name="configuration">
49
<xs:complexType>
510
<xs:choice maxOccurs="unbounded">

schema/descriptor.xsd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
Schema for eXist WebApp Descriptor Configuration file descriptor.xml
55
-->
66

7-
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0">
7+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
8+
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.1"
9+
version="1.0.0">
810
<xs:element name="xquery-app">
911
<xs:complexType>
1012
<xs:sequence>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3+
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.1"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns:cxan="http://cxan.org/ns/package"
6+
xmlns:dcterms="http://purl.org/dc/terms/"
7+
elementFormDefault="qualified"
8+
targetNamespace="http://cxan.org/ns/package">
9+
10+
<xs:annotation>
11+
<xs:documentation>A schema for the EXPath Packaging CXAN concept.</xs:documentation>
12+
<xs:appinfo>
13+
<dcterms:title>Schema for the EXPath Packaging CXAN concept.</dcterms:title>
14+
<dcterms:created xsi:type="dcterms:W3CDTF">2013-11-03T11:36:19.343+01:00</dcterms:created>
15+
<dcterms:creator>Adam Retter</dcterms:creator>
16+
</xs:appinfo>
17+
</xs:annotation>
18+
19+
<xs:element name="package">
20+
<xs:complexType>
21+
<xs:sequence>
22+
<xs:element ref="cxan:author"/>
23+
<xs:element ref="cxan:category" maxOccurs="unbounded"/>
24+
<xs:element ref="cxan:tag" maxOccurs="unbounded"/>
25+
</xs:sequence>
26+
<xs:attribute name="id" type="xs:NCName"/>
27+
<xs:attribute name="name" type="xs:anyURI"/>
28+
<xs:attribute name="version" type="xs:NCName"/>
29+
</xs:complexType>
30+
</xs:element>
31+
32+
<xs:element name="author">
33+
<xs:annotation>
34+
<xs:documentation>A textual description of the author.</xs:documentation>
35+
</xs:annotation>
36+
<xs:complexType>
37+
<xs:simpleContent>
38+
<xs:extension base="xs:string">
39+
<xs:attribute name="id" use="optional" type="xs:NCName">
40+
<xs:annotation>
41+
<xs:documentation>A simple identifier for the author.</xs:documentation>
42+
</xs:annotation>
43+
</xs:attribute>
44+
</xs:extension>
45+
</xs:simpleContent>
46+
</xs:complexType>
47+
</xs:element>
48+
49+
<xs:element name="category" type="xs:NCName"/>
50+
51+
<xs:element name="tag" type="xs:NCName"/>
52+
53+
</xs:schema>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3+
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.1"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns:eepkg="http://exist-db.org/ns/expath-pkg"
6+
xmlns:dcterms="http://purl.org/dc/terms/"
7+
elementFormDefault="qualified"
8+
targetNamespace="http://exist-db.org/ns/expath-pkg">
9+
10+
<xs:annotation>
11+
<xs:documentation>A schema for eXist-db extensions to EXPath Packaging.</xs:documentation>
12+
<xs:appinfo>
13+
<dcterms:title>eXist-db extensions to EXPath Packaging</dcterms:title>
14+
<dcterms:created xsi:type="dcterms:W3CDTF">2013-11-03T11:36:19.343+01:00</dcterms:created>
15+
<dcterms:creator>Adam Retter</dcterms:creator>
16+
</xs:appinfo>
17+
</xs:annotation>
18+
19+
<xs:element name="package">
20+
<xs:complexType>
21+
<xs:sequence>
22+
<xs:element ref="eepkg:java" maxOccurs="unbounded"/>
23+
<xs:element ref="eepkg:jar" maxOccurs="unbounded"/>
24+
</xs:sequence>
25+
</xs:complexType>
26+
</xs:element>
27+
28+
<xs:element name="java">
29+
<xs:complexType>
30+
<xs:sequence>
31+
<xs:element ref="eepkg:namespace"/>
32+
<xs:element ref="eepkg:class"/>
33+
</xs:sequence>
34+
</xs:complexType>
35+
</xs:element>
36+
37+
<xs:element name="namespace" type="xs:anyURI"/>
38+
<xs:element name="class" type="xs:string"/>
39+
40+
<xs:element name="jar" type="xs:string"/>
41+
42+
</xs:schema>
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3+
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.1"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns:repo="http://exist-db.org/xquery/repo"
6+
xmlns:dcterms="http://purl.org/dc/terms/"
7+
elementFormDefault="qualified"
8+
targetNamespace="http://exist-db.org/xquery/repo">
9+
10+
<xs:annotation>
11+
<xs:documentation>A schema for eXist-db Package Repository extensions to EXPath Packaging.</xs:documentation>
12+
<xs:appinfo>
13+
<dcterms:title>eXist-db Package Repository extensions to EXPath Packaging</dcterms:title>
14+
<dcterms:created xsi:type="dcterms:W3CDTF">2013-11-03T11:36:19.343+01:00</dcterms:created>
15+
<dcterms:creator>Adam Retter</dcterms:creator>
16+
</xs:appinfo>
17+
</xs:annotation>
18+
19+
<xs:element name="meta">
20+
<xs:complexType>
21+
<xs:sequence>
22+
<xs:element ref="repo:description"/>
23+
<xs:element ref="repo:author"/>
24+
<xs:element ref="repo:website"/>
25+
<xs:element ref="repo:status"/>
26+
<xs:element ref="repo:license"/>
27+
<xs:element ref="repo:copyright"/>
28+
<xs:element ref="repo:type"/>
29+
<xs:element ref="repo:target" minOccurs="0"/>
30+
<xs:element ref="repo:prepare" minOccurs="0"/>
31+
<xs:element ref="repo:finish" minOccurs="0"/>
32+
<xs:element ref="repo:permissions" minOccurs="0" maxOccurs="unbounded"/>
33+
<xs:element ref="repo:changelog" minOccurs="0"/>
34+
</xs:sequence>
35+
</xs:complexType>
36+
</xs:element>
37+
38+
<xs:element name="description" type="xs:string">
39+
<xs:annotation>
40+
<xs:documentation>A textual description of the package</xs:documentation>
41+
</xs:annotation>
42+
</xs:element>
43+
44+
<xs:element name="author">
45+
<xs:annotation>
46+
<xs:documentation>A textual description of the author.</xs:documentation>
47+
</xs:annotation>
48+
<xs:complexType>
49+
<xs:simpleContent>
50+
<xs:extension base="xs:string">
51+
<xs:attribute name="id" use="optional" type="xs:NCName">
52+
<xs:annotation>
53+
<xs:documentation>A simple identifier for the author.</xs:documentation>
54+
</xs:annotation>
55+
</xs:attribute>
56+
</xs:extension>
57+
</xs:simpleContent>
58+
</xs:complexType>
59+
</xs:element>
60+
61+
<xs:element name="website" type="xs:anyURI">
62+
<xs:annotation>
63+
<xs:documentation>A link to an informational website about the package</xs:documentation>
64+
</xs:annotation>
65+
</xs:element>
66+
67+
<xs:element name="status" type="xs:NCName">
68+
<xs:annotation>
69+
<xs:documentation>The status of the package</xs:documentation>
70+
</xs:annotation>
71+
</xs:element>
72+
73+
<xs:element name="license" type="xs:string">
74+
<xs:annotation>
75+
<xs:documentation>Name of the license that the package is released under</xs:documentation>
76+
</xs:annotation>
77+
</xs:element>
78+
79+
<xs:element name="copyright" type="xs:boolean">
80+
<xs:annotation>
81+
<xs:documentation>Indicates whether there is a copyright on the package</xs:documentation>
82+
</xs:annotation>
83+
</xs:element>
84+
85+
<xs:element name="type" type="repo:typeType">
86+
<xs:annotation>
87+
<xs:documentation>Indicates whether there is a copyright on the package</xs:documentation>
88+
</xs:annotation>
89+
</xs:element>
90+
91+
<xs:simpleType name="typeType">
92+
<xs:restriction base="xs:NCName">
93+
<xs:enumeration value="application"/>
94+
<xs:enumeration value="library"/>
95+
</xs:restriction>
96+
</xs:simpleType>
97+
98+
<xs:element name="target" type="xs:NCName">
99+
<xs:annotation>
100+
<xs:documentation>A name indicating the final collection name of where the package is installed</xs:documentation>
101+
</xs:annotation>
102+
</xs:element>
103+
104+
<xs:element name="prepare" type="xs:anyURI">
105+
<xs:annotation>
106+
<xs:documentation>The path to an XQuery script that may be executed before the package is installed</xs:documentation>
107+
</xs:annotation>
108+
</xs:element>
109+
110+
<xs:element name="finish" type="xs:anyURI">
111+
<xs:annotation>
112+
<xs:documentation>The path to an XQuery script that may be executed after the package is installed</xs:documentation>
113+
</xs:annotation>
114+
</xs:element>
115+
116+
<xs:element name="permissions" type="repo:permissionsType">
117+
<xs:annotation>
118+
<xs:documentation>Describes permissions that should be applied to a resource from the package when it is installed into the database.</xs:documentation>
119+
</xs:annotation>
120+
</xs:element>
121+
122+
<xs:complexType name="permissionsType">
123+
<xs:attribute name="user" type="xs:NCName"/>
124+
<xs:attribute name="password" type="xs:string"/>
125+
<xs:attribute name="group" type="xs:NCName"/>
126+
<xs:attribute name="mode" type="xs:string"/>
127+
</xs:complexType>
128+
129+
<xs:element name="changelog">
130+
<xs:complexType>
131+
<xs:sequence>
132+
<xs:element ref="repo:change" maxOccurs="unbounded"/>
133+
</xs:sequence>
134+
</xs:complexType>
135+
</xs:element>
136+
137+
<xs:element name="change">
138+
<xs:complexType>
139+
<xs:sequence>
140+
<xs:any namespace="http://www.w3.org/1999/xhtml"/>
141+
</xs:sequence>
142+
<xs:attribute name="version" type="xs:NCName" use="required"/>
143+
</xs:complexType>
144+
</xs:element>
145+
146+
</xs:schema>

0 commit comments

Comments
 (0)