--- a/RelaxNG/publidoc.rng lun. juin 20 18:39:46 2011 +0200
+++ b/RelaxNG/publidoc.rng lun. juil. 18 19:10:28 2011 +0200
@@ -252,11 +252,43 @@
<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>
+ <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">
@@ -343,12 +375,9 @@
</define>
<define name="pagenumber.value.attribute">
<attribute name="value">
- <ref name="pagenumber.value.enumeration"/>
+ <data type="positiveInteger"/>
</attribute>
</define>
- <define name="pagenumber.value.enumeration">
- <data type="positiveInteger"/>
- </define>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- ~~~~~~ subjectset -->
<define name="subjectset">
@@ -971,15 +1000,12 @@
</define>
<define name="date.of.attribute">
<attribute name="of">
- <ref name="date.of.enumeration"/>
+ <choice>
+ <value>birth</value>
+ <value>death</value>
+ </choice>
</attribute>
</define>
- <define name="date.of.enumeration">
- <choice>
- <value>birth</value>
- <value>death</value>
- </choice>
- </define>
<define name="date.content">
<mixed>
<zeroOrMore>
@@ -1001,18 +1027,15 @@
</define>
<define name="name.of.attribute">
<attribute name="of">
- <ref name="name.of.enumeration"/>
+ <choice>
+ <value>person</value>
+ <value>company</value>
+ <value>book</value>
+ <value>newspaper</value>
+ <value>party</value>
+ </choice>
</attribute>
</define>
- <define name="name.of.enumeration">
- <choice>
- <value>person</value>
- <value>company</value>
- <value>book</value>
- <value>newspaper</value>
- <value>party</value>
- </choice>
- </define>
<define name="name.content">
<ref name="inlines"/>
</define>