RelaxNG/publidoc.rng
changeset 34 c51d5097d065
parent 33 c70de8fae29d
child 35 de4114d12ef1
--- a/RelaxNG/publidoc.rng	lun. juil. 18 19:10:28 2011 +0200
+++ b/RelaxNG/publidoc.rng	lun. juil. 18 23:35:32 2011 +0200
@@ -129,6 +129,9 @@
           <ref name="subtitle"/>
         </optional>
       </optional>
+      <zeroOrMore>
+        <ref name="identifier"/>
+      </zeroOrMore>
       <optional>
         <ref name="language"/>
       </optional>
@@ -231,6 +234,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">
@@ -274,22 +301,6 @@
       <ref name="role"/>
     </zeroOrMore>
   </define>
-  <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>
   <!-- ~~~~~~ publisher -->
   <define name="publisher">
     <element name="publisher">
@@ -297,7 +308,10 @@
     </element>
   </define>
   <define name="publisher.content">
-    <ref name="inlines"/>
+    <ref name="label"/>
+    <optional>
+      <ref name="url"/>
+    </optional>
   </define>
   <!-- ~~~~~~ firstname -->
   <define name="firstname">
@@ -317,6 +331,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>
   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   <define name="place">
     <element name="place">
@@ -632,15 +681,6 @@
       <ref name="block"/>
     </oneOrMore>
   </define>
-  <!-- ~~~~~~ label -->
-  <define name="label">
-    <element name="label">
-      <ref name="label.content"/>
-    </element>
-  </define>
-  <define name="label.content">
-    <ref name="inlines"/>
-  </define>
   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   <define name="table">
     <element name="table">