ajout d'un attribut 'type' aux médias
authorPatrick PIERRE <patrick.pierre@prismallia.fr>
mer., 04 sept. 2013 13:40:39 +0200
changeset 245 2d5de0246a8e
parent 244 9591f38effc4
child 246 430c1f46b074
ajout d'un attribut 'type' aux médias
RelaxNG/Examples/Documents/torture_test.xml
RelaxNG/publidoc.rnc
--- a/RelaxNG/Examples/Documents/torture_test.xml	sam. août 03 12:04:12 2013 +0200
+++ b/RelaxNG/Examples/Documents/torture_test.xml	mer. sept. 04 13:40:39 2013 +0200
@@ -629,7 +629,7 @@
                 of="book">Misérables</name>.
               </caption>
             </media>
-            <media>
+            <media type="logo">
               <image id="prismallia_logo" type="thumbnail"/>
               <caption>Le logo de <name>Prismallia</name></caption>
               <link uri="http://www.prismallia.fr"/>
--- a/RelaxNG/publidoc.rnc	sam. août 03 12:04:12 2013 +0200
+++ b/RelaxNG/publidoc.rnc	mer. sept. 04 13:40:39 2013 +0200
@@ -349,7 +349,11 @@
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 # ~~~~~~ media
-media = element media { media.content }
+media = element media { media.attributes, media.content }
+
+media.attributes =
+   media.type.attribute?
+media.type.attribute = attribute type { xsd:NCName }
 
 media.content =
    block.head?,