summaryrefslogtreecommitdiff
blob: 23a8d7d89eb34cea685da5f412cb8349af43b564 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# This file is used for keeping the new mirrors.xml file

# element: mirrors
# description: A set of mirrorgroups
# example: <mirrors>
#            <mirrorgroup country="US" region="North America">
#              ...
#            </mirrorgroup>
#            ...
#          </mirrors>

namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"

mirrors = element mirrors { attlist.mirrors, mirrorgroup* }
attlist.mirrors &= empty
# element: mirrorgroup
# description: Group mirrors by region and country.
# example: <mirrorgroup region="South America" country="BZ">
#            <mirror>
#              ...
#            </mirror>
#            ...
#          </mirrorgroup
mirrorgroup = element mirrorgroup { attlist.mirrorgroup, mirror* }
attlist.mirrorgroup &=
  attribute region { text },
  attribute country { text },
  attribute countryname { text }?
# 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" }?
start = mirrors