diff -r 546609a92447 -r e50ac13ec921 RelaxNG/publidoc.rnc --- a/RelaxNG/publidoc.rnc lun. avril 08 13:27:02 2013 +0200 +++ b/RelaxNG/publidoc.rnc mar. avril 09 18:34:13 2013 +0200 @@ -120,10 +120,10 @@ topic = element topic { topic.attributes, topic.content } topic.attributes = - (topic.id.attribute | topic.xmlid.attribute)? + (topic.id.attribute | xmlid.attribute)? & topic.type.attribute? & lang.attribute? -topic.xmlid.attribute = attribute xml:id { xsd:ID } +xmlid.attribute = attribute xml:id { xsd:ID } topic.content = component.head?, @@ -347,6 +347,7 @@ # ~~~~~~ image image = element image { image.attributes, image.content } +hotspot.image = element image {image.attributes } image.attributes = media.id.attribute @@ -380,25 +381,36 @@ & y.attribute & w.attribute & h.attribute? - & (hotspot.type.attribute - & dx.attribute? - & dy.attribute? - & dw.attribute? - & dh.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.type.attribute = attribute type { "normal" | "visible" | "pulse" } + +hotspot.content = + ((link | p+ | hotspot.image | audio | video), (spot, scenario?)?) + | (spot, scenario?) + +# ~~~~~~ spot +spot = element spot { spot.attributes, spot.content } + +spot.attributes = + dx.attribute? + & dy.attribute? + & dw.attribute? + & dh.attribute? dx.attribute = attribute dx { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} } dy.attribute = attribute dy { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} } -dw.attribute = attribute dw { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } -dh.attribute = attribute dh { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } - -hotspot.content = - (p | link | image | audio | video), - scenario? - +dw.attribute = attribute dw { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} } +dh.attribute = attribute dh { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} } + +spot.content = + ((p+ | image), audio?) + | audio + | video + # ~~~~~~ media.caption media.caption = element caption { caption.attributes, caption.content } @@ -406,6 +418,32 @@ x.attribute? & y.attribute? +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ scenario ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# ~~~~~~ scenario +scenario = element scenario { scenario.content } + +scenario.content = + init*, + onclick* + +# ~~~~~~ init +init = element init { init.attributes } + +init.attributes = + init.action.attribute + & target.attribute? +init.action.attribute = attribute action { "hide" } +target.attribute = attribute target { "hotspot" | "spot" } + +# ~~~~~~ onclick +onclick = element onclick { onclick.attributes } + +onclick.attributes = + onclick.action.attribute + & target.attribute? +onclick.action.attribute = attribute action { "show" } + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bibliograpgy.entry ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~ bibliography.entry @@ -433,29 +471,6 @@ pages.content = xsd:positiveInteger -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ scenario ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# ~~~~~~ scenario -scenario = element scenario { scenario.content } - -scenario.content = - init*, - onclick* - -# ~~~~~~ init -init = element init { init.attributes } - -init.attributes = - init.action.attribute -init.action.attribute = attribute action { "hide" } - -# ~~~~~~ onclick -onclick = element onclick { onclick.attributes } - -onclick.attributes = - onclick.action.attribute -onclick.action.attribute = attribute action { "show" } - # ============================================================================= # HEAD LEVEL