RelaxNG/publiset.rnc
changeset 256 2b36e6a5b587
parent 241 b403a6ac3061
child 257 814f79990a58
--- a/RelaxNG/publiset.rnc	ven. nov. 01 13:31:18 2013 +0100
+++ b/RelaxNG/publiset.rnc	mer. nov. 06 16:23:51 2013 +0100
@@ -53,7 +53,7 @@
 
 composition.head.content =
    (title, shorttitle?, subtitle*)?
- & (identifier, identifier?)?
+ & identifier*
  & copyright*
  & collection?
  & contributors?
@@ -168,15 +168,25 @@
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-identifier.uri = element identifier {
-   attribute type { "uri" }, xsd:anyURI
-}
+# ~~~~~~ identifier
+identifier = identifier.uri | identifier.ean
 
-identifier.ean = element identifier {
-   attribute type { "ean" }, xsd:token {pattern = "\d{13}"}
-}
+# ~~~~~~ identifier.uri
+identifier.uri = element identifier { identifier.uri.attributes }
 
-identifier = identifier.uri | identifier.ean
+identifier.uri.attributes =
+   type_uri.attribute
+ & for.attribute?
+type_uri.attribute = attribute type { "uri" }, xsd:anyURI
+for.attribute = attribute for { xsd:NCName }
+
+# ~~~~~~ identifier.ean
+identifier.ean = element identifier { identifier.ean.attributes }
+
+identifier.ean.attributes =
+   type_ean.attribute
+ & for.attribute?
+type_ean.attribute = attribute type { "ean" }, xsd:token {pattern = "\d{13}"}
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ copyright ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~