patrick@0: start = publidoc patrick@0: patrick@0: publidoc = element publidoc { iinov@476: publidoc.attributes, iinov@476: publidoc.content iinov@476: } patrick@0: patrick@0: publidoc.attributes = iinov@476: version.attribute patrick@0: version.attribute = attribute version { "1.0" } patrick@0: patrick@0: publidoc.content = iinov@476: document iinov@476: | glossary iinov@476: | topic patrick@0: patrick@0: # ============================================================================= iinov@476: # HEAD Patrick@310: # ============================================================================= Patrick@310: Patrick@310: # ~~~~~~~~~~~~~~~~~~~~~~~ title, shorttitle, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@310: Patrick@310: title = element title { title.content } Patrick@310: shorttitle = element shorttitle { title.content } Patrick@310: subtitle = element subtitle { title.content } Patrick@310: Patrick@310: title.content = inlines Patrick@310: Patrick@310: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@310: Patrick@310: # ~~~~~~ identifier iinov@476: identifier = iinov@476: element identifier { iinov@476: (attribute type { "ean" }, for.attribute?, xsd:token {pattern = "\d{13}"}) | iinov@476: (attribute type { "uri" }, for.attribute?, xsd:anyURI) iinov@476: } Patrick@310: Patrick@310: # ~~~~~~ identifier.ean iinov@476: identifier.ean = iinov@476: element identifier { iinov@476: attribute type { "ean" }, for.attribute?, xsd:token {pattern = "\d{13}"} iinov@476: } Patrick@310: Patrick@310: # ~~~~~~ identifier.uri iinov@476: identifier.uri = iinov@476: element identifier { attribute type { "uri" }, for.attribute?, xsd:anyURI } Patrick@310: Patrick@310: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ copyright ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@310: Patrick@310: copyright = element copyright { copyright.content } Patrick@310: Patrick@310: copyright.content = simple.inlines Patrick@310: Patrick@310: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ collection ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@310: Patrick@310: collection = element collection { collection.content } Patrick@310: Patrick@310: collection.content = simple.inlines Patrick@310: Patrick@310: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ contributors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@310: Patrick@310: # ~~~~~~ contributors Patrick@310: contributors = element contributors { contributors.content } Patrick@310: Patrick@310: contributors.content = iinov@476: contributor+ Patrick@310: Patrick@310: # ~~~~~~ contributor Patrick@310: contributor = element contributor { contributor.content } Patrick@310: Patrick@310: contributor.content = iinov@476: identifier.uri?, iinov@476: ((firstname?, lastname) | label), iinov@476: address?, iinov@476: link?, iinov@476: role+ Patrick@310: Patrick@310: # ~~~~~~ firstname, secondname, lastname, label Patrick@310: firstname = element firstname { firstname.content } Patrick@310: lastname = element lastname { lastname.content } Patrick@310: label = element label { label.content } Patrick@310: Patrick@310: firstname.content = simple.inlines Patrick@310: lastname.content = simple.inlines Patrick@310: label.content = simple.inlines Patrick@310: Patrick@310: # ~~~~~~ address Patrick@310: address = element address { address.content } Patrick@310: Patrick@310: address.content = simple.inlines Patrick@310: Patrick@310: # ~~~~~~ role Patrick@310: role = element role { role.content } Patrick@310: iinov@476: role.content = iinov@476: "author" | "illustrator" | "publisher" | "packager" | "translator" Patrick@310: Patrick@310: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@310: Patrick@310: place = element place { place.content } Patrick@310: Patrick@310: place.content = simple.inlines Patrick@310: Patrick@310: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@310: iinov@476: source = iinov@476: element source { iinov@476: ( (attribute type { "book" }, bibliography.entry.content) | iinov@476: (attribute type { "file" }, source.content.file) ), iinov@476: source.content iinov@476: } Patrick@310: Patrick@310: source.content.file = iinov@476: identifier.uri Patrick@310: source.content = iinov@476: annotation? Patrick@310: Patrick@310: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ keyword & subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@310: Patrick@310: # ~~~~~~ keywordset Patrick@310: keywordset = element keywordset { keywordset.content } Patrick@310: Patrick@310: keywordset.content = keyword+ Patrick@310: Patrick@310: # ~~~~~~ keyword Patrick@310: keyword = element keyword { keyword.content } Patrick@310: Patrick@310: keyword.content = simple.inlines Patrick@310: Patrick@310: # ~~~~~~ subjectset Patrick@310: subjectset = element subjectset { subjectset.content } Patrick@310: Patrick@310: subjectset.content = subject+ Patrick@310: Patrick@310: # ~~~~~~ subject Patrick@310: subject = element subject { subject.content } Patrick@310: Patrick@310: subject.content = simple.inlines Patrick@310: Patrick@310: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ index ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@310: Patrick@355: # ~~~~~~ indexset Patrick@355: indexset = element indexset { indexset.content } Patrick@355: Patrick@355: indexset.content = head.index+ Patrick@355: Patrick@310: # ~~~~~~ index Patrick@310: index = element index { index.content } Patrick@310: head.index = element index { head.index.content } Patrick@310: Patrick@310: index.content = iinov@476: (index.w, index.entry?) iinov@476: | (index.entry, (index.w | index.entry)?) Patrick@310: head.index.content = iinov@476: index.entry, index.entry? Patrick@310: Patrick@310: # ~~~~~~ index.w Patrick@310: index.w = element w { simple.inlines } Patrick@310: Patrick@310: # ~~~~~~ index.entry Patrick@310: index.entry = element entry { simple.inlines } Patrick@310: Patrick@310: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@310: Patrick@310: abstract = element abstract { abstract.content } Patrick@310: Patrick@310: abstract.content = iinov@476: p+ Patrick@310: Patrick@310: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cover ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@310: Patrick@310: cover = element cover { cover.content } Patrick@310: Patrick@310: cover.content = iinov@476: cover.image Patrick@310: Patrick@310: cover.image = element image { cover.image.attributes } Patrick@310: Patrick@310: cover.image.attributes = iinov@476: media.id.attribute Patrick@310: Patrick@310: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ annotation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@310: Patrick@310: annotation = element annotation { annotation.content } Patrick@310: Patrick@364: annotation.content = iinov@476: inlines | p+ Patrick@310: Patrick@310: Patrick@310: # ============================================================================= iinov@476: # DOCUMENT patrick@0: # ============================================================================= patrick@0: iinov@476: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ document.head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@90: iinov@476: document.head = element head { document.head.content } patrick@90: iinov@476: document.head.content = iinov@476: (title & shorttitle? & subtitle*)? iinov@476: & identifier* iinov@476: & copyright* iinov@476: & collection? iinov@476: & contributors? iinov@476: & date? iinov@476: & place? iinov@476: & (source, source?)? iinov@476: & keywordset? iinov@476: & subjectset? iinov@476: & indexset? iinov@476: & abstract? iinov@476: & cover? iinov@476: & annotation? patrick@90: patrick@0: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ document ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@0: document = element document { document.attributes, document.content } patrick@0: patrick@0: document.attributes = iinov@476: document.id.attribute? iinov@476: & document.type.attribute? iinov@476: & lang.attribute? patrick@117: document.id.attribute = attribute id { xsd:NMTOKEN } patrick@142: document.type.attribute = attribute type { xsd:NCName } patrick@66: lang.attribute = attribute xml:lang { xsd:language } patrick@0: patrick@0: document.content = iinov@476: document.head?, iinov@476: (division | document.topic | glossary)+ patrick@0: patrick@0: iinov@476: # ============================================================================= iinov@476: # GLOSSARY iinov@476: # ============================================================================= Coraline@419: Coraline@419: glossary = element glossary { glossary.attributes, glossary.content } Coraline@419: Coraline@419: glossary.attributes = iinov@476: glossary.type.attribute? iinov@476: & lang.attribute? iinov@476: & langto.attribute? Coraline@419: glossary.type.attribute = attribute type { xsd:NCName } Coraline@419: langto.attribute = attribute langto { xsd:language } Coraline@419: Coraline@419: glossary.content = iinov@476: glossary.entry+ Coraline@419: Coraline@419: patrick@0: # ============================================================================= iinov@476: # DIVISION patrick@0: # ============================================================================= patrick@0: Patrick@310: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ division.head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@310: Patrick@310: division.head = element head { division.head.content } Patrick@310: Patrick@310: division.head.content = iinov@476: (title & shorttitle? & subtitle*)? iinov@476: & indexset? iinov@476: & abstract? iinov@476: & annotation? Patrick@310: patrick@70: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ division ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: Patrick@232: division = element division { division.attributes, division.content } Patrick@232: Patrick@232: division.attributes = iinov@476: division.type.attribute? Patrick@232: division.type.attribute = attribute type { xsd:NCName } patrick@0: patrick@0: division.content = iinov@476: division.head?, iinov@476: front?, iinov@476: (division | document.topic)+ patrick@0: Patrick@310: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ front ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@90: Patrick@217: front = element front { front.content } Patrick@217: Patrick@217: front.content = iinov@476: section+ Patrick@217: patrick@0: patrick@0: # ============================================================================= iinov@476: # COMPONENTS patrick@0: # ============================================================================= patrick@0: iinov@476: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ component.head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@90: iinov@476: # ~~~~~~ component.head iinov@476: component.head = element head { document.head.content } patrick@90: iinov@476: # ~~~~~~ document.component.head iinov@476: document.component.head = element head { document.component.head.content } iinov@476: iinov@476: document.component.head.content = iinov@476: (title & shorttitle? & subtitle*)? iinov@476: & contributors? iinov@476: & date? iinov@476: & place? iinov@476: & keywordset? iinov@476: & subjectset? iinov@476: & indexset? iinov@476: & abstract? iinov@476: & annotation? patrick@90: patrick@0: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ topic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@0: topic = element topic { topic.attributes, topic.content } iinov@476: document.topic = iinov@476: element topic { document.topic.attributes, document.topic.content } patrick@0: patrick@0: topic.attributes = iinov@476: topic.id.attribute? iinov@476: & topic.type.attribute? iinov@476: & lang.attribute? iinov@476: document.topic.attributes = iinov@476: (topic.id.attribute | xmlid.attribute)? iinov@476: & topic.type.attribute? iinov@476: & lang.attribute? iinov@476: topic.id.attribute = attribute id { xsd:NMTOKEN } iinov@476: topic.type.attribute = attribute type { xsd:NCName } Patrick@191: xmlid.attribute = attribute xml:id { xsd:ID } patrick@0: patrick@0: topic.content = iinov@476: component.head?, iinov@476: header?, iinov@476: ((section+, bibliography?) | bibliography), iinov@476: footer? iinov@476: document.topic.content = iinov@476: document.component.head?, iinov@476: header?, iinov@476: ((section+, bibliography?) | bibliography), iinov@476: footer? patrick@0: patrick@0: patrick@0: # ============================================================================= patrick@20: # SECTION LEVEL patrick@0: # ============================================================================= patrick@0: Patrick@310: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section.head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@310: Patrick@310: section.head = element head { section.head.content } Patrick@310: Patrick@310: section.head.content = iinov@476: (title & shorttitle? & subtitle*)? iinov@476: & keywordset? iinov@476: & subjectset? iinov@476: & indexset? iinov@476: & abstract? iinov@476: & audio* iinov@476: & annotation? Patrick@310: Patrick@137: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@137: Patrick@137: header = element header { header.content } Patrick@137: Patrick@137: header.content = iinov@476: block+ Patrick@137: patrick@20: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@58: section = element section { section.attributes, section.content } patrick@58: patrick@58: section.attributes = iinov@476: xmlid.attribute? iinov@476: & section.type.attribute? iinov@476: & lang.attribute? iinov@476: & for.attribute? patrick@58: section.type.attribute = attribute type { xsd:NCName } patrick@166: for.attribute = attribute for { xsd:NCName } patrick@0: patrick@0: section.content = iinov@476: section.head?, iinov@476: (section+ | block+) patrick@0: Patrick@189: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bibliography ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@189: Patrick@189: bibliography = element bibliography { bibliography.content } Patrick@189: Patrick@189: bibliography.content = iinov@476: bibliography.entry+ Patrick@189: Patrick@137: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ footer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@137: Patrick@137: footer = element footer { footer.content } Patrick@137: Patrick@137: footer.content = iinov@476: block+ Patrick@137: Coraline@419: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ glossary.entry ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@446: Coraline@419: # ~~~~~~ glossary.entry iinov@476: glossary.entry= iinov@476: element entry { glossary.entry.attributes, glossary.entry.content } Coraline@419: Coraline@419: glossary.entry.attributes = iinov@476: xmlid.attribute? Coraline@419: Coraline@419: glossary.entry.content = iinov@476: mainterm, iinov@476: alt-terms?, iinov@476: media?, iinov@476: meanings+, iinov@476: seealso* Coraline@419: Coraline@419: # ~~~~~~ mainterm Coraline@419: mainterm = element mainterm { mainterm.content } Patrick@446: Coraline@419: mainterm.content = simple.inlines patrick@0: Coraline@425: # ~~~~~~ alt-terms Coraline@425: alt-terms = element alt-terms { alt-terms.content } Patrick@446: Patrick@446: alt-terms.content = Patrick@446: alt-term+ Coraline@425: Coraline@425: # ~~~~~~ alt-term Coraline@426: alt-term = element alt-term { alt-term.attributes, alt-term.content } Patrick@446: Coraline@425: alt-term.content = inlines Coraline@425: Patrick@446: alt-term.attributes = Patrick@446: alt-term.type.attribute? Coraline@426: alt-term.type.attribute = attribute type { xsd:NCName } Coraline@426: Patrick@446: patrick@0: # ============================================================================= patrick@20: # BLOCK LEVEL patrick@0: # ============================================================================= patrick@0: Patrick@310: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block.head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@9: patrick@90: block.head = element head { block.head.content } patrick@90: patrick@90: block.head.content = iinov@476: (title & shorttitle? & subtitle*)? iinov@476: & indexset? iinov@476: & annotation? patrick@90: Patrick@310: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@310: Patrick@313: block = (p | \list | blockquote | speech | table | table.cals | media) Patrick@310: patrick@42: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@20: p = element p { p.content } patrick@0: patrick@20: p.content = iinov@476: inlines patrick@0: patrick@17: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@9: patrick@9: # ~~~~~~ list iinov@476: \list = iinov@476: element list { iinov@476: block.head?, iinov@481: ( (list.type.attribute?, item, item+) | iinov@476: (attribute type {"glossary"}, item.glossary+) ) } patrick@9: iinov@482: list.type.attribute = attribute type { "ordered" | "alpha" | "Alpha" } iinov@481: patrick@9: # ~~~~~~ item patrick@9: item = element item { item.content } patrick@9: patrick@30: item.content = iinov@476: inlines iinov@476: | block+ patrick@9: Coraline@419: # ~~~~~~ item.glossary Coraline@419: item.glossary = element item { item.glossary.content } patrick@9: Coraline@419: item.glossary.content = iinov@476: label, iinov@476: block+ patrick@9: patrick@44: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blockquote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@44: patrick@44: # ~~~~~~ blockquote Patrick@306: blockquote = element blockquote { blockquote.attributes, blockquote.content } patrick@44: Patrick@306: blockquote.attributes = iinov@476: blockquote.type.attribute? Patrick@306: blockquote.type.attribute = attribute type { xsd:NCName } Patrick@310: patrick@44: blockquote.content = iinov@476: block.head?, iinov@476: (p | speech | \list)+, iinov@476: attribution? patrick@44: patrick@44: # ~~~~~~ attribution patrick@72: attribution = element attribution { attribution.content } patrick@44: iinov@476: attribution.content = iinov@476: mixed { iinov@476: sup* & number* & date* & name* & foreign* & acronym* & term* & literal* iinov@476: & highlight* & emphasis* & mentioned* & note* & warning* } patrick@44: Patrick@313: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@313: Patrick@313: # ~~~~~~ speech Patrick@313: speech = element speech { speech.content } Patrick@313: Patrick@313: speech.content = iinov@476: speaker?, iinov@476: stage?, iinov@476: (p | blockquote)+ Patrick@313: Patrick@313: # ~~~~~~ speaker Patrick@313: speaker = element speaker { speaker.content } Patrick@313: Patrick@313: speaker.content = inlines Patrick@313: patrick@248: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@17: patrick@73: # ~~~~~~ table patrick@248: table = element table { table.attributes, table.content } patrick@248: patrick@248: table.attributes = iinov@476: table.type.attribute? patrick@248: table.type.attribute = attribute type { xsd:NCName } patrick@17: patrick@17: table.content = iinov@476: block.head?, iinov@476: ((thead?, tbody+) | tr+), iinov@476: table.caption? patrick@17: patrick@248: # ~~~~~~ thead, tbody patrick@248: thead = element thead { thead.content } patrick@248: tbody = element tbody { tbody.content } patrick@17: patrick@248: thead.content = iinov@476: tr+ patrick@248: tbody.content = iinov@476: tr+ patrick@17: patrick@248: # ~~~~~~ tr patrick@248: tr = element tr { tr.attributes, tr.content } patrick@248: patrick@248: tr.attributes = iinov@476: align.attribute? iinov@476: & valign.attribute? iinov@476: & cell.type.attribute? patrick@17: align.attribute = attribute align { "left" | "right" | "center" | "justify" } patrick@22: valign.attribute = attribute valign { "top" | "middle" | "bottom" } Tiphanie@309: cell.type.attribute = attribute type { xsd:NCName } patrick@75: patrick@248: tr.content = iinov@476: (td | th)+ patrick@17: patrick@248: # ~~~~~~ td, th patrick@248: td = element td { td.attributes, td.content } patrick@248: th = element th { td.attributes, td.content } patrick@17: patrick@248: td.attributes = iinov@476: align.attribute? iinov@476: & valign.attribute? iinov@476: & colspan.attribute? iinov@476: & rowspan.attribute? iinov@476: & cell.type.attribute? patrick@248: colspan.attribute = attribute colspan { xsd:positiveInteger } patrick@248: rowspan.attribute = attribute rowspan { xsd:positiveInteger } patrick@17: patrick@248: td.content = iinov@476: inlines iinov@476: | (p | media)+ patrick@17: patrick@109: # ~~~~~~ table.caption patrick@109: table.caption = element caption { caption.content } patrick@17: patrick@17: caption.content = iinov@476: inlines iinov@476: | (p | speech | \list | blockquote)+ patrick@17: patrick@248: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table.cals ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@248: patrick@248: # ~~~~~~ table.cals patrick@248: table.cals = element table { table.attributes, table.cals.content } patrick@248: patrick@248: table.cals.content = iinov@476: block.head?, iinov@476: tgroup+, iinov@476: table.caption? patrick@248: patrick@248: # ~~~~~~ tgroup patrick@248: tgroup = element tgroup { tgroup.attributes, tgroup.content } patrick@248: patrick@248: tgroup.attributes = iinov@476: cols.attribute patrick@248: cols.attribute = attribute cols { xsd:positiveInteger } patrick@248: patrick@248: tgroup.content = iinov@476: thead.cals?, iinov@476: tbody.cals patrick@248: patrick@248: # ~~~~~~ thead, tbody patrick@248: thead.cals = element thead { thead.cals.content } patrick@248: tbody.cals = element tbody { tbody.cals.content } patrick@248: patrick@248: thead.cals.content = iinov@476: row+ patrick@248: tbody.cals.content = iinov@476: row+ patrick@248: patrick@248: # ~~~~~~ row patrick@248: row = element row { row.attributes, row.content } patrick@248: patrick@248: row.attributes = iinov@476: valign.attribute? patrick@248: patrick@248: row.content = iinov@476: table.cals.entry+ patrick@248: patrick@248: # ~~~~~~ table.cals.entry iinov@476: table.cals.entry = iinov@476: element entry { table.cals.entry.attributes, table.cals.entry.content } patrick@248: patrick@248: table.cals.entry.attributes = iinov@476: align.attribute? iinov@476: & valign.attribute? patrick@248: patrick@248: table.cals.entry.content = iinov@476: inlines iinov@476: | (p | media)+ patrick@248: patrick@35: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@2: # ~~~~~~ media patrick@245: media = element media { media.attributes, media.content } patrick@245: patrick@245: media.attributes = iinov@476: xmlid.attribute? iinov@476: & media.type.attribute? patrick@245: media.type.attribute = attribute type { xsd:NCName } patrick@0: patrick@0: media.content = iinov@476: block.head?, iinov@476: (media.image | audio | video)+, iinov@476: media.caption?, iinov@476: link? patrick@0: patrick@2: # ~~~~~~ image Patrick@288: image = element image { image.attributes } Patrick@288: media.image = element image { image.attributes, media.image.content } patrick@0: patrick@0: image.attributes = iinov@476: media.id.attribute iinov@476: & image.type.attribute? iinov@476: & image.zoom.attribute? iinov@476: & alt.attribute? patrick@17: media.id.attribute = attribute id { xsd:NMTOKEN } iinov@476: image.type.attribute = iinov@476: attribute type { "cover" | "thumbnail" | "icon" | "animation" } Coraline@407: image.zoom.attribute = attribute zoom {"true" | "false"} Patrick@312: alt.attribute = attribute alt { text } patrick@0: Patrick@288: media.image.content = iinov@476: copyright?, iinov@476: hotspot* patrick@0: patrick@45: # ~~~~~~ audio patrick@45: audio = element audio { audio.attributes } patrick@43: patrick@45: audio.attributes = iinov@476: media.id.attribute iinov@476: & audio.type? iinov@476: audio.type = iinov@476: attribute type { "music" | "voice" | "en" | "fr" | "background" | "smil" } patrick@43: patrick@119: # ~~~~~~ video patrick@119: video = element video { video.attributes } patrick@119: patrick@119: video.attributes = iinov@476: media.id.attribute patrick@119: Coraline@433: # ~~~~~~ media.caption Coraline@433: media.caption = element caption { caption.attributes, caption.content } Coraline@433: Coraline@433: caption.attributes = iinov@476: x.attribute? iinov@476: & y.attribute? Coraline@433: patrick@122: # ~~~~~~ hotspot patrick@122: hotspot = element hotspot { hotspot.attributes, hotspot.content } patrick@122: patrick@122: hotspot.attributes = iinov@476: x.attribute iinov@476: & y.attribute iinov@476: & w.attribute iinov@476: & h.attribute? iinov@476: & hotspot.display.attribute? iinov@476: & hotspot.type.attribute? iinov@476: & xmlid.attribute? Patrick@173: x.attribute = attribute x { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } Patrick@173: y.attribute = attribute y { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } patrick@182: w.attribute = attribute w { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } patrick@182: h.attribute = attribute h { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } Patrick@236: hotspot.display.attribute = attribute display { "normal" | "visible" | "pulse" } Patrick@237: hotspot.type.attribute = attribute type { xsd:NCName } Patrick@310: Patrick@191: hotspot.content = iinov@476: ((link | p+ | image | audio | video), (spot, scenario?)?) iinov@476: | (spot, scenario?) iinov@476: | empty Patrick@310: Patrick@191: # ~~~~~~ spot Patrick@191: spot = element spot { spot.attributes, spot.content } Patrick@191: Patrick@191: spot.attributes = iinov@476: dx.attribute? iinov@476: & dy.attribute? iinov@476: & dw.attribute? iinov@476: & dh.attribute? patrick@188: dx.attribute = attribute dx { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} } patrick@188: dy.attribute = attribute dy { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} } Patrick@191: dw.attribute = attribute dw { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} } Patrick@191: dh.attribute = attribute dh { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} } Patrick@191: Patrick@191: spot.content = iinov@476: ((p+ | image), audio?) iinov@476: | audio iinov@476: | video Patrick@191: Patrick@191: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ scenario ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@191: Patrick@191: # ~~~~~~ scenario Patrick@191: scenario = element scenario { scenario.content } Patrick@191: Patrick@191: scenario.content = iinov@476: init*, iinov@476: onclick* Patrick@191: Patrick@191: # ~~~~~~ init Patrick@191: init = element init { init.attributes } Patrick@191: Patrick@191: init.attributes = iinov@476: init.action.attribute iinov@476: & target.attribute? Patrick@191: init.action.attribute = attribute action { "hide" } Patrick@191: target.attribute = attribute target { "hotspot" | "spot" } Patrick@191: Patrick@191: # ~~~~~~ onclick Patrick@191: onclick = element onclick { onclick.attributes } Patrick@191: Patrick@191: onclick.attributes = iinov@476: onclick.action.attribute iinov@476: & target.attribute? Patrick@191: onclick.action.attribute = attribute action { "show" } Patrick@191: Patrick@397: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bibliography.entry ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@189: Patrick@189: # ~~~~~~ bibliography.entry Patrick@189: bibliography.entry = element entry { bibliography.entry.content } Patrick@189: Patrick@189: bibliography.entry.content = iinov@476: identifier.ean? iinov@476: & title iinov@476: & subtitle? iinov@476: & copyright? iinov@476: & collection? iinov@476: & contributors? iinov@476: & date? iinov@476: & place? iinov@476: & folio? iinov@476: & pages? Patrick@189: Patrick@189: # ~~~~~~ folio Patrick@189: folio = element folio { folio.content } Patrick@189: Patrick@189: folio.content = xsd:positiveInteger | xsd:token {pattern = "[DLXVI]+"} Patrick@189: Patrick@189: # ~~~~~~ pages Patrick@189: pages = element pages { pages.content } Patrick@189: Patrick@189: pages.content = xsd:positiveInteger Patrick@189: Coraline@419: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ meanings ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Coraline@419: Coraline@419: # ~~~~~~ meanings Coraline@419: meanings = element meanings { meanings.attributes, meanings.content } Coraline@419: Coraline@419: meanings.attributes = iinov@476: gramcode.attribute? Coraline@419: gramcode.attribute = attribute gramcode { xsd:NMTOKEN } Coraline@419: Coraline@419: meanings.content = iinov@476: meaning+ Coraline@419: Coraline@419: # ~~~~~~ meaning Coraline@419: meaning = element meaning { meaning.attributes, meaning.content } Coraline@419: Coraline@419: meaning.attributes = iinov@476: meaning.domain.attribute? iinov@476: & langlevel.attribute? Coraline@419: meaning.domain.attribute = attribute domain { xsd:NMTOKEN } Coraline@419: langlevel.attribute = attribute langlevel { xsd:NMTOKEN } Coraline@419: Coraline@419: meaning.content = iinov@476: ((definition, example*, synonym*, antonym*, translation*) Coraline@419: | (definition?, example*, synonym*, antonym*, translation+) Coraline@419: | (definition?, example*, synonym+, antonym*, translation*) Coraline@419: | (definition?, example*, synonym*, antonym+, translation*)), iinov@476: dictum* Coraline@419: Coraline@419: # ~~~~~~ definition Coraline@419: definition = element definition { inlines } Coraline@419: Coraline@419: # ~~~~~~ synonym, antonym Coraline@419: synonym = element synonym { simple.inlines } Coraline@419: antonym = element antonym { simple.inlines } Coraline@419: Coraline@419: # ~~~~~~ translation Coraline@419: translation = element translation { simple.inlines } Coraline@419: Coraline@419: # ~~~~~~ dictum Coraline@423: dictum = element dictum { dictum.content } Coraline@423: dictum.content = p+ Coraline@419: Coraline@419: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ seealso ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Coraline@419: Coraline@419: seealso = element seealso { seealso.attributes } Coraline@419: Coraline@419: seealso.attributes = iinov@476: gloss.ref.attribute Coraline@419: patrick@0: patrick@0: # ============================================================================= patrick@20: # INLINE LEVEL patrick@0: # ============================================================================= patrick@0: patrick@0: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: iinov@476: simple.inlines = iinov@476: mixed { iinov@476: sup* & sub* iinov@476: & var* iinov@476: & number* iinov@476: & acronym* iinov@476: & warning* iinov@476: } Patrick@288: iinov@476: inlines = iinov@476: mixed { iinov@476: sup* & sub* iinov@476: & var* iinov@476: & number* iinov@476: & acronym* iinov@476: & warning* Patrick@293: iinov@476: & highlight* iinov@476: & emphasis* iinov@476: & mentioned* iinov@476: & literal* iinov@476: & term* iinov@476: & example* iinov@476: & stage* iinov@476: & name* iinov@476: & foreign* iinov@476: & date* iinov@476: & math* iinov@476: & quote* iinov@476: & initial* iinov@476: & note* iinov@476: & link* iinov@476: & anchor* iinov@476: & index* iinov@476: & gloss* iinov@476: & image* iinov@476: & audio* iinov@476: & smil* Patrick@446: iinov@476: & nowrap* iinov@476: } patrick@0: patrick@42: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup, var ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@0: patrick@252: sup = element sup { mixed { var* & warning* } } patrick@0: patrick@252: sub = element sub { mixed { var* & warning* } } patrick@42: Patrick@225: var = element var { mixed { warning* } } patrick@42: patrick@90: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@90: iinov@476: number = iinov@476: element number { iinov@476: ( attribute type {"roman"}, number.attributes, number.roman.content ) | iinov@476: ( number.attributes, number.content) iinov@476: } patrick@90: patrick@90: number.attributes = iinov@476: number.value.attribute? patrick@90: number.value.attribute = attribute value { xsd:integer | xsd:decimal } patrick@90: Patrick@212: number.content = mixed { sup* & warning* } patrick@246: number.roman.content = xsd:token {pattern = "[MCLXVI]+"} patrick@90: Patrick@350: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ acronym ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@350: Patrick@350: acronym = element acronym { acronym.content } Patrick@350: Patrick@350: acronym.content = mixed { sup* & warning* } Patrick@350: Patrick@350: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@350: Patrick@350: highlight = element highlight { highlight.content } Patrick@350: Patrick@350: highlight.content = inlines Patrick@350: Patrick@350: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ emphasis ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@350: Patrick@350: emphasis = element emphasis { emphasis.content } Patrick@350: Patrick@350: emphasis.content = inlines Patrick@350: Patrick@350: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@350: Patrick@350: mentioned = element mentioned { mentioned.content } Patrick@350: Patrick@350: mentioned.content = inlines Patrick@350: Patrick@350: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ literal ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@350: Patrick@350: literal = element literal { literal.content } Patrick@350: Patrick@350: literal.content = inlines Patrick@350: Patrick@350: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@350: Patrick@350: term = element term { term.content } Patrick@350: Patrick@350: term.content = mixed { sup* & warning* } Patrick@350: Coraline@419: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ example ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Coraline@419: Coraline@419: example = element example { example.content } Patrick@446: Coraline@419: example.content = inlines Coraline@419: Patrick@350: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ stage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@350: Patrick@350: stage = element stage { stage.content } Patrick@350: Patrick@350: stage.content = inlines Patrick@350: Patrick@350: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@350: Patrick@350: name = element name { name.attributes, name.content } Patrick@350: Patrick@350: name.attributes = iinov@476: name.of.attribute? iinov@476: name.of.attribute = iinov@476: attribute of { iinov@476: "person" | "company" | "book" | "newspaper" | "party" | "movie" iinov@476: | "painting" } Patrick@350: Patrick@350: name.content = mixed { sup* & number* & acronym* & warning* } Patrick@350: Patrick@350: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@350: Patrick@350: foreign = element foreign { foreign.attributes, foreign.content } Patrick@350: Patrick@350: foreign.attributes = iinov@476: lang.attribute? Patrick@350: Patrick@350: foreign.content = inlines Patrick@350: Patrick@350: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@350: Patrick@350: date = element date { date.attributes, date.content } Patrick@350: Patrick@350: date.attributes = iinov@476: date.value.attribute iinov@476: & date.of.attribute? Patrick@350: date.value.attribute = attribute value { xsd:date | xsd:gYearMonth | xsd:gYear } Patrick@350: date.of.attribute = attribute of { "birth" | "death" } Patrick@350: Patrick@350: date.content = mixed { sup* & number* & warning* } Patrick@350: patrick@42: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ math ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@42: Patrick@274: # ~~~~~~ math Patrick@274: math = element math { math.attributes, math.content } patrick@42: patrick@42: math.attributes = iinov@476: xmlid.attribute? iinov@476: & math.display.attribute? iinov@476: & math.type.attribute? iinov@476: math.display.attribute = iinov@476: attribute display { "wide" | "numbered" | "box" | "numbered-box" } Patrick@435: math.type.attribute = attribute type { xsd:NCName } patrick@42: Patrick@274: math.content = iinov@476: mixed { sup* & sub* & var* & warning* } iinov@476: | (preambule?, latex) Patrick@274: Patrick@274: # ~~~~~~ latex Patrick@274: latex = element latex { latex.attributes, latex.content } Patrick@274: Patrick@274: latex.attributes = iinov@476: plain.attritute? Patrick@274: plain.attritute = attribute plain { xsd:boolean } Patrick@274: Patrick@274: latex.content = text patrick@0: iinov@460: # ~~~~~~ preambule iinov@460: preambule = element preambule { preambule.content } iinov@460: iinov@460: preambule.content = iinov@460: newcommand+ iinov@460: iinov@460: # ~~~~~~ newcommand iinov@460: newcommand = element newcommand { newcommand.attributes, newcommand.content } iinov@460: iinov@460: newcommand.attributes = iinov@460: newcommand.name.attribute iinov@460: newcommand.name.attribute = attribute name { xsd:NMTOKEN } iinov@460: iinov@460: newcommand.content = text iinov@460: patrick@36: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@5: patrick@5: quote = element quote { quote.content } patrick@5: patrick@131: quote.content = iinov@476: (phrase, attribution) | inlines patrick@131: patrick@131: phrase = element phrase { phrase.content } patrick@131: patrick@131: phrase.content = inlines patrick@5: Patrick@351: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ initial ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ patrick@105: Patrick@351: initial = element initial { initial.content } patrick@105: Patrick@351: initial.content = iinov@476: initial.c, iinov@476: initial.w? patrick@105: Patrick@351: initial.c = element c { text } Patrick@351: initial.w = element w { inlines } Patrick@205: Patrick@288: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@288: Patrick@288: note = element note { note.attributes, note.content } Patrick@288: Patrick@288: note.attributes = iinov@476: note.label.attribute? Patrick@288: note.label.attribute = attribute label { text } Patrick@288: Patrick@288: note.content = iinov@476: (note.w?, block+) iinov@476: | inlines Patrick@288: Patrick@288: note.w = element w { inlines } Patrick@288: Patrick@288: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@288: Patrick@288: link = element link { link.attributes, link.content } Patrick@288: Patrick@288: link.attributes = iinov@476: (uri.attribute | idref.attribute) Patrick@288: uri.attribute = attribute uri { xsd:anyURI } Patrick@288: idref.attribute = attribute idref { xsd:IDREF } Patrick@288: Patrick@288: link.content = simple.inlines Patrick@288: Patrick@288: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ anchor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@288: Patrick@288: anchor = element anchor { anchor.attributes, anchor.content } Patrick@288: Patrick@288: anchor.attributes = iinov@476: anchor.id.attribute Patrick@288: anchor.id.attribute = attribute xml:id { xsd:ID } Patrick@288: Patrick@288: anchor.content = simple.inlines Patrick@288: Coraline@419: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gloss ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Coraline@419: Coraline@419: gloss = element gloss { gloss.attributes, gloss.content } Coraline@419: Coraline@419: gloss.attributes = iinov@476: gloss.ref.attribute Coraline@419: gloss.ref.attribute = attribute ref { xsd:NCName } Coraline@419: Coraline@419: gloss.content = simple.inlines Coraline@419: Patrick@351: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ smil ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@351: Patrick@351: smil = element smil { smil.attributes, smil.content } Patrick@351: Patrick@351: smil.attributes = iinov@476: audio.attribute? iinov@476: & begin.attribute? iinov@476: & end.attribute? Patrick@351: audio.attribute = attribute audio { xsd:anyURI } Patrick@351: begin.attribute = attribute begin { xsd:decimal } Patrick@351: end.attribute = attribute end { xsd:decimal } Patrick@351: Patrick@351: smil.content = inlines Patrick@351: Coraline@436: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ nowrap ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Coraline@436: Coraline@436: nowrap = element nowrap { nowrap.content } Coraline@436: Coraline@436: nowrap.content = inlines Coraline@436: Patrick@205: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick@205: Patrick@285: warning = element warning { warning.attributes, warning.content } Patrick@285: Patrick@285: warning.attributes = iinov@476: warning.type.attribute? Patrick@285: warning.type.attribute = attribute type { xsd:NCName } Patrick@205: Patrick@231: warning.content = inlines