diff -r 1d4ee28efd68 -r 1efd69b7c90e RelaxNG/publidoc.rnc --- a/RelaxNG/publidoc.rnc ven. juin 10 16:35:10 2011 +0200 +++ b/RelaxNG/publidoc.rnc sam. juin 11 00:27:50 2011 +0200 @@ -205,8 +205,7 @@ section.content = metadata?, - (section+ - | (parag | media | speech)+) + (section+ | block+) section.attributes = status.attribute? @@ -217,7 +216,11 @@ # Block level # ============================================================================= -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ parag ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blocks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +block = (parag | \list | media | speech) + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ parag ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ parag = element parag { parag.content } @@ -225,6 +228,34 @@ inlines & link* +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# ~~~~~~ list +\list = element list { \list.content } + +\list.content = + title?, + ( (attribute type {"ordered"} ?, item, item+) + | (attribute type {"itemized"}, item, item+) + | (attribute type {"glossary"}, glossary.item+) ) + +# ~~~~~~ item +item = element item { item.content } + +item.content = block+ + +# ~~~~~~ glossary.item +glossary.item = element item { glossary.item.content } + +glossary.item.content = + label, + block+ + +# ~~~~~~ label +label = element label { label.content } + +label.content = inlines + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~ media @@ -346,7 +377,8 @@ foreign = element foreign { foreign.attributes, foreign.content } -foreign.attributes = lang.attribute? +foreign.attributes = + lang.attribute? foreign.content = inlines @@ -384,6 +416,9 @@ link = element link { link.attributes, link.content } -link.attributes = empty +link.attributes = + (uri.attribute | idref.attribute)? +uri.attribute = attribute uri { xsd:anyURI } +idref.attribute = attribute idref { xsd:IDREF } link.content = inlines