# HG changeset patch # User Patrick PIERRE <patrick.pierre@prismallia.fr> # Date 1363462936 -3600 # Node ID af222772225f07b1ddb348e081d5f12cc10c9970 # Parent cc8a32283e9d70b2067d64d214ed3933f69d56d9 Nouvel version des hotspots diff -r cc8a32283e9d -r af222772225f RelaxNG/Examples/Documents/torture_test.xml --- a/RelaxNG/Examples/Documents/torture_test.xml ven. mars 15 08:51:12 2013 +0100 +++ b/RelaxNG/Examples/Documents/torture_test.xml sam. mars 16 20:42:16 2013 +0100 @@ -505,7 +505,7 @@ <media> <image id="cosette"> <copyright>Émile BAYARD</copyright> - <hotspot x="35%" y="32%" width="34%" height="50%"> + <hotspot x="35%" y="32%" w="34%" h="50%" type="border"> <link idref="cosette"/> </hotspot> </image> @@ -530,9 +530,15 @@ </p> <media> <image id="f-gcru"> - <hotspot x="27.5%" y="55.4%" dx="-6.5" dy="-11" hidden="true"><p>Directionnel</p></hotspot> - <hotspot x="72.2%" y="40.1%" dx="-7.5" dy="-11" hidden="true"><p>Compte-tours</p></hotspot> - <hotspot x="59%" y="74.9%" dx="-9.4" dy="-17.8" hidden="true"><image id="zoom_oil"/></hotspot> + <hotspot x="23.5%" y="48.7%" w="7.5%" h="14.2%" type="border"> + <p>Directionnel</p> + </hotspot> + <hotspot x="68.2%" y="33.2%" w="7.5%" h="14.2%" type="border"> + <p>Compte-tours</p> + </hotspot> + <hotspot x="55.3%" y="67.8%" w="7.5%" h="14.2%" type="pulse"> + <image id="zoom_oil"/> + </hotspot> </image> <caption x="1%" y="1%">Robin DR-400, F-GCRU.</caption> </media> diff -r cc8a32283e9d -r af222772225f RelaxNG/publidoc.rnc --- a/RelaxNG/publidoc.rnc ven. mars 15 08:51:12 2013 +0100 +++ b/RelaxNG/publidoc.rnc sam. mars 16 20:42:16 2013 +0100 @@ -375,19 +375,16 @@ hotspot.attributes = x.attribute & y.attribute - & dx.attribute? - & dy.attribute? - & (width.attribute & height.attribute)? - & hidden.attribute? + & w.attribute + & h.attribute + & (hotspot.type.attribute & dx.attribute? & dy.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.type.attribute = attribute type { "pulse" | "border" } dx.attribute = attribute dx { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} } dy.attribute = attribute dy { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} } -width.attribute = attribute width { - xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } -height.attribute = attribute height { - xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } -hidden.attribute = attribute hidden { xsd:boolean } hotspot.content = (p | link | image | audio | video)