RelaxNG/publiset.rng
changeset 34 c51d5097d065
parent 30 c0f9e813c039
child 35 de4114d12ef1
--- a/RelaxNG/publiset.rng	lun. juil. 18 19:10:28 2011 +0200
+++ b/RelaxNG/publiset.rng	lun. juil. 18 23:35:32 2011 +0200
@@ -147,6 +147,9 @@
           <ref name="subtitle"/>
         </optional>
       </optional>
+      <zeroOrMore>
+        <ref name="identifier"/>
+      </zeroOrMore>
       <optional>
         <ref name="language"/>
       </optional>
@@ -188,6 +191,30 @@
   <define name="title.content">
     <ref name="inlines"/>
   </define>
+  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+  <define name="identifier">
+    <element name="identifier">
+      <ref name="identifier.content"/>
+      <ref name="identifier.attributes"/>
+    </element>
+  </define>
+  <define name="identifier.attributes">
+    <ref name="class.attribute"/>
+  </define>
+  <define name="class.attribute">
+    <attribute name="class">
+      <choice>
+        <value>uri</value>
+        <value>ean</value>
+      </choice>
+    </attribute>
+  </define>
+  <define name="identifier.content">
+    <choice>
+      <data type="anyURI"/>
+      <data type="NMTOKEN"/>
+    </choice>
+  </define>
   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   <define name="language">
     <element name="language">
@@ -209,11 +236,27 @@
       <ref name="author.content"/>
     </element>
   </define>
+  <define name="author.attributes">
+    <optional>
+      <ref name="role.attribute"/>
+    </optional>
+  </define>
+  <define name="role.attribute">
+    <attribute name="role">
+      <choice>
+        <value>author</value>
+        <value>illustrator</value>
+      </choice>
+    </attribute>
+  </define>
   <define name="author.content">
     <optional>
       <ref name="firstname"/>
     </optional>
     <ref name="lastname"/>
+    <zeroOrMore>
+      <ref name="role"/>
+    </zeroOrMore>
   </define>
   <!-- ~~~~~~ publisher -->
   <define name="publisher">
@@ -222,7 +265,10 @@
     </element>
   </define>
   <define name="publisher.content">
-    <ref name="inlines"/>
+    <ref name="label"/>
+    <optional>
+      <ref name="url"/>
+    </optional>
   </define>
   <!-- ~~~~~~ firstname -->
   <define name="firstname">
@@ -242,6 +288,41 @@
   <define name="lastname.content">
     <ref name="inlines"/>
   </define>
+  <!-- ~~~~~~ label -->
+  <define name="label">
+    <element name="label">
+      <ref name="label.content"/>
+    </element>
+  </define>
+  <define name="label.content">
+    <ref name="inlines"/>
+  </define>
+  <!-- ~~~~~~ role -->
+  <define name="role">
+    <element name="role">
+      <ref name="role.attributes"/>
+    </element>
+  </define>
+  <define name="role.attributes">
+    <ref name="role.of.attribute"/>
+  </define>
+  <define name="role.of.attribute">
+    <attribute name="of">
+      <choice>
+        <value>author</value>
+        <value>illustrator</value>
+      </choice>
+    </attribute>
+  </define>
+  <!-- ~~~~~~ url -->
+  <define name="url">
+    <element name="url">
+      <ref name="url.content"/>
+    </element>
+  </define>
+  <define name="url.content">
+    <data type="anyURI"/>
+  </define>
   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   <!-- ~~~~~~ source -->
   <define name="source">