ePubs enrichis
authorPatrick PIERRE <patrick.pierre@prismallia.fr>
mer., 30 mai 2012 21:32:58 +0200
changeset 111 44de27e5c6cf
parent 110 aaa57397763e
child 112 5f3d6d357c74
ePubs enrichis
RelaxNG/Examples/Documents/Images/cosette.jpg
RelaxNG/Examples/Documents/Images/cosette.png
RelaxNG/Examples/Documents/torture_test.xml
RelaxNG/publidoc.rnc
RelaxNG/publiquiz.rnc
Xxe/Css/publidoc.css
Binary file RelaxNG/Examples/Documents/Images/cosette.jpg has changed
Binary file RelaxNG/Examples/Documents/Images/cosette.png has changed
--- a/RelaxNG/Examples/Documents/torture_test.xml	mer. mai 30 01:18:50 2012 +0200
+++ b/RelaxNG/Examples/Documents/torture_test.xml	mer. mai 30 21:32:58 2012 +0200
@@ -430,7 +430,9 @@
           </head>
           <section>
             <media>
-              <image id="cosette"/>
+              <image id="cosette">
+                <copyright>Émile BAYARD</copyright>
+              </image>
               <caption>
                 <name of="person">Cosette</name>, illustration pour Les <name
                 of="book">Misérables</name>.
@@ -452,9 +454,8 @@
             </p>
             <media>
               <image id="f-gcru">
-                <tooltip x="30%" y="50%" dx="-5%" dy="-5%">
-                  <p>Variomètre</p>
-                </tooltip>
+                <tooltip x="20%" y="42%" dx="2" dy="-1"><p>Directionnel</p></tooltip>
+                <tooltip x="65%" y="26%" dx="-1" dy="-1"><p>Compte-tours</p></tooltip>
               </image>
               <caption x="1%" y="1%">Robin DR-400, F-GCRU.</caption>
             </media>
--- a/RelaxNG/publidoc.rnc	mer. mai 30 01:18:50 2012 +0200
+++ b/RelaxNG/publidoc.rnc	mer. mai 30 21:32:58 2012 +0200
@@ -318,11 +318,11 @@
    media.id.attribute
  & image.type?
 media.id.attribute = attribute id { xsd:NMTOKEN }
-image.type = attribute type { "cover" | "thumbnail" | "icon" }
+image.type = attribute type { "thumbnail" | "icon" }
 
 image.content =
-   tooltip*,
-   copyright?
+   copyright?,
+   tooltip*
 
 # ~~~~~~ audio
 audio = element audio { audio.attributes }
@@ -341,10 +341,10 @@
  & y.attribute
  & dx.attribute?
  & dy.attribute?
-x.attribute = attribute x { xsd:token {pattern = "\d{1,3}%"} }
-y.attribute = attribute y { xsd:token {pattern = "\d{1,3}%"} }
-dx.attribute = attribute dx { xsd:token {pattern = "-?\d{1,3}%"} }
-dy.attribute = attribute dy { xsd:token {pattern = "-?\d{1,3}%"} }
+x.attribute = attribute x { xsd:token {pattern = "\d{1,2}%"} }
+y.attribute = attribute y { xsd:token {pattern = "\d{1,2}%"} }
+dx.attribute = attribute dx { xsd:token {pattern = "-?\d{1,2}"} }
+dy.attribute = attribute dy { xsd:token {pattern = "-?\d{1,2}"} }
 
 tooltip.content =
    (p | image)+
--- a/RelaxNG/publiquiz.rnc	mer. mai 30 01:18:50 2012 +0200
+++ b/RelaxNG/publiquiz.rnc	mer. mai 30 21:32:58 2012 +0200
@@ -253,11 +253,11 @@
 blanks.table.content =
    block.head?,
    blanks.tgroup+,
-   caption?
+   table.caption?
 point.table.content =
    block.head?,
    point.tgroup+,
-   caption?
+   table.caption?
 
 # ~~~~~~ tgroup
 blanks.tgroup = element tgroup { tgroup.attributes, blanks.tgroup.content }
