Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
75 lines (66 sloc) 2.96 KB
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
targetNamespace="https://phar.io/repository" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:rep="https://phar.io/repository">
<xs:element name="repository" type="rep:repositoryType"/>
<xs:complexType name="repositoryType">
<xs:sequence maxOccurs="unbounded">
<xs:element type="rep:pharType" name="phar"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="pharType">
<xs:sequence maxOccurs="unbounded">
<xs:element type="rep:releaseType" name="release" />
</xs:sequence>
<xs:attribute type="xs:string" name="name" use="required"/>
</xs:complexType>
<xs:complexType name="releaseType">
<xs:sequence maxOccurs="unbounded">
<xs:element type="rep:signatureType" name="signature"/>
<xs:element type="rep:hashType" name="hash"/>
</xs:sequence>
<xs:attribute type="xs:string" name="version" use="required"/>
<xs:attribute type="rep:urlType" name="url" use="required" />
</xs:complexType>
<xs:complexType name="signatureType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="gpg" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute type="rep:urlType" name="url">
<xs:annotation>
<xs:documentation xml:lang="en">
Optional attribute. By default ".asc" will be added to the url of the PHAR.
If the url of the signature file does not match this pattern, the url can be put here.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="hashType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="sha-1" />
<xs:enumeration value="sha-256" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute type="xs:string" name="value" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="urlType">
<xs:restriction base="xs:anyURI">
<xs:pattern value="https://.+" />
</xs:restriction>
</xs:simpleType>
</xs:schema>