commit: f2d97490637ae0ae50dfe6165fd1ab53d5b993b4 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Tue Dec 17 18:52:08 2019 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Tue Dec 17 18:52:08 2019 +0000 URL: https://gitweb.gentoo.org/proj/nxml-gentoo-schemas.git/commit/?id=f2d97490
mirrors.rnc: New file. mirrors.dtd was missing from the list of DTDs. Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> Makefile | 2 +- mirrors.rnc | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ schemas.xml | 1 + 3 files changed, 81 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9a40f59..915719d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -DTDS = book.dtd devbook.dtd glsa.dtd guide.dtd metadata.dtd \ +DTDS = book.dtd devbook.dtd glsa.dtd guide.dtd metadata.dtd mirrors.dtd \ projects.dtd repositories.dtd DTDDEPS = $(patsubst %.dtd,%.dep,$(DTDS)) diff --git a/mirrors.rnc b/mirrors.rnc new file mode 100644 index 0000000..e516d0c --- /dev/null +++ b/mirrors.rnc @@ -0,0 +1,79 @@ +# $Header: /var/cvsroot/gentoo/xml/htdocs/dtd/mirrors.dtd,v 1.3 2009/12/03 09:43:39 robbat2 Exp $ + +# This file is used for keeping the new mirrors.xml file + +# element: mirrors +# description: A set of mirrorgroups followed by a list of countries with their code +# example: <mirrors> +# <mirrorgroup country="US" region="North America"> +# ... +# </mirrorgroup> +# ... +# <countries> +# <country code="CA">Canada</country> +# ... +# </countries> +# </mirrors> + +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + +mirrors = element mirrors { attlist.mirrors, mirrorgroup*, countries } +attlist.mirrors &= empty +# element: mirrorgroup +# description: Group mirrors by region and country. +# The country code must exist in //countries/country +# example: <mirrorgroup region="South America" country="BZ"> +# <mirror> +# ... +# </mirror> +# ... +# </mirrorgroup +mirrorgroup = element mirrorgroup { attlist.mirrorgroup, mirror* } +attlist.mirrorgroup &= + attribute region { text }, + attribute country { xsd:IDREF } +# element: mirror +# description: One per mirror; name the mirror and provide one or more uris +# optionally: provide GPS coordinates, a city and a bug id. +# example: <mirror city="Corvallis" +# coordinates="44.5646,-123.2620" +# gentoo-bug="12345"> +# <name>OSU Open Source Lab</name> +# <uri protocol="http">http://gentoo.osuosl.org/</uri> +# <uri protocol="ftp">ftp://gentoo.osuosl.org/</uri> +# </mirror> +mirror = element mirror { attlist.mirror, name, uri+ } +attlist.mirror &= + attribute city { text }?, + attribute coordinates { text }?, + attribute gentoo-bug { text }? +# element: name +# description: Name of the mirror +# note: Do not include a country and protocol pair, "(USA/http)" as they will +# be built by the XSL. +# example: <name>OSU Open Source Lab</name> +name = element name { attlist.name, text } +attlist.name &= empty +# element: uri +# description: A Uniform Resource Locator for a given mirror +# example: <uri protocol='http' ipv4='y' ipv6='y'>http://gentoo.osuosl.org/</uri> +uri = element uri { attlist.uri, text } +attlist.uri &= + [ a:defaultValue = "y" ] attribute ipv4 { "Y" | "y" | "N" | "n" }?, + [ a:defaultValue = "n" ] attribute ipv6 { "Y" | "y" | "N" | "n" }?, + [ a:defaultValue = "n" ] attribute partial { "Y" | "y" | "N" | "n" }?, + [ a:defaultValue = "http" ] + attribute protocol { "http" | "ftp" | "rsync" }? +# element: countries +# description: A list of countries with their code and name +# example: <countries> +# <country code="CA">Canada</country> +# <countries> +countries = element countries { attlist.countries, country* } +attlist.countries &= empty +# element: country +# description: A country with its code +# example: <country code="CA">Canada</country> +country = element country { attlist.country, text } +attlist.country &= attribute code { xsd:ID } +start = mirrors diff --git a/schemas.xml b/schemas.xml index 7db46ae..590e4ce 100644 --- a/schemas.xml +++ b/schemas.xml @@ -7,6 +7,7 @@ <documentElement localName="catmetadata" uri="metadata.rnc" /> <documentElement localName="glsa" uri="glsa.rnc" /> <documentElement localName="guide" uri="guide.rnc" /> + <documentElement localName="mirrors" uri="mirrors.rnc" /> <documentElement localName="news" uri="guide.rnc" /> <documentElement localName="pkgmetadata" uri="metadata.rnc" /> <documentElement localName="projects" uri="projects.rnc" />