summaryrefslogtreecommitdiff
blob: 7a23cca109a72fdb3221c321f4edfa560e057d1d (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"

packages = element packages { attlist.packages, pkgmetadata* }
attlist.packages &= empty
# Metadata for a category
catmetadata =
  element catmetadata { attlist.catmetadata, longdescription* }
attlist.catmetadata &=
  [ a:defaultValue = "" ] attribute pkgname { text }?
# Metadata for a package
pkgmetadata =
  element pkgmetadata {
    attlist.pkgmetadata,
    (herd
     | maintainer
     | natural-name
     | longdescription
     | use
     | upstream)*
  }
attlist.pkgmetadata &=
  [ a:defaultValue = "" ] attribute pkgname { text }?
# One tag for each herd this package is assigned to.
herd = element herd { attlist.herd, text }
#  One tag for each maintainer of a package, multiple allowed
maintainer =
  element maintainer {
    attlist.maintainer, email, (description | name)*
  }
# Natural name for package, example: LibreOffice (for app-office/libreoffice)
natural-name = element natural-name { attlist.natural-name, text }
attlist.natural-name &= empty
#  A long description of the package in freetext
longdescription =
  element longdescription {
    attlist.longdescription, (text | pkg | cat)*
  }
#  The changelog of the package

# Please note that #PCDATA is mentioned only for the upstream changelog
# element, where the content is a URL. This is due to limitations of the DTD
changelog = element changelog { attlist.changelog, (text | change)* }
attlist.changelog &= empty
#  The changelog contains various "changes"
change =
  element change {
    attlist.change,
    date,
    (developer | version | description | file | contributor | bug)*
  }
attlist.change &= empty
date = element date { attlist.date, text }
attlist.date &= empty
# The date of the change, in "YYYY-MM-DD" format
developer = element developer { attlist.developer, name?, email }
attlist.developer &= empty
#  The developer that made the change. The email is required, name
# is optional
version = element version { attlist.version, text }
attlist.version &= empty
# version of the packages involved (one tag per version)
file = element file { attlist.file, text }
attlist.file &= empty
# one tag per file touched
contributor = element contributor { attlist.contributor, name?, email? }
attlist.contributor &= empty
# A reference to a user that helped in causing this change. 
# There should at least be a name or email address included. 
# Email is preferred
bug = element bug { attlist.bug, text }
attlist.bug &= empty
# bug-id of a bug fixed by this change, multiple allowed. The 
# format of this is a number or alias for a bug. NOT including a 
# # character

# description of what this USE flag does for this package
use = element use { attlist.use, flag* }
flag = element flag { attlist.flag, (text | pkg | cat)* }
# name attribute holds the name of the USE flag
attlist.flag &= attribute name { text }
# upstream metadata information (maintainers, upstream docs,..)
upstream =
  element upstream {
    attlist.upstream,
    (maintainer | changelog | doc | bugs-to | remote-id)*
  }
attlist.upstream &= empty
# Due to the limitation of DTD this will also allow a status
# attribute for the package maintainer element. Please note that
# the usage of the status attribute is nevertheless _only_ allowed
# in the upstream maintainer element.
attlist.maintainer &=
  [ a:defaultValue = "unknown" ]
  attribute status { "active" | "inactive" | "unknown" }?
# URL where the location of the upstream documentation can be found
doc = element doc { attlist.doc, text }
attlist.doc &= [ a:defaultValue = "C" ] attribute lang { text }?
# location where to report bugs
# (may also be an email address prefixed with mailto:)
bugs-to = element bugs-to { attlist.bugs-to, text }
attlist.bugs-to &= empty
# specify a type of package identification tracker
remote-id = element remote-id { attlist.remote-id, text }
attlist.remote-id &=
  attribute type {
    "bitbucket"
    | "cpan"
    | "cpan-module"
    | "cpe"
    | "cran"
    | "ctan"
    | "freecode"
    | "freshmeat"
    | "github"
    | "gitorious"
    | "google-code"
    | "launchpad"
    | "pear"
    | "pecl"
    | "pypi"
    | "rubyforge"
    | "rubygems"
    | "sourceforge"
    | "sourceforge-jp"
    | "vim"
  }
# category/package information for cross-linking in descriptions
# and useflag descriptions
pkg = element pkg { attlist.pkg, text }
attlist.pkg &= empty
cat = element cat { attlist.cat, text }
attlist.cat &= empty
# Common attributes

# the lang attribute, specifies the language of this tag. This is 
# only useful for descriptions of various kinds. If a tag with this 
# attribute is included there must be a description in the default 
# language "C" or "en", which is equivalent
attlist.description &= [ a:defaultValue = "C" ] attribute lang { text }?
attlist.longdescription &=
  [ a:defaultValue = "C" ] attribute lang { text }?
attlist.use &= [ a:defaultValue = "C" ] attribute lang { text }?
# The restrict attribute, this attribute specifies restrictions on 
# the applicability of tags on versions. The format of this attribute is 
# equal to the format of DEPEND lines in ebuilds. There is one special 
# value though: restrict="*". A tag that specifies this only applies if 
# there are no other tags that apply.
# 
# For required tags, there must be either an unrestricted version, or a 
# version that is default restricted.
attlist.herd &= attribute restrict { text }?
attlist.maintainer &= attribute restrict { text }?
attlist.longdescription &= attribute restrict { text }?
attlist.flag &= attribute restrict { text }?
# standard parts
email = element email { attlist.email, text }
attlist.email &= empty
# an email address
name = element name { attlist.name, text }
attlist.name &= empty
#  the name of a person (maintainer, contributor)
description = element description { attlist.description, text }
#  A description of a maintainer or change
start = catmetadata | pkgmetadata