Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.x.x] Add Schema for EXPath Packaging System #5113

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
216 changes: 110 additions & 106 deletions schema/collection.xconf.xsd

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion schema/conf.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
TODO: Remove optional attributes in favour of well defined/named parent elements
-->

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

<!-- Shared types -->
<xs:simpleType name="yes_no">
Expand Down
7 changes: 6 additions & 1 deletion schema/controller-config.xsd
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.1"
xmlns:exist="http://exist.sourceforge.net/NS/exist"
elementFormDefault="qualified"
targetNamespace="http://exist.sourceforge.net/NS/exist"
version="1.0.0">
<xs:element name="configuration">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
Expand Down
4 changes: 3 additions & 1 deletion schema/descriptor.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
Schema for eXist WebApp Descriptor Configuration file descriptor.xml
-->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.1"
version="1.0.0">
<xs:element name="xquery-app">
<xs:complexType>
<xs:sequence>
Expand Down
53 changes: 53 additions & 0 deletions schema/expath-pkg-extensions/cxan.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cxan="http://cxan.org/ns/package"
xmlns:dcterms="http://purl.org/dc/terms/"
elementFormDefault="qualified"
targetNamespace="http://cxan.org/ns/package">

<xs:annotation>
<xs:documentation>A schema for the EXPath Packaging CXAN concept.</xs:documentation>
<xs:appinfo>
<dcterms:title>Schema for the EXPath Packaging CXAN concept.</dcterms:title>
<dcterms:created xsi:type="dcterms:W3CDTF">2013-11-03T11:36:19.343+01:00</dcterms:created>
<dcterms:creator>Adam Retter</dcterms:creator>
</xs:appinfo>
</xs:annotation>

<xs:element name="package">
<xs:complexType>
<xs:sequence>
<xs:element ref="cxan:author"/>
<xs:element ref="cxan:category" maxOccurs="unbounded"/>
<xs:element ref="cxan:tag" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="id" type="xs:NCName"/>
<xs:attribute name="name" type="xs:anyURI"/>
<xs:attribute name="version" type="xs:NCName"/>
</xs:complexType>
</xs:element>

<xs:element name="author">
<xs:annotation>
<xs:documentation>A textual description of the author.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="id" use="optional" type="xs:NCName">
<xs:annotation>
<xs:documentation>A simple identifier for the author.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>

<xs:element name="category" type="xs:NCName"/>

<xs:element name="tag" type="xs:NCName"/>

</xs:schema>
42 changes: 42 additions & 0 deletions schema/expath-pkg-extensions/exist.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:eepkg="http://exist-db.org/ns/expath-pkg"
xmlns:dcterms="http://purl.org/dc/terms/"
elementFormDefault="qualified"
targetNamespace="http://exist-db.org/ns/expath-pkg">

<xs:annotation>
<xs:documentation>A schema for eXist-db extensions to EXPath Packaging.</xs:documentation>
<xs:appinfo>
<dcterms:title>eXist-db extensions to EXPath Packaging</dcterms:title>
<dcterms:created xsi:type="dcterms:W3CDTF">2013-11-03T11:36:19.343+01:00</dcterms:created>
<dcterms:creator>Adam Retter</dcterms:creator>
</xs:appinfo>
</xs:annotation>

<xs:element name="package">
<xs:complexType>
<xs:sequence>
<xs:element ref="eepkg:java" maxOccurs="unbounded"/>
<xs:element ref="eepkg:jar" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="java">
<xs:complexType>
<xs:sequence>
<xs:element ref="eepkg:namespace"/>
<xs:element ref="eepkg:class"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="namespace" type="xs:anyURI"/>
<xs:element name="class" type="xs:string"/>

<xs:element name="jar" type="xs:string"/>

</xs:schema>
146 changes: 146 additions & 0 deletions schema/expath-pkg-extensions/repo.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:repo="http://exist-db.org/xquery/repo"
xmlns:dcterms="http://purl.org/dc/terms/"
elementFormDefault="qualified"
targetNamespace="http://exist-db.org/xquery/repo">

<xs:annotation>
<xs:documentation>A schema for eXist-db Package Repository extensions to EXPath Packaging.</xs:documentation>
<xs:appinfo>
<dcterms:title>eXist-db Package Repository extensions to EXPath Packaging</dcterms:title>
<dcterms:created xsi:type="dcterms:W3CDTF">2013-11-03T11:36:19.343+01:00</dcterms:created>
<dcterms:creator>Adam Retter</dcterms:creator>
</xs:appinfo>
</xs:annotation>

<xs:element name="meta">
<xs:complexType>
<xs:sequence>
<xs:element ref="repo:description"/>
<xs:element ref="repo:author"/>
<xs:element ref="repo:website"/>
<xs:element ref="repo:status"/>
<xs:element ref="repo:license"/>
<xs:element ref="repo:copyright"/>
<xs:element ref="repo:type"/>
<xs:element ref="repo:target" minOccurs="0"/>
<xs:element ref="repo:prepare" minOccurs="0"/>
<xs:element ref="repo:finish" minOccurs="0"/>
<xs:element ref="repo:permissions" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="repo:changelog" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="description" type="xs:string">
<xs:annotation>
<xs:documentation>A textual description of the package</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="author">
<xs:annotation>
<xs:documentation>A textual description of the author.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="id" use="optional" type="xs:NCName">
<xs:annotation>
<xs:documentation>A simple identifier for the author.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>

<xs:element name="website" type="xs:anyURI">
<xs:annotation>
<xs:documentation>A link to an informational website about the package</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="status" type="xs:NCName">
<xs:annotation>
<xs:documentation>The status of the package</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="license" type="xs:string">
<xs:annotation>
<xs:documentation>Name of the license that the package is released under</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="copyright" type="xs:boolean">
<xs:annotation>
<xs:documentation>Indicates whether there is a copyright on the package</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="type" type="repo:typeType">
<xs:annotation>
<xs:documentation>Indicates whether there is a copyright on the package</xs:documentation>
</xs:annotation>
</xs:element>

<xs:simpleType name="typeType">
<xs:restriction base="xs:NCName">
<xs:enumeration value="application"/>
<xs:enumeration value="library"/>
</xs:restriction>
</xs:simpleType>

<xs:element name="target" type="xs:NCName">
<xs:annotation>
<xs:documentation>A name indicating the final collection name of where the package is installed</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="prepare" type="xs:anyURI">
<xs:annotation>
<xs:documentation>The path to an XQuery script that may be executed before the package is installed</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="finish" type="xs:anyURI">
<xs:annotation>
<xs:documentation>The path to an XQuery script that may be executed after the package is installed</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="permissions" type="repo:permissionsType">
<xs:annotation>
<xs:documentation>Describes permissions that should be applied to a resource from the package when it is installed into the database.</xs:documentation>
</xs:annotation>
</xs:element>

<xs:complexType name="permissionsType">
<xs:attribute name="user" type="xs:NCName"/>
<xs:attribute name="password" type="xs:string"/>
<xs:attribute name="group" type="xs:NCName"/>
<xs:attribute name="mode" type="xs:string"/>
</xs:complexType>

<xs:element name="changelog">
<xs:complexType>
<xs:sequence>
<xs:element ref="repo:change" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="change">
<xs:complexType>
<xs:sequence>
<xs:any namespace="http://www.w3.org/1999/xhtml"/>
</xs:sequence>
<xs:attribute name="version" type="xs:NCName" use="required"/>
</xs:complexType>
</xs:element>

</xs:schema>
Loading
Loading