document = head, body head = about? about = element "about" {title* & (attribute "url" url)? & author* & editor? & date? & version? & keyword* & link* & serie* & include*} keyword = element "keyword" text version = element "version" text author = element "author" entity editor = element "editor" entity date = element "date" {(attribute "year" xsd:int)? & (attribute "month" xsd:nat1)? & (attribute "day" xsd:nat1)?} entity = name? & (attribute "street" text)? & (attribute "zipcode" text)? & (attribute "city" text)? & (attribute "region" text)? & (attribute "country" text)? & (attribute "email" text)? & (attribute "tel" text)? & (attribute "fax" text)? & (attribute "url" url)? & (attribute "org" entity)? link = element "link" {name? & (attribute "href" url)? & (attribute "rel" text)? & lines*} serie = element "serie" {name? & (attribute "key" text)?} alias = element "alias" {id?} body = (element "section" {commonAttrs, title, alias*, body} | toc | tof | index | figure | element "references" {commonAttrs, reference*} | block)* toc = element "toc" {commonAttrs, (attribute "depth" xsd:nat)?} | tof = element "tof" {commonAttrs, (element "ul" {(element "li" {element "para" text})*})?} | index = element "index" {commonAttrs, (element "ul" {(element "li" {element "para" {text*}})*})?} | figure = element "figure" {commonAttrs, attribute "type" text, title?, block*} | element "references" {commonAttrs = id? & class?, reference = element "reference" {id, {title* & (attribute "url" url)? & author* & editor? & date? & version? & keyword* & link* & serie* & include*}}*} | block = comment | element "para" {commonAttrs, para} | element "ol" {commonAttrs, (element "li" {block*})*} | element "ul" {commonAttrs, (element "li" {block*})*} | element "artwork" {commonAttrs, attribute "type" text, text} | element "quote" {commonAttrs, attribute "type" text, block*} toc = element "toc" {commonAttrs, (attribute "depth" xsd:nat)?} tof = element "tof" {commonAttrs, (element "ul" {(element "li" {element "para" text})*})?} index = element "index" {commonAttrs, (element "ul" {(element "li" {element "para" {text*}})*})?} figure = element "figure" {commonAttrs, attribute "type" text, title?, block*} element "references" {commonAttrs = id? & class?, reference = element "reference" {id, {title* & (attribute "url" url)? & author* & editor? & date? & version? & keyword* & link* & serie* & include*}}*} reference = element "reference" {id, {title* & (attribute "url" url)? & author* & editor? & date? & version? & keyword* & link* & serie* & include*}} include = element "include" {(attribute "href" path)?} block = comment | element "para" {commonAttrs, para} | element "ol" {commonAttrs, (element "li" {block*})*} | element "ul" {commonAttrs, (element "li" {block*})*} | element "artwork" {commonAttrs, attribute "type" text, text} | element "quote" {commonAttrs, attribute "type" text, block*} para = lines* lines = element "b" para | element "code" para | element "del" para | element "i" para | element "note" para | element "q" para | element "sc" para | element "sub" para | element "sup" para | element "u" para | element "eref" {attribute "to" url, para} | element "iref" {attribute "to" text, para} | element "ref" {to, para} | element "rref" {to, para} | element "br" empty | text commonAttrs = id? & class? ident = text title = element "title" para name = attribute "name" text url = text path = text to = attribute "to" ident id = attribute "id" ident