diff -r 2885b2c3ff59 -r 846ec40a5b2d RelaxNG/publidoc.rnc --- a/RelaxNG/publidoc.rnc sam. juin 11 12:43:52 2011 +0200 +++ b/RelaxNG/publidoc.rnc sam. juin 11 12:44:21 2011 +0200 @@ -235,8 +235,7 @@ \list.content = title?, - ( (attribute type {"itemized"} ?, item, item+) - | (attribute type {"ordered"}, item, item+) + ( (attribute type {"ordered"} ?, item, item+) | (attribute type {"glossary"}, glossary.item+) ) # ~~~~~~ item @@ -256,7 +255,7 @@ label.content = inlines -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~ speech speech = element speech { speech.content } @@ -317,7 +316,7 @@ inlines = mixed { sup* & sub* - & romannum* + & number* & date* & name* & note* @@ -335,20 +334,32 @@ sub = element sub { inlines } -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ romannum ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -romannum = element romannum { xsd:token {pattern = "([dlxvi]+)"} } +number = element number { + ( attribute type {"roman"}, number.attributes, number.roman.content ) + | ( number.attributes, number.content) +} + +number.attributes = + number.value.attribute? +number.value.attribute = attribute value { xsd:integer | xsd:decimal } + +number.content = mixed { sup* } +number.roman.content = xsd:token {pattern = "[dlxvi]+"} # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date = element date { date.attributes, date.content } date.attributes = - date.of.attribute? + date.value.attribute + & date.of.attribute? +date.value.attribute = attribute value { xsd:date | xsd:gYearMonth | xsd:gYear } date.of.attribute = attribute of { date.of.enumeration } -date.of.enumeration = "event" | "birth" | "death" +date.of.enumeration = "birth" | "death" -date.content = xsd:date | xsd:gYearMonth | xsd:gYear +date.content = mixed { sup* } # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -372,7 +383,7 @@ note.content = parag+ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign = element foreign { foreign.attributes, foreign.content }