--- a/Xxe/Css/publidoc.css	mer. mai 30 01:18:50 2012 +0200
+++ b/Xxe/Css/publidoc.css	mer. mai 30 21:32:58 2012 +0200
@@ -19,7 +19,7 @@
   display: block;
   margin-bottom: .5em;
   background-color: #fafafa;
-  padding: 0 .2em 0 .2em;
+  padding: .2em .5em 0 .5em;
   border: 1px solid #bbbbbb;
   border-radius: 0.2em;
 }
@@ -43,6 +43,7 @@
 head > abstract:before { content: insert-before-button() " Résumé :"; }
 head > cover:before { content: insert-before-button() " Couverture :"; }
 head > annotation:before { content: insert-before-button() " Annotation :"; }
+head > audio:before { content: insert-before-button() " Audio :"; }
 
 head > * {
  display: block;
@@ -60,7 +61,7 @@
   font-size: 120%;
   font-weight: bold;
   color: #004080;
-  margin: .2em 0 .2em 0;
+  margin: 0 0 .2em 0;
 }
 head > subtitle {
   font-weight: bold;
@@ -261,6 +262,7 @@
 
 publidoc > * > head > title {
   font-size: 140%;
+  margin: .1em 0 .1em 0;
 }
 
 
@@ -428,32 +430,79 @@
 
 media image, media audio {
   display: block;
-  color: #7f7f7f;
   font-family: sans-serif;
 }
-media image:after, media audio:after {
-  content: " " insert-after-button(color, #7f7f7f, icon, icon(right-half-disc));
+
+media caption {
+  display: block;
+}
+media caption:after {
+  content: insert-after-button(color, #7f7f7f, icon, icon(right-half-disc));
 }
 
-image {
-  content: concatenate("image('Images/", attr(id), ".png', -64, -64, smooth)");
+/* image ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+cover image {
+  content: concatenate("image('Images/", attr(id), ".png', -480, -360, smooth)");
+}
+
+p image {
+  content: concatenate("image('Images/", attr(id), ".png', -64, -48, smooth)");
   vertical-align: middle;
 }
-media image {
-  content: "Image : "
-           concatenate("image('Images/", attr(id), ".png', -200, -200, smooth)");
+
+media image:before {
+  display: block;
+  text-align: left;
+  content: concatenate("image('Images/", attr(id), ".png', -480, -360, smooth)")
+           insert-button(color, #7f7f7f, icon, icon(pop-down))
+           insert-after-button(color, #7f7f7f, icon, icon(right-half-disc));
+}
+media image[type="thumbnail"]:before {
+  content: concatenate("image('Images/", attr(id), ".png', -128, -96, smooth)")
+           insert-button(color, #7f7f7f, icon, icon(pop-down))
+           insert-after-button(color, #7f7f7f, icon, icon(right-half-disc));
 }
 
-media audio {
-  content: "Audio : " text-field(attribute, id, color, black);
+tooltip image:before {
+  content: "";
+}
+tooltip > image {
+  content: concatenate("image('Images/", attr(id), ".png', -128, -96, smooth)");
 }
 
-caption {
+media image {
+  margin-bottom: .8em;
+}
+
+image > copyright {
+  display: block;
+  font-size: 75%;
   font-style: italic;
-  font-size: 93%;
 }
-caption:after {
-  content: insert-after-button(color, #7f7f7f, icon, icon(right-half-disc));
+
+tooltip {
+  display: block;
+  padding: .5em;
+  background-color: #eaffe9;
+  border-radius: 1.5em;
+}
+tooltip > p {
+  font-family: sans-serif;
+  font-size: 85%;
+}
+
+/* audio ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+audio {
+  content: text-field(attribute, id, color, black, font-size, 75%)
+           " type : " label(attribute, type, color, black) " "
+           set-attribute-button(attribute, type, icon, icon(pop-sw), color, black);
+}
+media audio {
+  content: "Audio : " text-field(attribute, id, color, black)
+           " type : " label(attribute, type, color, black) " "
+           set-attribute-button(attribute, type, icon, icon(pop-sw), color, black);
 }
 
 
@@ -532,4 +581,5 @@
 
 smil {
   background-color: #ffffc0;
+  
 }