# HG changeset patch # User Patrick PIERRE # Date 1311165528 -7200 # Node ID 3c8b406be90635dd747a610ca4734452072a807a # Parent 83b7ec3c3132c4ec20fcb062d1e8fbdff810089c Amélioration de la balise diff -r 83b7ec3c3132 -r 3c8b406be906 RelaxNG/publidoc.rnc --- 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* diff -r 83b7ec3c3132 -r 3c8b406be906 RelaxNG/publidoc.rng --- a/RelaxNG/publidoc.rng mar. juil. 19 18:16:50 2011 +0200 +++ b/RelaxNG/publidoc.rng mer. juil. 20 14:38:48 2011 +0200 @@ -238,27 +238,28 @@ - + - - + + uri + + - - + + + + ean + + + \d{13} + + - - - - uri - ean - - - - + - - + + @@ -334,15 +335,6 @@ - - - - - - - - - @@ -360,6 +352,15 @@ + + + + + + + + + @@ -373,7 +374,6 @@ - @@ -381,27 +381,28 @@ - - file - + + + file + + + - - - - - - - - - + + + + + + + diff -r 83b7ec3c3132 -r 3c8b406be906 RelaxNG/publiset.rnc --- a/RelaxNG/publiset.rnc mar. juil. 19 18:16:50 2011 +0200 +++ b/RelaxNG/publiset.rnc mer. juil. 20 14:38:48 2011 +0200 @@ -93,13 +93,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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -139,11 +141,6 @@ lastname.content = inlines -# ~~~~~~ label -label = element label { label.content } - -label.content = inlines - # ~~~~~~ role role = element role { role.attributes } @@ -151,23 +148,25 @@ role.of.attribute role.of.attribute = attribute of { "author" | "illustrator" } +# ~~~~~~ label +label = element label { label.content } + +label.content = inlines + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~ source source = element source { - source.attributes, ( (attribute type { "book" }, source.content.book) - | (attribute type { "file" })) + | (attribute type { "file" }, source.content.file)) } -source.attributes = - source.id.attribute? - & remap.attributes -source.id.attribute = attribute id { xsd:NMTOKEN } - source.content.book = + identifier.ean, title?, - pagenumber? + pagenumber* +source.content.file = + identifier.uri # ~~~~~~ pagenumber pagenumber = element pagenumber { pagenumber.attributes } diff -r 83b7ec3c3132 -r 3c8b406be906 RelaxNG/publiset.rng --- a/RelaxNG/publiset.rng mar. juil. 19 18:16:50 2011 +0200 +++ b/RelaxNG/publiset.rng mer. juil. 20 14:38:48 2011 +0200 @@ -195,27 +195,28 @@ - + - - + + uri + + - - + + + + ean + + + \d{13} + + - - - - uri - ean - - - - + - - + + @@ -291,15 +292,6 @@ - - - - - - - - - @@ -317,11 +309,19 @@ + + + + + + + + + - @@ -329,32 +329,26 @@ - - file - + + + file + + + - - - - - - - - - - - - - + - + - + + + + diff -r 83b7ec3c3132 -r 3c8b406be906 Xml/Documents/torture_test.xml --- a/Xml/Documents/torture_test.xml mar. juil. 19 18:16:50 2011 +0200 +++ b/Xml/Documents/torture_test.xml mer. juil. 20 14:38:48 2011 +0200 @@ -5,8 +5,8 @@ Torture test Test des capacités de publidoc - 978-2-35184-011-4 - http://www.prismallia.fr/Xml/torture_test + 9782351840114 + http://www.prismallia.fr/Xml/torture_test PatrickPIERRE @@ -21,11 +21,14 @@ Paris - + + 9782843550362 Les Misérables - + + hugo_miserables.xml + diff -r 83b7ec3c3132 -r 3c8b406be906 Xml/Sets/composition.xml --- a/Xml/Sets/composition.xml mar. juil. 19 18:16:50 2011 +0200 +++ b/Xml/Sets/composition.xml mer. juil. 20 14:38:48 2011 +0200 @@ -5,7 +5,7 @@ Exemple d'assemblage de sujets - 978-2-35184-011-4 + 9782351840114 PatrickPIERRE diff -r 83b7ec3c3132 -r 3c8b406be906 Xml/Topics/centre_pompidou.xml --- a/Xml/Topics/centre_pompidou.xml mar. juil. 19 18:16:50 2011 +0200 +++ b/Xml/Topics/centre_pompidou.xml mer. juil. 20 14:38:48 2011 +0200 @@ -8,11 +8,14 @@ Paris - + + 9782843550362 Chronique de l'année 2000 - + + 4a.tex + diff -r 83b7ec3c3132 -r 3c8b406be906 Xml/Topics/chasseurs.xml --- a/Xml/Topics/chasseurs.xml mar. juil. 19 18:16:50 2011 +0200 +++ b/Xml/Topics/chasseurs.xml mer. juil. 20 14:38:48 2011 +0200 @@ -8,11 +8,14 @@ Baie de Somme - + + 9782843550362 Chronique de l'année 2000 - + + 12a.tex +
diff -r 83b7ec3c3132 -r 3c8b406be906 Xml/Topics/portugal_ue.xml --- a/Xml/Topics/portugal_ue.xml mar. juil. 19 18:16:50 2011 +0200 +++ b/Xml/Topics/portugal_ue.xml mer. juil. 20 14:38:48 2011 +0200 @@ -8,11 +8,14 @@ Lisbonne - + + 9782843550362 Chronique de l'année 2000 - + + 4z.tex +
diff -r 83b7ec3c3132 -r 3c8b406be906 Xml/Topics/prince_belge.xml --- a/Xml/Topics/prince_belge.xml mar. juil. 19 18:16:50 2011 +0200 +++ b/Xml/Topics/prince_belge.xml mer. juil. 20 14:38:48 2011 +0200 @@ -6,11 +6,14 @@ Janvier 2000 - + + 9782843550362 Chronique de l'année 2000 - + + e8.tex +