RelaxNG/publidoc.rnc
changeset 66 29c53c3d676e
parent 65 2aad27159a33
child 69 52c72abcc57d
--- a/RelaxNG/publidoc.rnc	ven. déc. 30 09:44:50 2011 +0100
+++ b/RelaxNG/publidoc.rnc	jeu. janv. 05 20:10:05 2012 +0100
@@ -27,7 +27,9 @@
 
 document.attributes =
    document.id.attribute
+ & lang.attribute?
 document.id.attribute = attribute xml:id { xsd:ID }
+lang.attribute = attribute xml:lang { xsd:language }
 
 document.content =
    top.head?,
@@ -40,6 +42,7 @@
 top.topic.attributes =
    topic.id.attribute
  & topic.type.attribute?
+ & lang.attribute?
 topic.id.attribute = attribute xml:id { xsd:ID }
 topic.type.attribute = attribute type { xsd:NCName }
 
@@ -63,10 +66,8 @@
 top.head.content =
    (title, subtitle?)?
  & identifier*
- & language?
  & copyright?
- & author*
- & publisher?
+ & contributors?
  & date?
  & place?
  & source*
@@ -81,8 +82,7 @@
  & annotation*
 component.head.content =
    (title, subtitle?)?
- & language?
- & author*
+ & contributors?
  & abstract?
  & annotation*
 section.head.content =
@@ -111,58 +111,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.content =
-   firstname?,
-   lastname,
+contributors.content =
+   contributor+
+
+# ~~~~~~ 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"
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~