# Metadata for a category
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
catmetadata =
element catmetadata { attlist.catmetadata, longdescription* }
attlist.catmetadata &=
[ a:defaultValue = "" ] attribute pkgname { text }?
# Metadata for a package
pkgmetadata =
element pkgmetadata {
attlist.pkgmetadata,
(maintainer
| longdescription
| slots
| stabilize-allarches
| use
| upstream)*
}
attlist.pkgmetadata &=
[ a:defaultValue = "" ] attribute pkgname { text }?
# One tag for each maintainer of a package, multiple allowed
maintainer =
element maintainer {
attlist.maintainer, email, (description | name)*
}
# type attribute determines whether the maintainer is a person or a project.
# Unknown is added to handle s in s. Using it (or no
# explicit type) for Gentoo maintainers is prohibited.
attlist.maintainer &=
[ a:defaultValue = "unknown" ]
attribute type { "person" | "project" | "unknown" }?
# A long description of the package in freetext
longdescription =
element longdescription {
attlist.longdescription, (text | pkg | cat)*
}
# A description of the packages SLOTs
slots = element slots { attlist.slots, slot*, subslots? }
# A particular SLOT
slot = element slot { attlist.slot, text* }
# name attribute holds the name of the SLOT, for sub-SLOTS
# use the subslots element. A slot name of '*' can be used to
# indicate a single description applying to all the slots in which
# case no other elements may be present.
attlist.slot &= attribute name { text }
# The meaning of sub-SLOTs for the whole package
subslots = element subslots { attlist.subslots, text* }
attlist.subslots &= empty
# whether it's possible to stabilize ALLARCHES
stabilize-allarches =
element stabilize-allarches { attlist.stabilize-allarches, empty }
# 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 upstream changelog can be found
changelog = element changelog { attlist.changelog, text }
attlist.changelog &= empty
# URL where the location of the upstream documentation can be found
doc = element doc { attlist.doc, text }
attlist.doc &= [ a:defaultValue = "en" ] 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"
| "gentoo"
| "github"
| "gitlab"
| "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 in the
# form of a ISO 639-1 language code. 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 "en"
attlist.description &=
[ a:defaultValue = "en" ] attribute lang { text }?
attlist.longdescription &=
[ a:defaultValue = "en" ] attribute lang { text }?
attlist.slots &= [ a:defaultValue = "en" ] attribute lang { text }?
attlist.use &= [ a:defaultValue = "en" ] 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. Only package
# dependency specifications conforming to EAPI=0 syntax are allowed.
# The dependency specification may only contain references to the
# package itself and no other package.
#
# For required tags, there must be either an unrestricted version, or a
# version that is default restricted.
attlist.maintainer &= attribute restrict { text }?
attlist.longdescription &= attribute restrict { text }?
attlist.flag &= attribute restrict { text }?
attlist.stabilize-allarches &= attribute restrict { text }?
# standard parts
# an email address
email = element email { attlist.email, text }
attlist.email &= empty
# the name of a person (maintainer, contributor)
name = element name { attlist.name, text }
attlist.name &= empty
# A description of a maintainer or change
description = element description { attlist.description, text }
start = pkgmetadata | catmetadata