diff -r 2aad27159a33 -r 29c53c3d676e RelaxNG/publiset.rnc --- a/RelaxNG/publiset.rnc ven. déc. 30 09:44:50 2011 +0100 +++ b/RelaxNG/publiset.rnc jeu. janv. 05 20:10:05 2012 +0100 @@ -33,10 +33,12 @@ & xpath.attribute? & xslt.attribute? & remap.attributes + & lang.attribute? composition.id.attribute = attribute xml:id { xsd:ID } path.attribute = attribute path { xsd:anyURI } xslt.attribute = attribute xslt { xsd:anyURI } xpath.attribute = attribute xpath { text } +lang.attribute = attribute xml:lang { xsd:language } composition.content = composition.head?, @@ -52,6 +54,7 @@ selection.attributes = selection.id.attribute & path.attribute? + & lang.attribute? selection.id.attribute = attribute xml:id { xsd:ID } selection.content = @@ -75,15 +78,12 @@ top.head.content = (title, subtitle?)? & identifier* - & language? & copyright? - & author* - & publisher? + & contributors? & abstract? & cover? division.head.content = (title, subtitle?)? - & language? # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -104,61 +104,49 @@ identifier = identifier.uri | identifier.ean -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -language = element language { language.attributes } - -language.attributes = lang.attribute -lang.attribute = attribute xml:lang { xsd:language } - # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ copyright ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ copyright = element copyright { copyright.content } copyright.content = inlines -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ author, publisher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ contributors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# ~~~~~~ author -author = element author { author.content } +# ~~~~~~ contributors +contributors = element contributors { contributors.content } -author.attributes = - role.attribute? -role.attribute = attribute role { "author" | "illustrator" } +contributors.content = + contributor+ -author.content = - firstname?, - lastname, +# ~~~~~~ contributor +contributor = element contributor { contributor.content } + +contributor.content = + (((firstname, secondname?)?, lastname) | label), + address?, + link?, role* -# ~~~~~~ publisher -publisher = element publisher { publisher.content } - -publisher.content = - label, - link? - -# ~~~~~~ firstname +# ~~~~~~ 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 = inlines +secondname.content = inlines +lastname.content = inlines +label.content = inlines -# ~~~~~~ lastname -lastname = element lastname { lastname.content } +# ~~~~~~ address +address = element address { address.content } -lastname.content = inlines +address.content = inlines # ~~~~~~ role -role = element role { role.attributes } +role = element role { role.content } -role.attributes = - role.of.attribute -role.of.attribute = attribute of { "author" | "illustrator" } - -# ~~~~~~ label -label = element label { label.content } - -label.content = inlines +role.content = "author" | "illustrator" | "publisher" # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~