summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2009-09-26 01:56:06 +0200
committerSebastian Pipping <sebastian@pipping.org>2009-09-26 01:56:06 +0200
commitf3a6f9783b633b23e7c026dbf9d0341dba999181 (patch)
treea3b59d9109ce1a29ba372753256a1ea95044bd05
parentImplement layman-global.txt to repositories.xml translator (diff)
downloadrepositories-xml-format-f3a6f9783b633b23e7c026dbf9d0341dba999181.tar.gz
repositories-xml-format-f3a6f9783b633b23e7c026dbf9d0341dba999181.tar.bz2
repositories-xml-format-f3a6f9783b633b23e7c026dbf9d0341dba999181.zip
Add repositories.xml 1.0 grammars
-rw-r--r--repositories.dtd51
-rw-r--r--repositories.rng93
2 files changed, 144 insertions, 0 deletions
diff --git a/repositories.dtd b/repositories.dtd
new file mode 100644
index 0000000..d33eaae
--- /dev/null
+++ b/repositories.dtd
@@ -0,0 +1,51 @@
+<!--
+ Gentoo repositories.xml DTD 1.0
+
+ Modelling by
+ Robert Buchholz <rbu@gentoo.org>
+ Sebastian Pipping <sebastian@pipping.org>
+
+ Copyright 1999-2009 Gentoo Foundation
+ Distributed under the terms of the GNU General Public License v2 or later
+-->
+<!ELEMENT repositories (repo)*>
+<!ATTLIST repositories
+ xmlns CDATA #FIXED ''
+ version CDATA #FIXED '1.0'>
+
+<!ELEMENT repo (description,(homepage)?,maintainer,(source)+,(feed)*)>
+<!ATTLIST repo
+ xmlns CDATA #FIXED ''
+ name CDATA #REQUIRED
+ quality (core|stable|testing|experimental|graveyard) #IMPLIED
+ status (official|unofficial) #IMPLIED>
+
+<!ELEMENT description (#PCDATA)>
+<!ATTLIST description
+ xmlns CDATA #FIXED ''>
+
+<!ELEMENT homepage (#PCDATA)>
+<!ATTLIST homepage
+ xmlns CDATA #FIXED ''>
+
+<!ELEMENT maintainer (email,(name)?)>
+<!ATTLIST maintainer
+ xmlns CDATA #FIXED ''
+ project (yes|no) #IMPLIED>
+
+<!ELEMENT source (#PCDATA)>
+<!ATTLIST source
+ xmlns CDATA #FIXED ''
+ type (bzr|darcs|git|mercurial|rsync|svn|tar) #REQUIRED>
+
+<!ELEMENT feed (#PCDATA)>
+<!ATTLIST feed
+ xmlns CDATA #FIXED ''>
+
+<!ELEMENT email (#PCDATA)>
+<!ATTLIST email
+ xmlns CDATA #FIXED ''>
+
+<!ELEMENT name (#PCDATA)>
+<!ATTLIST name
+ xmlns CDATA #FIXED ''>
diff --git a/repositories.rng b/repositories.rng
new file mode 100644
index 0000000..cc7d468
--- /dev/null
+++ b/repositories.rng
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Gentoo repositories.xml Relax NG schema 1.0
+
+ Modelling by
+ Robert Buchholz <rbu@gentoo.org>
+ Sebastian Pipping <sebastian@pipping.org>
+
+ Copyright 1999-2009 Gentoo Foundation
+ Distributed under the terms of the GNU General Public License v2 or later
+-->
+<grammar ns="" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+ <start>
+ <element name="repositories">
+ <attribute name="version">
+ <value>1.0</value>
+ </attribute>
+ <zeroOrMore>
+ <element name="repo">
+ <attribute name="name">
+ <text/>
+ </attribute>
+ <optional>
+ <attribute name="quality">
+ <choice>
+ <value>core</value>
+ <value>stable</value>
+ <value>testing</value>
+ <value>experimental</value>
+ <value>graveyard</value>
+ </choice>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="status">
+ <choice>
+ <value>official</value>
+ <value>unofficial</value>
+ </choice>
+ </attribute>
+ </optional>
+ <element name="description">
+ <text/>
+ </element>
+ <optional>
+ <element name="homepage">
+ <data type="anyURI"/>
+ </element>
+ </optional>
+ <element name="maintainer">
+ <optional>
+ <attribute name="project">
+ <choice>
+ <value>yes</value>
+ <value>no</value>
+ </choice>
+ </attribute>
+ </optional>
+ <element name="email">
+ <data type="anyURI"/>
+ </element>
+ <optional>
+ <element name="name">
+ <text/>
+ </element>
+ </optional>
+ </element>
+ <oneOrMore>
+ <element name="source">
+ <attribute name="type">
+ <choice>
+ <value>bzr</value>
+ <value>darcs</value>
+ <value>git</value>
+ <value>mercurial</value>
+ <value>rsync</value>
+ <value>svn</value>
+ <value>tar</value>
+ </choice>
+ </attribute>
+ <data type="anyURI"/>
+ </element>
+ </oneOrMore>
+ <zeroOrMore>
+ <element name="feed">
+ <data type="anyURI"/>
+ </element>
+ </zeroOrMore>
+ </element>
+ </zeroOrMore>
+ </element>
+ </start>
+</grammar>