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

include "common.rnc"
mainpage =
  element mainpage {
    mainpage.attlist,
    title,
    author+,
    abstract?,
    license?,
    version,
    date?,
    (devmap? | newsitems? | (mirrorlist | chapter)+)
  }
mainpage.attlist &=
  attribute redirect { text }?,
  attribute lang { text }?
newsitems = element newsitems { newsitems.attlist, empty }
newsitems.attlist &= empty
devmap = element devmap { devmap.attlist, empty }
devmap.attlist &= empty
guide =
  element guide {
    guide.attlist,
    title,
    subtitle?,
    values?,
    author+,
    abstract,
    summary?,
    license?,
    version,
    date,
    faqindex?,
    chapter+
  }
guide.attlist &=
  attribute type { text }?,
  attribute disclaimer {
    "articles" | "oldbook" | "draft" | "obsolete"
  }?,
  attribute redirect { text }?,
  attribute lang { text }?
news =
  element news { news.attlist, poster, date, title, summary?, body }
news.attlist &=
  [ a:defaultValue = "no" ] attribute gentoo { "yes" | "no" }?,
  attribute category {
    "gentoo" | "main" | "linux" | "moo" | "plans" | "birthday"
  }
subtitle = element subtitle { subtitle.attlist, text }
subtitle.attlist &= empty
poster = element poster { poster.attlist, text }
poster.attlist &= empty
faqindex = element faqindex { faqindex.attlist, title, section? }
faqindex.attlist &= empty
chapter =
  element chapter {
    chapter.attlist,
    (\include | (title, section+))
  }
chapter.attlist &= attribute id { text }?
section =
  element section {
    section.attlist,
    (\include | (title?, body+))
  }
body =
  element body {
    body.attlist,
    (mirrorlist
     | \include
     | (block.class | glsa-latest | glsaindex | glepindex)+)
  }
glsaindex = element glsaindex { glsaindex.attlist, empty }
glsaindex.attlist &= empty
glsa-latest = element glsa-latest { glsa-latest.attlist, empty }
glsa-latest.attlist &= empty
mirrorlist = element mirrorlist { mirrorlist.attlist, empty }
mirrorlist.attlist &=
  [ a:defaultValue = "full" ] attribute select { "full" | "partial" }?
mirrorlist.attlist &=
  [ a:defaultValue = "/main/en/mirrors3.xml" ] attribute src { text }?
start = guide | mainpage | included | news
