RelaxNG/publiset.rnc
changeset 18 e448c6a000e5
parent 5 69310bc35b63
child 20 79713ffae179
--- a/RelaxNG/publiset.rnc	sam. juin 11 20:35:18 2011 +0200
+++ b/RelaxNG/publiset.rnc	dim. juin 12 14:17:23 2011 +0200
@@ -70,20 +70,25 @@
    remap.attributes
 
 metadata.content =
-   title?
- & subtitle?
+   (title, subtitle?)?
+ & language?
  & author*
  & publisher?
- & language?
  & source?
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 title = element title { title.content }
+subtitle = element subtitle { title.content }
 
 title.content = inlines
 
-subtitle = element subtitle { title.content }
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+language = element language { language.attributes }
+
+language.attributes = lang.attribute
+lang.attribute = attribute xml:lang { xsd:language }
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ author, publisher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -109,13 +114,6 @@
 
 lastname.content = inlines
 
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-language = element language { language.attributes }
-
-language.attributes = lang.attribute
-lang.attribute = attribute xml:lang { xsd:language }
-
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 # ~~~~~~ source