Skip to content

Commit

Permalink
[feature] Add Schema's for EXPath Packaging System and eXist-db's ext…
Browse files Browse the repository at this point in the history
…ensions thereto
  • Loading branch information
adamretter committed Nov 3, 2023
1 parent 651a5c4 commit d671ee3
Show file tree
Hide file tree
Showing 4 changed files with 471 additions and 0 deletions.
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

0 comments on commit d671ee3

Please sign in to comment.