--- a/RelaxNG/publidoc.rnc mar. juil. 19 18:16:50 2011 +0200
+++ b/RelaxNG/publidoc.rnc mer. juil. 20 14:38:48 2011 +0200
@@ -97,13 +97,15 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-identifier = element identifier { identifier.content, identifier.attributes }
+identifier.uri = element identifier {
+ attribute type { "uri" }, xsd:anyURI
+}
-identifier.attributes =
- class.attribute
-class.attribute = attribute class { "uri" | "ean" }
+identifier.ean = element identifier {
+ attribute type { "ean" }, xsd:token {pattern = "\d{13}"}
+}
-identifier.content = xsd:anyURI | xsd:NMTOKEN
+identifier = identifier.uri | identifier.ean
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -144,11 +146,6 @@
lastname.content = inlines
-# ~~~~~~ label
-label = element label { label.content }
-
-label.content = inlines
-
# ~~~~~~ role
role = element role { role.attributes }
@@ -156,6 +153,11 @@
role.of.attribute
role.of.attribute = attribute of { "author" | "illustrator" }
+# ~~~~~~ label
+label = element label { label.content }
+
+label.content = inlines
+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
place = element place { place.content }
@@ -166,19 +168,17 @@
# ~~~~~~ source
source = element source {
- source.attributes,
( (attribute type { "book" }, source.content.book)
- | (attribute type { "file" })),
+ | (attribute type { "file" }, source.content.file)),
source.content
}
-source.attributes =
- source.id.attribute
-source.id.attribute = attribute id { xsd:NMTOKEN }
-
source.content.book =
- title,
+ identifier.ean,
+ title?,
pagenumber*
+source.content.file =
+ identifier.uri
source.content =
annotation*