# HG changeset patch # User Patrick PIERRE <patrick.pierre@prismallia.fr> # Date 1311066114 -7200 # Node ID de4114d12ef194b033718f0a02a8c4cf3a3f7007 # Parent c51d5097d06516858e514580177506e7112f58f2 Ajout de la gestion des couvertures diff -r c51d5097d065 -r de4114d12ef1 RelaxNG/publidoc.rnc --- a/RelaxNG/publidoc.rnc lun. juil. 18 23:35:32 2011 +0200 +++ b/RelaxNG/publidoc.rnc mar. juil. 19 11:01:54 2011 +0200 @@ -70,6 +70,7 @@ & source* & subjectset? & abstract? + & cover? & annotation* division.head.content = (title, subtitle?)? @@ -214,6 +215,19 @@ abstract.content = p+ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cover ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +cover = element cover { cover.content } + +cover.content = + cover.image + +cover.image = element image { cover.image.attributes } + +cover.image.attributes = + cover.image.id.attribute +cover.image.id.attribute = attribute id { xsd:NMTOKEN } + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ annotation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ annotation = element annotation { annotation.content } @@ -397,7 +411,7 @@ inlines | p+ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~ media media = element media { media.content } @@ -405,7 +419,8 @@ media.content = block.head?, image+, - caption? + caption?, + url? # ~~~~~~ image image = element image { image.attributes, image.content } diff -r c51d5097d065 -r de4114d12ef1 RelaxNG/publidoc.rng --- a/RelaxNG/publidoc.rng lun. juil. 18 23:35:32 2011 +0200 +++ b/RelaxNG/publidoc.rng mar. juil. 19 11:01:54 2011 +0200 @@ -156,6 +156,9 @@ <optional> <ref name="abstract"/> </optional> + <optional> + <ref name="cover"/> + </optional> <zeroOrMore> <ref name="annotation"/> </zeroOrMore> @@ -464,6 +467,28 @@ <ref name="p"/> </oneOrMore> </define> + <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cover ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> + <define name="cover"> + <element name="cover"> + <ref name="cover.content"/> + </element> + </define> + <define name="cover.content"> + <ref name="cover.image"/> + </define> + <define name="cover.image"> + <element name="image"> + <ref name="cover.image.attributes"/> + </element> + </define> + <define name="cover.image.attributes"> + <ref name="cover.image.id.attribute"/> + </define> + <define name="cover.image.id.attribute"> + <attribute name="id"> + <data type="NMTOKEN"/> + </attribute> + </define> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ annotation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <define name="annotation"> <element name="annotation"> @@ -862,7 +887,7 @@ </oneOrMore> </choice> </define> - <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> + <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <!-- ~~~~~~ media --> <define name="media"> <element name="media"> @@ -879,6 +904,9 @@ <optional> <ref name="caption"/> </optional> + <optional> + <ref name="url"/> + </optional> </define> <!-- ~~~~~~ image --> <define name="image"> diff -r c51d5097d065 -r de4114d12ef1 RelaxNG/publiset.rnc --- a/RelaxNG/publiset.rnc lun. juil. 18 23:35:32 2011 +0200 +++ b/RelaxNG/publiset.rnc mar. juil. 19 11:01:54 2011 +0200 @@ -79,6 +79,7 @@ & author* & publisher? & source? + & cover? division.head.content = (title, subtitle?)? & language? @@ -181,6 +182,19 @@ pagenumber.value.attribute = attribute value { pagenumber.value.enumeration } pagenumber.value.enumeration = xsd:positiveInteger +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cover ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +cover = element cover { cover.content } + +cover.content = + cover.image + +cover.image = element image { cover.image.attributes } + +cover.image.attributes = + cover.image.id.attribute +cover.image.id.attribute = attribute id { xsd:NMTOKEN } + # ============================================================================= # DIVISION LEVEL diff -r c51d5097d065 -r de4114d12ef1 RelaxNG/publiset.rng --- a/RelaxNG/publiset.rng lun. juil. 18 23:35:32 2011 +0200 +++ b/RelaxNG/publiset.rng mar. juil. 19 11:01:54 2011 +0200 @@ -162,6 +162,9 @@ <optional> <ref name="source"/> </optional> + <optional> + <ref name="cover"/> + </optional> </interleave> </define> <define name="division.head.content"> @@ -379,6 +382,28 @@ <define name="pagenumber.value.enumeration"> <data type="positiveInteger"/> </define> + <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cover ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> + <define name="cover"> + <element name="cover"> + <ref name="cover.content"/> + </element> + </define> + <define name="cover.content"> + <ref name="cover.image"/> + </define> + <define name="cover.image"> + <element name="image"> + <ref name="cover.image.attributes"/> + </element> + </define> + <define name="cover.image.attributes"> + <ref name="cover.image.id.attribute"/> + </define> + <define name="cover.image.id.attribute"> + <attribute name="id"> + <data type="NMTOKEN"/> + </attribute> + </define> <!-- ============================================================================= DIVISION LEVEL diff -r c51d5097d065 -r de4114d12ef1 Xml/Documents/Images/torture_test.jpg Binary file Xml/Documents/Images/torture_test.jpg has changed diff -r c51d5097d065 -r de4114d12ef1 Xml/Documents/torture_test.xml --- a/Xml/Documents/torture_test.xml lun. juil. 18 23:35:32 2011 +0200 +++ b/Xml/Documents/torture_test.xml mar. juil. 19 11:01:54 2011 +0200 @@ -26,17 +26,18 @@ <pagenumber value="312"/> </source> <source type="file" id="hugo_miserables.xml"/> + <subjectset> + <subject id="test"/> + <subject id="littérature"/> + </subjectset> <abstract> <p> Ce fichier rassemble un maximum de situations afin de tester les possibilités de <name>publidoc</name>. </p> </abstract> - <subjectset> - <subject id="test"/> - <subject id="littérature"/> - </subjectset> - <annotation></annotation> + <cover><image id="torture_test"/></cover> + <annotation>Ce fichier n'a pas de réelle signification</annotation> </head> <!-- ================================================================== --> diff -r c51d5097d065 -r de4114d12ef1 Xml/Sets/Images/composition.xcf Binary file Xml/Sets/Images/composition.xcf has changed diff -r c51d5097d065 -r de4114d12ef1 Xml/Sets/composition.xml --- a/Xml/Sets/composition.xml lun. juil. 18 23:35:32 2011 +0200 +++ b/Xml/Sets/composition.xml mar. juil. 19 11:01:54 2011 +0200 @@ -14,6 +14,7 @@ <label>Prismallia</label> <url>http://www.prismallia.fr</url> </publisher> + <cover><image id="composition"/></cover> </head> <!-- ========================== Événements ========================== -->