Retouche pour libxml
authorPatrick PIERRE
mer., 06 nov. 2013 18:26:52 +0100
changeset 257 814f79990a58
parent 256 2b36e6a5b587
child 258 5f98e1b292fe
Retouche pour libxml
RelaxNG/publidoc.rnc
RelaxNG/publiset.rnc
--- a/RelaxNG/publidoc.rnc	mer. nov. 06 16:23:51 2013 +0100
+++ b/RelaxNG/publidoc.rnc	mer. nov. 06 18:26:52 2013 +0100
@@ -544,23 +544,20 @@
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 # ~~~~~~ identifier
-identifier = identifier.uri | identifier.ean
+identifier = element identifier {
+   (attribute type { "ean" }, for.attribute?, xsd:token {pattern = "\d{13}"})
+ | (attribute type { "uri" }, for.attribute?, xsd:anyURI)
+}
+
+# ~~~~~~ identifier.ean
+identifier.ean = element identifier {
+   attribute type { "ean" }, for.attribute?, xsd:token {pattern = "\d{13}"}
+}
 
 # ~~~~~~ identifier.uri
-identifier.uri = element identifier { identifier.uri.attributes }
-
-identifier.uri.attributes =
-   type_uri.attribute
- & for.attribute?
-type_uri.attribute = attribute type { "uri" }, xsd:anyURI
-
-# ~~~~~~ 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}"}
+identifier.uri = element identifier {
+   attribute type { "uri" }, for.attribute?, xsd:anyURI
+}
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ copyright ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
--- a/RelaxNG/publiset.rnc	mer. nov. 06 16:23:51 2013 +0100
+++ b/RelaxNG/publiset.rnc	mer. nov. 06 18:26:52 2013 +0100
@@ -169,24 +169,20 @@
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 # ~~~~~~ identifier
-identifier = identifier.uri | identifier.ean
+identifier = element identifier {
+   (attribute type { "ean" }, for.attribute?, xsd:token {pattern = "\d{13}"})
+ | (attribute type { "uri" }, for.attribute?, xsd:anyURI)
+}
+
+# ~~~~~~ identifier.ean
+identifier.ean = element identifier {
+   attribute type { "ean" }, for.attribute?, xsd:token {pattern = "\d{13}"}
+}
 
 # ~~~~~~ identifier.uri
-identifier.uri = element identifier { identifier.uri.attributes }
-
-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}"}
+identifier.uri = element identifier {
+   attribute type { "uri" }, for.attribute?, xsd:anyURI
+}
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ copyright ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~