diff -r c70de8fae29d -r c51d5097d065 RelaxNG/publidoc.rnc --- a/RelaxNG/publidoc.rnc lun. juil. 18 19:10:28 2011 +0200 +++ b/RelaxNG/publidoc.rnc lun. juil. 18 23:35:32 2011 +0200 @@ -61,6 +61,7 @@ top.head.content = (title, subtitle?)? + & identifier* & language? & author* & publisher? @@ -93,11 +94,22 @@ title.content = inlines +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +identifier = element identifier { identifier.content, identifier.attributes } + +identifier.attributes = + class.attribute +class.attribute = attribute class { "uri" | "ean" } + +identifier.content = xsd:anyURI | xsd:NMTOKEN + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ language = element language { language.attributes } -language.attributes = lang.attribute +language.attributes = + lang.attribute lang.attribute = attribute xml:lang { xsd:language } # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ author, publisher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -114,16 +126,12 @@ lastname, role* -role = element role { role.attributes } - -role.attributes = - role.of.attribute -role.of.attribute = attribute of { "author" | "illustrator" } - # ~~~~~~ publisher publisher = element publisher { publisher.content } -publisher.content = inlines +publisher.content = + label, + url? # ~~~~~~ firstname firstname = element firstname { firstname.content } @@ -135,6 +143,23 @@ lastname.content = inlines +# ~~~~~~ label +label = element label { label.content } + +label.content = inlines + +# ~~~~~~ role +role = element role { role.attributes } + +role.attributes = + role.of.attribute +role.of.attribute = attribute of { "author" | "illustrator" } + +# ~~~~~~ url +url = element url { url.content } + +url.content = xsd:anyURI + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place = element place { place.content } @@ -302,11 +327,6 @@ label, block+ -# ~~~~~~ label -label = element label { label.content } - -label.content = inlines - # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table = element table { table.content }