patrick@0: # $Id$ patrick@0: patrick@0: start = publidoc patrick@0: patrick@0: patrick@0: publidoc = element publidoc { patrick@0: publidoc.attributes, patrick@0: publidoc.content patrick@0: } patrick@0: patrick@0: publidoc.attributes = patrick@0: version.attribute patrick@0: version.attribute = attribute version { "1.0" } patrick@0: patrick@0: publidoc.content = patrick@0: document patrick@0: | top.topic patrick@0: patrick@0: patrick@0: # ============================================================================= patrick@20: # TOP LEVEL patrick@0: # ============================================================================= patrick@0: patrick@98: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ top.head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@90: patrick@90: top.head = element head { top.head.content } patrick@90: patrick@90: top.head.content = patrick@90: (title, subtitle?)? patrick@90: & identifier* patrick@90: & copyright? patrick@90: & contributors? patrick@90: & date? patrick@90: & place? patrick@90: & source* patrick@90: & keywordset? patrick@90: & subjectset? patrick@90: & abstract? patrick@90: & cover? patrick@90: & annotation* patrick@90: patrick@0: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ document ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@90: # ~~~~~~ document patrick@0: document = element document { document.attributes, document.content } patrick@0: patrick@0: document.attributes = patrick@0: document.id.attribute patrick@66: & lang.attribute? patrick@0: document.id.attribute = attribute xml:id { xsd:ID } patrick@66: lang.attribute = attribute xml:lang { xsd:language } patrick@0: patrick@0: document.content = patrick@20: top.head?, patrick@56: (division | topic)+ patrick@0: patrick@0: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ topic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@18: top.topic = element topic { top.topic.attributes, top.topic.content } patrick@0: patrick@20: top.topic.attributes = patrick@20: topic.id.attribute patrick@20: & topic.type.attribute? patrick@66: & lang.attribute? patrick@20: topic.id.attribute = attribute xml:id { xsd:ID } patrick@20: topic.type.attribute = attribute type { xsd:NCName } patrick@20: patrick@20: top.topic.content = patrick@20: top.head?, patrick@20: section+ patrick@0: patrick@40: patrick@0: # ============================================================================= patrick@20: # DIVISION LEVEL patrick@0: # ============================================================================= patrick@0: patrick@70: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ division ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@90: # ~~~~~~ division patrick@0: division = element division { division.content } patrick@0: patrick@0: division.content = patrick@20: division.head?, patrick@56: (division | topic)+ patrick@0: patrick@90: # ~~~~~~ division.head patrick@90: division.head = element head { division.head.content } patrick@90: patrick@90: division.head.content = patrick@90: (title, subtitle?)? patrick@90: & abstract? patrick@90: & annotation* patrick@90: patrick@0: patrick@0: # ============================================================================= patrick@90: # COMPONENT LEVEL patrick@0: # ============================================================================= patrick@0: patrick@90: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ component.head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@90: patrick@90: component.head = element head { component.head.content } patrick@90: patrick@90: component.head.content = patrick@90: (title, subtitle?)? patrick@90: & contributors? patrick@90: & abstract? patrick@90: & annotation* patrick@90: patrick@0: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ topic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@0: topic = element topic { topic.attributes, topic.content } patrick@0: patrick@0: topic.attributes = patrick@0: topic.id.attribute? patrick@0: & topic.type.attribute? patrick@69: & lang.attribute? patrick@0: patrick@0: topic.content = patrick@20: component.head?, patrick@0: section+ patrick@0: patrick@0: patrick@0: # ============================================================================= patrick@20: # SECTION LEVEL patrick@0: # ============================================================================= patrick@0: patrick@20: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@90: # ~~~~~~ section patrick@58: section = element section { section.attributes, section.content } patrick@58: patrick@58: section.attributes = patrick@58: section.type.attribute? patrick@64: & lang.attribute? patrick@58: section.type.attribute = attribute type { xsd:NCName } patrick@0: patrick@0: section.content = patrick@20: section.head?, patrick@9: (section+ | block+) patrick@0: patrick@90: # ~~~~~~ section.head patrick@90: section.head = element head { section.head.content } patrick@90: patrick@90: section.head.content = patrick@90: (title, subtitle?)? patrick@90: & abstract? patrick@90: & annotation* patrick@90: patrick@0: patrick@0: # ============================================================================= patrick@20: # BLOCK LEVEL patrick@0: # ============================================================================= patrick@0: patrick@20: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@9: patrick@90: # ~~~~~~ block patrick@44: block = (p | speech | \list | blockquote | table | media) patrick@9: patrick@90: # ~~~~~~ block.head patrick@90: block.head = element head { block.head.content } patrick@90: patrick@90: block.head.content = patrick@90: (title, subtitle?)? patrick@90: patrick@42: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@20: p = element p { p.content } patrick@0: patrick@20: p.content = patrick@0: inlines patrick@0: patrick@18: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@18: patrick@18: # ~~~~~~ speech patrick@18: speech = element speech { speech.content } patrick@18: patrick@18: speech.content = patrick@18: speaker?, patrick@18: stage?, patrick@20: p+ patrick@18: patrick@18: # ~~~~~~ speaker patrick@18: speaker = element speaker { speaker.content } patrick@18: patrick@18: speaker.content = inlines patrick@18: patrick@18: # ~~~~~~ stage patrick@18: stage = element stage { stage.content } patrick@18: patrick@18: stage.content = inlines patrick@18: patrick@17: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@9: patrick@9: # ~~~~~~ list patrick@75: \list = element list { patrick@20: block.head?, patrick@71: ( (attribute type {"ordered"}?, item, item+) patrick@9: | (attribute type {"glossary"}, glossary.item+) ) patrick@75: } patrick@9: patrick@9: # ~~~~~~ item patrick@9: item = element item { item.content } patrick@9: patrick@30: item.content = patrick@73: inlines patrick@73: | block+ patrick@9: patrick@9: # ~~~~~~ glossary.item patrick@9: glossary.item = element item { glossary.item.content } patrick@9: patrick@9: glossary.item.content = patrick@9: label, patrick@9: block+ patrick@9: patrick@44: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blockquote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@44: patrick@44: # ~~~~~~ blockquote patrick@44: blockquote = element blockquote { blockquote.content } patrick@44: patrick@44: blockquote.content = patrick@44: block.head?, patrick@44: (p | speech | \list)+, patrick@44: attribution? patrick@44: patrick@44: # ~~~~~~ attribution patrick@72: attribution = element attribution { attribution.content } patrick@44: patrick@72: attribution.content = patrick@44: inlines patrick@44: patrick@17: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@17: patrick@73: # ~~~~~~ table patrick@17: table = element table { table.content } patrick@17: patrick@17: table.content = patrick@20: block.head?, patrick@17: tgroup+, patrick@17: caption? patrick@17: patrick@17: # ~~~~~~ tgroup patrick@17: tgroup = element tgroup { tgroup.attributes, tgroup.content } patrick@17: patrick@17: tgroup.content = patrick@17: thead?, patrick@17: tfoot?, patrick@17: tbody patrick@17: patrick@17: tgroup.attributes = patrick@17: cols.attribute patrick@17: & align.attribute? patrick@17: & colsep.attribute? patrick@17: & rowsep.attribute? patrick@17: cols.attribute = attribute cols { xsd:positiveInteger } patrick@17: align.attribute = attribute align { "left" | "right" | "center" | "justify" } patrick@17: colsep.attribute = attribute colsep { "0" | "1" } patrick@17: rowsep.attribute = attribute rowsep { "0" | "1" } patrick@17: patrick@17: # ~~~~~~ thead, tfoot, tbody patrick@22: thead = element thead { thead.attributes, thead.content } patrick@22: tfoot = element tfoot { tfoot.attributes, tfoot.content } patrick@22: tbody = element tbody { tbody.attributes, tbody.content } patrick@17: patrick@22: thead.attributes = patrick@22: valign.attribute? patrick@22: tfoot.attributes = patrick@22: valign.attribute? patrick@22: tbody.attributes = patrick@22: valign.attribute? patrick@22: valign.attribute = attribute valign { "top" | "middle" | "bottom" } patrick@75: patrick@17: thead.content = patrick@17: row+ patrick@17: tfoot.content = patrick@17: row+ patrick@17: tbody.content = patrick@17: row+ patrick@17: patrick@17: # ~~~~~~ row patrick@17: row = element row { row.attribute, row.content } patrick@17: patrick@17: row.attribute = patrick@17: valign.attribute? patrick@17: patrick@17: row.content = patrick@17: entry+ patrick@17: patrick@17: # ~~~~~~ entry patrick@17: entry = element entry { entry.content } patrick@17: patrick@17: entry.content = patrick@17: inlines patrick@37: | (p | media)+ patrick@17: patrick@17: # ~~~~~~ caption patrick@17: caption = element caption { caption.content } patrick@17: patrick@17: caption.content = patrick@20: inlines patrick@20: | p+ patrick@17: patrick@35: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@2: # ~~~~~~ media patrick@0: media = element media { media.content } patrick@0: patrick@0: media.content = patrick@24: block.head?, patrick@45: (image | audio)+, patrick@35: caption?, patrick@36: link? patrick@0: patrick@2: # ~~~~~~ image patrick@0: image = element image { image.attributes, image.content } patrick@0: patrick@0: image.attributes = patrick@49: media.id.attribute, patrick@49: image.type? patrick@17: media.id.attribute = attribute id { xsd:NMTOKEN } patrick@93: image.type = attribute type { "cover" | "thumbnail" | "icon" } patrick@0: patrick@0: image.content = patrick@0: copyright? patrick@0: patrick@45: # ~~~~~~ audio patrick@45: audio = element audio { audio.attributes } patrick@43: patrick@45: audio.attributes = patrick@43: media.id.attribute patrick@43: patrick@0: patrick@0: # ============================================================================= patrick@90: # HEAD LEVEL patrick@90: # ============================================================================= patrick@90: patrick@90: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@90: patrick@90: title = element title { title.content } patrick@90: subtitle = element subtitle { title.content } patrick@90: patrick@90: title.content = inlines patrick@90: patrick@90: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@90: patrick@90: identifier.uri = element identifier { patrick@90: attribute type { "uri" }, xsd:anyURI patrick@90: } patrick@90: patrick@90: identifier.ean = element identifier { patrick@90: attribute type { "ean" }, xsd:token {pattern = "\d{13}"} patrick@90: } patrick@90: patrick@90: identifier = identifier.uri | identifier.ean patrick@90: patrick@90: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ copyright ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@90: patrick@90: copyright = element copyright { copyright.content } patrick@90: patrick@90: copyright.content = inlines patrick@90: patrick@90: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ contributors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@90: patrick@90: # ~~~~~~ contributors patrick@90: contributors = element contributors { contributors.content } patrick@90: patrick@90: contributors.content = patrick@90: contributor+ patrick@90: patrick@90: # ~~~~~~ contributor patrick@90: contributor = element contributor { contributor.content } patrick@90: patrick@90: contributor.content = patrick@90: (((firstname, secondname?)?, lastname) | label), patrick@90: address?, patrick@90: link?, patrick@90: role* patrick@90: patrick@90: # ~~~~~~ firstname, secondname, lastname, label patrick@90: firstname = element firstname { firstname.content } patrick@90: secondname = element secondname { secondname.content } patrick@90: lastname = element lastname { lastname.content } patrick@90: label = element label { label.content } patrick@90: patrick@90: firstname.content = inlines patrick@90: secondname.content = inlines patrick@90: lastname.content = inlines patrick@90: label.content = inlines patrick@90: patrick@90: # ~~~~~~ address patrick@90: address = element address { address.content } patrick@90: patrick@90: address.content = inlines patrick@90: patrick@90: # ~~~~~~ role patrick@90: role = element role { role.content } patrick@90: patrick@90: role.content = "author" | "illustrator" | "publisher" | "packager" patrick@90: patrick@90: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@90: patrick@90: place = element place { place.content } patrick@90: patrick@90: place.content = inlines patrick@90: patrick@90: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@90: patrick@90: # ~~~~~~ source patrick@90: source = element source { patrick@90: ( (attribute type { "book" }, source.content.book) patrick@90: | (attribute type { "file" }, source.content.file)), patrick@90: source.content patrick@90: } patrick@90: patrick@90: source.content.book = patrick@90: identifier.ean, patrick@90: title?, patrick@90: pagenumber* patrick@90: source.content.file = patrick@90: identifier.uri patrick@90: source.content = patrick@90: annotation* patrick@90: patrick@90: # ~~~~~~ pagenumber patrick@90: pagenumber = element pagenumber { pagenumber.content } patrick@90: patrick@90: pagenumber.content = xsd:positiveInteger patrick@90: patrick@90: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ keyword & subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@90: patrick@90: # ~~~~~~ keywordset patrick@90: keywordset = element keywordset { keywordset.content } patrick@90: patrick@90: keywordset.content = keyword+ patrick@90: patrick@90: # ~~~~~~ keyword patrick@90: keyword = element keyword { keyword.content } patrick@90: patrick@90: keyword.content = mixed { sup*, sub* } patrick@90: patrick@90: # ~~~~~~ subjectset patrick@90: subjectset = element subjectset { subjectset.content } patrick@90: patrick@90: subjectset.content = subject+ patrick@90: patrick@90: # ~~~~~~ subject patrick@90: subject = element subject { subject.attributes } patrick@90: patrick@90: subject.attributes = patrick@90: subject.id.attribute patrick@90: subject.id.attribute = attribute id { xsd:NMTOKEN } patrick@90: patrick@90: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@90: patrick@90: abstract = element abstract { abstract.content } patrick@90: patrick@90: abstract.content = patrick@90: p+ patrick@90: patrick@90: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cover ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@90: patrick@90: cover = element cover { cover.content } patrick@90: patrick@90: cover.content = patrick@90: cover.image patrick@90: patrick@90: cover.image = element image { cover.image.attributes } patrick@90: patrick@90: cover.image.attributes = patrick@90: cover.image.id.attribute patrick@90: cover.image.id.attribute = attribute id { xsd:NMTOKEN } patrick@90: patrick@90: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ annotation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@90: patrick@90: annotation = element annotation { annotation.content } patrick@90: patrick@90: annotation.content = inlines patrick@90: patrick@90: patrick@90: # ============================================================================= patrick@20: # INLINE LEVEL patrick@0: # ============================================================================= patrick@0: patrick@0: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@0: inlines = mixed { patrick@0: sup* patrick@0: & sub* patrick@42: & var* patrick@13: & number* patrick@42: & math* patrick@0: & date* patrick@0: & name* patrick@5: & note* patrick@0: & foreign* patrick@0: & highlight* patrick@5: & mentioned* patrick@5: & quote* patrick@8: & acronym* patrick@8: & term* patrick@25: & link* patrick@42: & anchor* patrick@91: & initial* patrick@93: & image* patrick@0: } patrick@0: patrick@42: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup, var ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@42: sup = element sup { text } patrick@0: patrick@42: sub = element sub { text } patrick@42: patrick@42: var = element var { text } patrick@42: patrick@90: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@90: patrick@90: number = element number { patrick@90: ( attribute type {"roman"}, number.attributes, number.roman.content ) patrick@90: | ( number.attributes, number.content) patrick@90: } patrick@90: patrick@90: number.attributes = patrick@90: number.value.attribute? patrick@90: number.value.attribute = attribute value { xsd:integer | xsd:decimal } patrick@90: patrick@90: number.content = mixed { sup* } patrick@90: number.roman.content = xsd:token {pattern = "[dlxvi]+"} patrick@90: patrick@42: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ math ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@42: patrick@42: math = element math { patrick@42: ( attribute notation {"tex"}, math.attributes, math.tex.content ) patrick@42: | ( math.attributes, math.content) patrick@42: } patrick@42: patrick@42: math.attributes = patrick@42: wide.attribute? patrick@42: wide.attribute = attribute wide { xsd:boolean } patrick@42: patrick@42: math.content = mixed { sup* & sub* & var* } patrick@42: math.tex.content = text patrick@0: patrick@36: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@0: date = element date { date.attributes, date.content } patrick@0: patrick@3: date.attributes = patrick@13: date.value.attribute patrick@13: & date.of.attribute? patrick@13: date.value.attribute = attribute value { xsd:date | xsd:gYearMonth | xsd:gYear } patrick@33: date.of.attribute = attribute of { "birth" | "death" } patrick@0: patrick@13: date.content = mixed { sup* } patrick@0: patrick@36: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@0: name = element name { name.attributes, name.content } patrick@2: patrick@2: name.attributes = patrick@2: name.of.attribute? patrick@33: name.of.attribute = attribute of patrick@33: { "person" | "company" | "book" | "newspaper" | "party" } patrick@0: patrick@2: name.content = inlines patrick@2: patrick@36: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@5: note = element note { note.attributes, note.content } patrick@0: patrick@5: note.attributes = patrick@5: note.label.attribute? patrick@5: note.label.attribute = attribute label { text } patrick@0: patrick@5: note.content = patrick@91: (w, p+) | inlines patrick@91: patrick@91: w = element w { inlines } patrick@0: patrick@36: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@0: foreign = element foreign { foreign.attributes, foreign.content } patrick@0: patrick@9: foreign.attributes = patrick@9: lang.attribute? patrick@0: patrick@0: foreign.content = inlines patrick@0: patrick@36: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@0: highlight = element highlight { highlight.content } patrick@0: patrick@0: highlight.content = inlines patrick@0: patrick@36: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@5: patrick@5: mentioned = element mentioned { mentioned.content } patrick@5: patrick@5: mentioned.content = inlines patrick@5: patrick@36: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@5: patrick@5: quote = element quote { quote.content } patrick@5: patrick@5: quote.content = inlines patrick@5: patrick@36: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ acronym ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@8: patrick@8: acronym = element acronym { acronym.content } patrick@8: patrick@8: acronym.content = inlines patrick@8: patrick@36: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@8: patrick@8: term = element term { term.content } patrick@8: patrick@8: term.content = inlines patrick@8: patrick@36: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@0: link = element link { link.attributes, link.content } patrick@0: patrick@9: link.attributes = patrick@42: (uri.attribute | idref.attribute) patrick@9: uri.attribute = attribute uri { xsd:anyURI } patrick@9: idref.attribute = attribute idref { xsd:IDREF } patrick@0: patrick@0: link.content = inlines patrick@42: patrick@42: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ anchor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@42: patrick@43: anchor = element anchor { anchor.attributes } patrick@42: patrick@42: anchor.attributes = patrick@42: anchor.id.attribute patrick@42: anchor.id.attribute = attribute xml:id { xsd:ID } patrick@91: patrick@91: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ initial ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@91: patrick@91: initial = element initial { initial.content } patrick@91: patrick@91: initial.content = patrick@91: c, patrick@91: w? patrick@91: patrick@91: c = element c { text }