Ajout d'un attribut type à <hotspot>
authorPatrick PIERRE
mar., 16 juil. 2013 11:55:42 +0200
changeset 237 b5b968159699
parent 236 dbec7d0cb842
child 238 1e881598ecad
Ajout d'un attribut type à <hotspot>
RelaxNG/Examples/Documents/torture_test.xml
RelaxNG/publidoc.rnc
--- a/RelaxNG/Examples/Documents/torture_test.xml	mar. juil. 16 11:23:37 2013 +0200
+++ b/RelaxNG/Examples/Documents/torture_test.xml	mar. juil. 16 11:55:42 2013 +0200
@@ -645,21 +645,24 @@
             </p>
             <media>
               <image id="f-gcru">
-                <hotspot x="23.6%" y="49%" w="7.5%" h="14.2%" display="normal">
+                <hotspot x="23.6%" y="49%" w="7.5%" h="14.2%"
+                         display="normal" type="caption">
                   <spot dx="-1.5%" dy="-4.1%"><p>Directionnel</p></spot>
                   <scenario>
                     <init action="hide" target="spot"/>
                     <onclick action="show" target="spot"/>
                   </scenario>
                 </hotspot>
-                <hotspot x="68.2%" y="33%" w="7.5%" h="14.2%" display="visible">
+                <hotspot x="68.2%" y="33%" w="7.5%" h="14.2%"
+                         display="visible" type="caption">
                   <spot dx="-2%" dy="-4.1%"><p>Compte-tours</p></spot>
                   <scenario>
                     <init action="hide" target="spot"/>
                     <onclick action="show" target="spot"/>
                   </scenario>
                  </hotspot>
-                <hotspot x="55.3%" y="67.8%" w="7.5%" h="14.2%" display="pulse">
+                <hotspot x="55.3%" y="67.8%" w="7.5%" h="14.2%"
+                         display="pulse" type="zoom">
                   <spot dx="-2.5%" dy="-6%" dw="5%">
                     <image id="zoom_oil"/>
                   </spot>
--- a/RelaxNG/publidoc.rnc	mar. juil. 16 11:23:37 2013 +0200
+++ b/RelaxNG/publidoc.rnc	mar. juil. 16 11:55:42 2013 +0200
@@ -394,12 +394,14 @@
  & w.attribute
  & h.attribute?
  & hotspot.display.attribute?
+ & hotspot.type.attribute?
  & xmlid.attribute?
 x.attribute = attribute x { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
 y.attribute = attribute y { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
 w.attribute = attribute w { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
 h.attribute = attribute h { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
 hotspot.display.attribute = attribute display { "normal" | "visible" | "pulse" }
+hotspot.type.attribute = attribute type { xsd:NCName }
    
 hotspot.content =
    ((link | p+ | hotspot.image | audio | video), (spot, scenario?)?)