# HG changeset patch # User Patrick PIERRE # Date 1400131259 -7200 # Node ID e4f154ea2837f62a82fcb688d49f03af55ca7936 # Parent 7f6b762880b4964d55ef3e2cb14b96afb5c2cd6b Présence de blanks, right et wrong dans les légendes, les citations et les discours diff -r 7f6b762880b4 -r e4f154ea2837 RelaxNG/publidoc.rnc --- a/RelaxNG/publidoc.rnc mar. mai 13 12:59:42 2014 +0200 +++ b/RelaxNG/publidoc.rnc jeu. mai 15 07:20:59 2014 +0200 @@ -381,7 +381,7 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -block = (p | speech | \list | blockquote | table | table.cals | media) +block = (p | \list | blockquote | speech | table | table.cals | media) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -390,21 +390,6 @@ p.content = inlines -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# ~~~~~~ speech -speech = element speech { speech.content } - -speech.content = - speaker?, - stage?, - (p | blockquote)+ - -# ~~~~~~ speaker -speaker = element speaker { speaker.content } - -speaker.content = inlines - # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~ list @@ -449,6 +434,21 @@ sup* & number* & date* & name* & foreign* & acronym* & term* & literal* & highlight* & emphasis* & mentioned* & note* & warning* } +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# ~~~~~~ speech +speech = element speech { speech.content } + +speech.content = + speaker?, + stage?, + (p | blockquote)+ + +# ~~~~~~ speaker +speaker = element speaker { speaker.content } + +speaker.content = inlines + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~ table diff -r 7f6b762880b4 -r e4f154ea2837 RelaxNG/publiquiz.rnc --- a/RelaxNG/publiquiz.rnc mar. mai 13 12:59:42 2014 +0200 +++ b/RelaxNG/publiquiz.rnc jeu. mai 15 07:20:59 2014 +0200 @@ -274,10 +274,11 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -blanks.block = - (blanks.p | speech | blanks.list | blockquote | blanks.table | blanks.media) -point.block = - (point.p | speech | point.list | blockquote | point.table | media) +blanks.block = ( + blanks.p | blanks.list | blanks.blockquote | blanks.speech | blanks.table + | blanks.media) +point.block = ( + point.p | point.list | point.blockquote | point.speech | point.table | media) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -314,8 +315,47 @@ point.inlines | point.block+ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blockquote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +blanks.blockquote = element blockquote { + blockquote.attributes, blanks.blockquote.content } +point.blockquote = element blockquote { + blockquote.attributes, point.blockquote.content } + +blanks.blockquote.content = + block.head?, + (blanks.p | speech | blanks.list)+, + attribution? +point.blockquote.content = + block.head?, + (point.p | speech | point.list)+, + attribution? + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# ~~~~~~ speech +blanks.speech = element speech { blanks.speech.content } +point.speech = element speech { point.speech.content } + +blanks.speech.content = + blanks.speaker?, + stage?, + (blanks.p | blanks.blockquote)+ +point.speech.content = + point.speaker?, + stage?, + (point.p | point.blockquote)+ + +# ~~~~~~ speaker +blanks.speaker = element speaker { blanks.speaker.content } +point.speaker = element speaker { point.speaker.content } + +blanks.speaker.content = blanks.inlines +point.speaker.content = point.inlines + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~ table blanks.table = element table { table.attributes, blanks.table.content } point.table = element table { table.attributes, point.table.content } @@ -323,11 +363,11 @@ block.head?, thead?, (blanks.tbody+ | blanks.tr+), - table.caption? + blanks.table.caption? point.table.content = block.head?, (point.tbody+ | point.tr+), - table.caption? + point.table.caption? # ~~~~~~ tbody blanks.tbody = element tbody { blanks.tbody.content } @@ -355,21 +395,38 @@ blanks.td.content = blanks.inlines - | (p | media)+ + | (blanks.p | blanks.media)+ point.td.content = point.inlines - | (p | media)+ + | (point.p | media)+ + +# ~~~~~~ table.caption +blanks.table.caption = element caption { blanks.caption.content } +point.table.caption = element caption { point.caption.content } + +blanks.caption.content = + blanks.inlines + | (blanks.p | speech | blanks.list | blockquote)+ +point.caption.content = + point.inlines + | (point.p | speech | point.list | blockquote)+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# ~~~~~~ blanks.media -blanks.media = element media { media.attributes, blanksmedia.content } +# ~~~~~~ media +blanks.media = element media { media.attributes, blanks.media.content } +point.media = element media { media.attributes, point.media.content } -blanksmedia.content = +blanks.media.content = block.head?, (blanks.image | audio | video)+, - media.caption?, + blanks.media.caption?, + link? +point.media.content = + block.head?, + (image | audio | video)+, + point.media.caption?, link? # ~~~~~~ blanks.image @@ -382,7 +439,7 @@ pip.image.content = pip.dropzone+ -# ~~~~~~dropzone +# ~~~~~~ dropzone blanks.dropzone = element dropzone { blanks.dropzone.attributes, blanks.dropzone.content } pip.dropzone = element dropzone { @@ -402,6 +459,12 @@ pip.dropzone.content = image? +# ~~~~~~ media.caption +blanks.media.caption = element caption { + caption.attributes, blanks.caption.content } +point.media.caption = element caption { + caption.attributes, point.caption.content } + # ~~~~~~~~~~~~~~~~~~~~~~~~ choices.right, choices.wrong ~~~~~~~~~~~~~~~~~~~~~~~ choices.right = element right { choices.right.content } @@ -424,7 +487,7 @@ blanks.wrong.content = text -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (match) item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ match.item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ match.item = element item { match.item.content } @@ -432,7 +495,7 @@ inlines | ((p | image | (audio, image?) | video), help?, answer?) -# ~~~~~~~~~~~~~~~~~~~~~~~~ (sort) comparison, item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~~~~~~~~~~~~~~~~~~~ comparison, sort.item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~ comparison comparison = element comparison { comparison.content } @@ -450,7 +513,7 @@ inlines | ((p | image | (audio, image?) | video), help?, answer?) -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (category) item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ category.item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ category.item = element item { category.item.content } diff -r 7f6b762880b4 -r e4f154ea2837 RelaxNG/publiset.rnc --- a/RelaxNG/publiset.rnc mar. mai 13 12:59:42 2014 +0200 +++ b/RelaxNG/publiset.rnc jeu. mai 15 07:20:59 2014 +0200 @@ -16,7 +16,6 @@ (composition | selection)+ - # ============================================================================= # HEAD LEVEL # =============================================================================