# HG changeset patch # User Patrick PIERRE # Date 1307881687 -7200 # Node ID 7141fd097b973d41401f98dc26a4f17e6b77e3e5 # Parent e448c6a000e50b41262104b62e8489dd3d9e7163# Parent afd2fe442c652fb2c9b04637a314476e0735e5e4 Merge diff -r afd2fe442c65 -r 7141fd097b97 RelaxNG/publidoc.rnc --- a/RelaxNG/publidoc.rnc sam. juin 11 20:34:05 2011 +0200 +++ b/RelaxNG/publidoc.rnc dim. juin 12 14:28:07 2011 +0200 @@ -30,12 +30,12 @@ document.id.attribute = attribute xml:id { xsd:ID } document.content = - metadata?, + top.metadata?, (division+ | topic+) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ topic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -top.topic = element topic { top.topic.attributes, topic.content } +top.topic = element topic { top.topic.attributes, top.topic.content } # ============================================================================= @@ -44,28 +44,49 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -metadata = element metadata { metadata.content } +top.metadata = element metadata { top.metadata.content } +division.metadata = element metadata { division.metadata.content } +component.metadata = element metadata { component.metadata.content } +section.metadata = element metadata { section.metadata.content } -metadata.content = - title - & subtitle? +top.metadata.content = + (title, subtitle?)? + & language? & author* & publisher? - & language? & date? & place? & source* & subjectset? & abstract? & annotation* +division.metadata.content = + (title, subtitle?)? + & language? + & annotation* +component.metadata.content = + (title, subtitle?)? + & language? + & author* + & annotation* +section.metadata.content = + (title, subtitle?)? + & language? + & annotation* # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title = element title { title.content } +subtitle = element subtitle { title.content } title.content = inlines -subtitle = element subtitle { title.content } +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +language = element language { language.attributes } + +language.attributes = lang.attribute +lang.attribute = attribute xml:lang { xsd:language } # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ author, publisher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -91,13 +112,6 @@ lastname.content = inlines -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -language = element language { language.attributes } - -language.attributes = lang.attribute -lang.attribute = attribute xml:lang { xsd:language } - # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place = element place { place.content } @@ -169,7 +183,7 @@ division = element division { division.content } division.content = - metadata?, + division.metadata?, (division+ | topic+) @@ -190,8 +204,11 @@ topic.id.attribute = attribute xml:id { xsd:ID } topic.type.attribute = attribute type { xsd:NCName } +top.topic.content = + top.metadata?, + section+ topic.content = - metadata?, + component.metadata?, section+ @@ -204,7 +221,7 @@ section = element section { section.content, section.attributes } section.content = - metadata?, + section.metadata?, (section+ | block+) section.attributes = @@ -216,9 +233,9 @@ # Block level # ============================================================================= -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blocks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -block = (parag | \list | speech | media) +block = (parag | speech | \list | table | media) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ parag ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -228,7 +245,27 @@ inlines & link* -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# ~~~~~~ speech +speech = element speech { speech.content } + +speech.content = + speaker?, + stage?, + parag+ + +# ~~~~~~ speaker +speaker = element speaker { speaker.content } + +speaker.content = inlines + +# ~~~~~~ stage +stage = element stage { stage.content } + +stage.content = inlines + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~ list \list = element list { \list.content } @@ -255,26 +292,68 @@ label.content = inlines -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# ~~~~~~ speech -speech = element speech { speech.content } +table = element table { table.content } -speech.content = - speaker?, - stage?, +table.content = + title?, + tgroup+, + caption? + +# ~~~~~~ tgroup +tgroup = element tgroup { tgroup.attributes, tgroup.content } + +tgroup.content = + thead?, + tfoot?, + tbody + +tgroup.attributes = + cols.attribute + & align.attribute? + & colsep.attribute? + & rowsep.attribute? +cols.attribute = attribute cols { xsd:positiveInteger } +align.attribute = attribute align { "left" | "right" | "center" | "justify" } +colsep.attribute = attribute colsep { "0" | "1" } +rowsep.attribute = attribute rowsep { "0" | "1" } + +# ~~~~~~ thead, tfoot, tbody +thead = element thead { thead.content } +tfoot = element tfoot { tfoot.content } +tbody = element tbody { tbody.content } + +thead.content = + row+ +tfoot.content = + row+ +tbody.content = + row+ + +# ~~~~~~ row +row = element row { row.attribute, row.content } + +row.attribute = + valign.attribute? +valign.attribute = attribute valign { "top" | "middle" | "bottom" } + +row.content = + entry+ + +# ~~~~~~ entry +entry = element entry { entry.content } + +entry.content = + inlines + | parag+ + +# ~~~~~~ caption +caption = element caption { caption.content } + +caption.content = parag+ -# ~~~~~~ speaker -speaker = element speaker { speaker.content } - -speaker.content = inlines - -# ~~~~~~ stage -stage = element stage { stage.content } - -stage.content = inlines - # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~ media @@ -282,25 +361,18 @@ media.content = image+, - media.caption? - -media.id.attribute = attribute id { xsd:NMTOKEN } + caption? # ~~~~~~ image image = element image { image.attributes, image.content } image.attributes = media.id.attribute +media.id.attribute = attribute id { xsd:NMTOKEN } image.content = copyright? -# ~~~~~~ caption -media.caption = element caption { media.caption.content } - -media.caption.content = - parag+ - # ~~~~~~ copyright copyright = element copyright { copyright.content } @@ -381,7 +453,8 @@ note.label.attribute = attribute label { text } note.content = - parag+ + inlines + | parag+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff -r afd2fe442c65 -r 7141fd097b97 RelaxNG/publidoc.rng --- a/RelaxNG/publidoc.rng sam. juin 11 20:34:05 2011 +0200 +++ b/RelaxNG/publidoc.rng dim. juin 12 14:28:07 2011 +0200 @@ -400,11 +400,12 @@ Block level ============================================================================= --> - + + @@ -423,7 +424,7 @@ - + @@ -488,6 +489,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + left + right + center + justify + + + + + + + 0 + 1 + + + + + + + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + top + middle + bottom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -536,14 +697,9 @@ - + - - - - - @@ -554,22 +710,16 @@ + + + + + - - - - - - - - - - - @@ -768,9 +918,12 @@ - - - + + + + + + diff -r afd2fe442c65 -r 7141fd097b97 RelaxNG/publiset.rnc --- a/RelaxNG/publiset.rnc sam. juin 11 20:34:05 2011 +0200 +++ b/RelaxNG/publiset.rnc dim. juin 12 14:28:07 2011 +0200 @@ -70,20 +70,25 @@ remap.attributes metadata.content = - title? - & subtitle? + (title, subtitle?)? + & language? & author* & publisher? - & language? & source? # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title = element title { title.content } +subtitle = element subtitle { title.content } title.content = inlines -subtitle = element subtitle { title.content } +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +language = element language { language.attributes } + +language.attributes = lang.attribute +lang.attribute = attribute xml:lang { xsd:language } # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ author, publisher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -109,13 +114,6 @@ lastname.content = inlines -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -language = element language { language.attributes } - -language.attributes = lang.attribute -lang.attribute = attribute xml:lang { xsd:language } - # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~ source diff -r afd2fe442c65 -r 7141fd097b97 Xml/Documents/demi-douce.xml --- a/Xml/Documents/demi-douce.xml sam. juin 11 20:34:05 2011 +0200 +++ b/Xml/Documents/demi-douce.xml dim. juin 12 14:28:07 2011 +0200 @@ -5,11 +5,11 @@ La demi-douce Récit + HenriOstrowiecki Les éditions des Rosiers - C'est l'histoire d'un petit garçon qui faillit ne jamais avoir 5 ans diff -r afd2fe442c65 -r 7141fd097b97 Xml/Documents/torture_test.xml --- a/Xml/Documents/torture_test.xml sam. juin 11 20:34:05 2011 +0200 +++ b/Xml/Documents/torture_test.xml dim. juin 12 14:28:07 2011 +0200 @@ -44,9 +44,6 @@ Les misérables Extrait - - VictorHUGO - Cosette et Marius tombèrent à genoux, éperdus, étouffés de larmes, @@ -69,6 +66,34 @@ + Les dialogues + +
+ + Cyrano de Bergerac + Extrait + + + Le fâcheux + + Quoi, pas un grand seigneur pour couvrir de son nom ?… + + + + Cyrano + agacé + + Non, ai-je dit deux fois. Faut-il donc que je trisse ?… + + + Non, pas de protecteur…mais une protectrice ! + + +
+
+ + + Les listes
@@ -140,7 +165,7 @@ Les tableaux - +
@@ -164,40 +189,15 @@ +
+ Légende du tableau +
- Les dialogues - -
- - Cyrano de Bergerac - Extrait - - - Le fâcheux - - Quoi, pas un grand seigneur pour couvrir de son nom ?… - - - - Cyrano - agacé - - Non, ai-je dit deux fois. Faut-il donc que je trisse ?… - - - Non, pas de protecteur…mais une protectrice ! - - -
-
- - - Les medias