# HG changeset patch # User Patrick PIERRE <patrick.pierre@prismallia.fr> # Date 1319381112 -7200 # Node ID e533ca9494a640d4cbdd35bee0f9709c255f08c1 # Parent 136c5977c215096f8b7ad81c82fd3ea9d5c3063e Ajout de l'attribut 'type' aux images diff -r 136c5977c215 -r e533ca9494a6 RelaxNG/publidoc.rnc --- a/RelaxNG/publidoc.rnc ven. oct. 07 16:19:44 2011 +0200 +++ b/RelaxNG/publidoc.rnc dim. oct. 23 16:45:12 2011 +0200 @@ -454,8 +454,10 @@ image = element image { image.attributes, image.content } image.attributes = - media.id.attribute + media.id.attribute, + image.type? media.id.attribute = attribute id { xsd:NMTOKEN } +image.type = attribute type { "thumbnail" } image.content = copyright? diff -r 136c5977c215 -r e533ca9494a6 RelaxNG/publidoc.rng --- a/RelaxNG/publidoc.rng ven. oct. 07 16:19:44 2011 +0200 +++ b/RelaxNG/publidoc.rng dim. oct. 23 16:45:12 2011 +0200 @@ -975,12 +975,20 @@ </define> <define name="image.attributes"> <ref name="media.id.attribute"/> + <optional> + <ref name="image.type"/> + </optional> </define> <define name="media.id.attribute"> <attribute name="id"> <data type="NMTOKEN"/> </attribute> </define> + <define name="image.type"> + <attribute name="type"> + <value>thumbnail</value> + </attribute> + </define> <define name="image.content"> <optional> <ref name="copyright"/> diff -r 136c5977c215 -r e533ca9494a6 Xml/Documents/Images/cosette.jpg Binary file Xml/Documents/Images/cosette.jpg has changed diff -r 136c5977c215 -r e533ca9494a6 Xml/Documents/torture_test.xml --- a/Xml/Documents/torture_test.xml ven. oct. 07 16:19:44 2011 +0200 +++ b/Xml/Documents/torture_test.xml dim. oct. 23 16:45:12 2011 +0200 @@ -279,7 +279,15 @@ </head> <section> <media> - <image id="prismallia_logo"/> + <image id="cosette"/> + <caption> + <name of="person">Cosette</name>, illustration pour Les <name + of="book">Misérables</name> par <name of="person">Émile + Bayard</name>. + </caption> + </media> + <media> + <image id="prismallia_logo" type="thumbnail"/> <caption>Le logo de <name>Prismallia</name></caption> <link uri="http://www.prismallia.fr"/> </media>