# HG changeset patch # User Patrick PIERRE # Date 1416501420 -3600 # Node ID 58bbf6bb79e26c7e3f8f7b70bbce7761485dfa44 # Parent 79795b5c4684b18205b810204409787fac9ef0e8 Simplification de simple.inline diff -r 79795b5c4684 -r 58bbf6bb79e2 RelaxNG/publidoc.rnc --- a/RelaxNG/publidoc.rnc jeu. nov. 20 09:26:29 2014 +0100 +++ b/RelaxNG/publidoc.rnc jeu. nov. 20 17:37:00 2014 +0100 @@ -72,19 +72,17 @@ contributor.content = identifier.uri?, - (((firstname, secondname?)?, lastname) | label), + ((firstname?, lastname) | label), address?, link?, role+ # ~~~~~~ firstname, secondname, lastname, label firstname = element firstname { firstname.content } -secondname = element secondname { secondname.content } lastname = element lastname { lastname.content } label = element label { label.content } firstname.content = simple.inlines -secondname.content = simple.inlines lastname.content = simple.inlines label.content = simple.inlines @@ -722,11 +720,7 @@ & sub* & var* & number* - & math* - & date* - & name* & acronym* - & term* & warning* } @@ -735,19 +729,19 @@ & sub* & var* & number* - & math* - & date* - & name* & acronym* - & term* & warning* - & literal* - & foreign* & highlight* & emphasis* & mentioned* + & literal* + & term* & stage* + & name* + & foreign* + & date* + & math* & initial* & quote* & image* @@ -781,6 +775,81 @@ number.content = mixed { sup* & warning* } number.roman.content = xsd:token {pattern = "[MCLXVI]+"} +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ acronym ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +acronym = element acronym { acronym.content } + +acronym.content = mixed { sup* & warning* } + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +highlight = element highlight { highlight.content } + +highlight.content = inlines + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ emphasis ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +emphasis = element emphasis { emphasis.content } + +emphasis.content = inlines + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +mentioned = element mentioned { mentioned.content } + +mentioned.content = inlines + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ literal ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +literal = element literal { literal.content } + +literal.content = inlines + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +term = element term { term.content } + +term.content = mixed { sup* & warning* } + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ stage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +stage = element stage { stage.content } + +stage.content = inlines + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +name = element name { name.attributes, name.content } + +name.attributes = + name.of.attribute? +name.of.attribute = attribute of { + "person" | "company" | "book" | "newspaper" | "party" | "movie" + | "painting" } + +name.content = mixed { sup* & number* & acronym* & warning* } + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +foreign = element foreign { foreign.attributes, foreign.content } + +foreign.attributes = + lang.attribute? + +foreign.content = inlines + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +date = element date { date.attributes, date.content } + +date.attributes = + date.value.attribute + & date.of.attribute? +date.value.attribute = attribute value { xsd:date | xsd:gYearMonth | xsd:gYear } +date.of.attribute = attribute of { "birth" | "death" } + +date.content = mixed { sup* & number* & warning* } + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ math ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~ math @@ -805,81 +874,6 @@ latex.content = text -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -date = element date { date.attributes, date.content } - -date.attributes = - date.value.attribute - & date.of.attribute? -date.value.attribute = attribute value { xsd:date | xsd:gYearMonth | xsd:gYear } -date.of.attribute = attribute of { "birth" | "death" } - -date.content = mixed { sup* & number* & warning* } - -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -name = element name { name.attributes, name.content } - -name.attributes = - name.of.attribute? -name.of.attribute = attribute of { - "person" | "company" | "book" | "newspaper" | "party" | "movie" - | "painting" } - -name.content = mixed { sup* & number* & acronym* & warning* } - -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ acronym ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -acronym = element acronym { acronym.content } - -acronym.content = mixed { sup* & warning* } - -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -term = element term { term.content } - -term.content = mixed { sup* & warning* } - -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ literal ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -literal = element literal { literal.content } - -literal.content = inlines - -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -foreign = element foreign { foreign.attributes, foreign.content } - -foreign.attributes = - lang.attribute? - -foreign.content = inlines - -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -highlight = element highlight { highlight.content } - -highlight.content = inlines - -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ emphasis ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -emphasis = element emphasis { emphasis.content } - -emphasis.content = inlines - -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -mentioned = element mentioned { mentioned.content } - -mentioned.content = inlines - -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ stage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -stage = element stage { stage.content } - -stage.content = inlines - # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ initial ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ initial = element initial { initial.content } diff -r 79795b5c4684 -r 58bbf6bb79e2 RelaxNG/publiquiz.rnc --- a/RelaxNG/publiquiz.rnc jeu. nov. 20 09:26:29 2014 +0100 +++ b/RelaxNG/publiquiz.rnc jeu. nov. 20 17:37:00 2014 +0100 @@ -569,19 +569,19 @@ & sub* & var* & number* - & math* - & date* - & name* & acronym* - & term* & warning* - & literal* - & foreign* & highlight* & emphasis* & mentioned* + & literal* + & term* & stage* + & name* + & foreign* + & date* + & math* & initial* & quote* & image* @@ -600,19 +600,19 @@ & sub* & var* & number* - & math* - & date* - & name* & acronym* - & term* & warning* - & literal* - & foreign* & highlight* & emphasis* & mentioned* + & literal* + & term* & stage* + & name* + & foreign* + & date* + & math* & initial* & quote* & image* diff -r 79795b5c4684 -r 58bbf6bb79e2 RelaxNG/publiset.rnc --- a/RelaxNG/publiset.rnc jeu. nov. 20 09:26:29 2014 +0100 +++ b/RelaxNG/publiset.rnc jeu. nov. 20 17:37:00 2014 +0100 @@ -114,7 +114,7 @@ & collection? & folio? & pages? - + source.content.file = identifier.uri @@ -309,7 +309,7 @@ selection.file.attributes = path.attribute? argument.attribute = attribute argument { text } - + file.content = xsd:anyURI @@ -334,18 +334,16 @@ simple.inlines = mixed { sup* & sub* - & date* - & name* } inlines = mixed { sup* & sub* - & date* - & name* & highlight* & emphasis* + & name* + & date* & link* } @@ -355,28 +353,6 @@ sub = element sub { inlines } -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -date = element date { date.attributes, date.content } - -date.attributes = - date.value.attribute -date.value.attribute = attribute value { xsd:date | xsd:gYearMonth | xsd:gYear } - -date.content = mixed { sup* } - -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -name = element name { name.attributes, name.content } - -name.attributes = - name.of.attribute? -name.of.attribute = attribute of { - "person" | "company" | "book" | "newspaper" | "party" | "painting" - | "movie" } - -name.content = mixed { sup* } - # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight = element highlight { highlight.content } @@ -389,6 +365,28 @@ emphasis.content = inlines +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +name = element name { name.attributes, name.content } + +name.attributes = + name.of.attribute? +name.of.attribute = attribute of { + "person" | "company" | "book" | "newspaper" | "party" | "movie" + | "painting" } + +name.content = mixed { sup* } + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +date = element date { date.attributes, date.content } + +date.attributes = + date.value.attribute +date.value.attribute = attribute value { xsd:date | xsd:gYearMonth | xsd:gYear } + +date.content = mixed { sup* } + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link = element link { link.attributes, link.content }