Skip to content

Instantly share code, notes, and snippets.

@plq

plq/metadata.xsd

Created Jan 27, 2016
Embed
What would you like to do?
Gentoo Schema
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="packages">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="pkgmetadata"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="catmetadata">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="longdescription"/>
</xs:sequence>
<xs:attribute name="pkgname"/>
</xs:complexType>
</xs:element>
<xs:element name="longdescription">
<xs:complexType mixed="true">
<xs:choice>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="pkg"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="cat"/>
</xs:choice>
<xs:attribute name="lang"/>
<xs:attribute name="restrict"/>
</xs:complexType>
</xs:element>
<xs:element name="pkg" type="xs:string"/>
<xs:element name="cat" type="xs:string"/>
<xs:element name="pkgmetadata">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="maintainer">
<xs:complexType>
<xs:all>
<xs:element minOccurs="0" ref="email"/>
<xs:element minOccurs="0" ref="name"/>
<xs:element minOccurs="0" ref="description"/>
</xs:all>
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="person"/>
<xs:enumeration value="project"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="status">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="active"/>
<xs:enumeration value="inactive"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="restrict"/>
</xs:complexType>
</xs:element>
<xs:element ref="natural-name"/>
<xs:element ref="longdescription"/>
<xs:element ref="slots"/>
<xs:element ref="use"/>
<xs:element ref="upstream"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="email" type="xs:string"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="description">
<xs:complexType mixed="true">
<xs:attribute name="lang"/>
</xs:complexType>
</xs:element>
<xs:element name="natural-name" type="xs:string"/>
<xs:element name="slots">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="slot"/>
<xs:element minOccurs="0" ref="subslots"/>
</xs:sequence>
<xs:attribute name="lang"/>
</xs:complexType>
</xs:element>
<xs:element name="slot">
<xs:complexType mixed="true">
<xs:attribute name="name" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="subslots" type="xs:string"/>
<xs:element name="use">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="flag"/>
</xs:sequence>
<xs:attribute name="lang"/>
</xs:complexType>
</xs:element>
<xs:element name="flag">
<xs:complexType mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="pkg"/>
<xs:element ref="cat"/>
</xs:choice>
<xs:attribute name="name" use="required"/>
<xs:attribute name="restrict"/>
</xs:complexType>
</xs:element>
<xs:element name="upstream">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="maintainer">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="email"/>
<xs:element ref="name"/>
<xs:element ref="description"/>
</xs:choice>
<xs:attribute name="type">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="person"/>
<xs:enumeration value="project"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="status">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="active"/>
<xs:enumeration value="inactive"/>
<xs:enumeration value="unknown"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element ref="changelog"/>
<xs:element ref="doc"/>
<xs:element ref="bugs-to"/>
<xs:element ref="remote-id"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="changelog" type="xs:string"/>
<xs:element name="doc">
<xs:complexType mixed="true">
<xs:attribute name="lang"/>
</xs:complexType>
</xs:element>
<xs:element name="bugs-to" type="xs:string"/>
<xs:element name="remote-id">
<xs:complexType mixed="true">
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="bitbucket"/>
<xs:enumeration value="cpan"/>
<xs:enumeration value="cpan-module"/>
<xs:enumeration value="cpe"/>
<xs:enumeration value="cran"/>
<xs:enumeration value="ctan"/>
<xs:enumeration value="freecode"/>
<xs:enumeration value="freshmeat"/>
<xs:enumeration value="github"/>
<xs:enumeration value="gitlab"/>
<xs:enumeration value="gitorious"/>
<xs:enumeration value="google-code"/>
<xs:enumeration value="launchpad"/>
<xs:enumeration value="pear"/>
<xs:enumeration value="pecl"/>
<xs:enumeration value="pypi"/>
<xs:enumeration value="rubyforge"/>
<xs:enumeration value="rubygems"/>
<xs:enumeration value="sourceforge"/>
<xs:enumeration value="sourceforge-jp"/>
<xs:enumeration value="vim"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.