diff -r f3e221b25f64 -r a0b8294a5a99 RelaxNG/publidoc.rnc --- a/RelaxNG/publidoc.rnc dim. juin 17 19:55:34 2012 +0200 +++ b/RelaxNG/publidoc.rnc jeu. juin 21 02:45:51 2012 +0200 @@ -111,9 +111,10 @@ topic = element topic { topic.attributes, topic.content } topic.attributes = - topic.id.attribute? + (topic.id.attribute | topic.xmlid.attribute)? & topic.type.attribute? & lang.attribute? +topic.xmlid.attribute = attribute xml:id { xsd:ID } topic.content = component.head?, @@ -322,6 +323,7 @@ image.content = copyright?, + hotspot*, tooltip* # ~~~~~~ audio @@ -338,6 +340,22 @@ video.attributes = media.id.attribute +# ~~~~~~ hotspot + +hotspot = element hotspot { hotspot.attributes, hotspot.content } + +hotspot.attributes = + x.attribute + & y.attribute + & (width.attribute & height.attribute)? +x.attribute = attribute x { xsd:token {pattern = "\d{1,2}(\.\d)?%"} } +y.attribute = attribute y { xsd:token {pattern = "\d{1,2}(\.\d)?%"} } +width.attribute = attribute width { xsd:token {pattern = "\d{1,2}(\.\d)?%"} } +height.attribute = attribute height { xsd:token {pattern = "\d{1,2}(\.\d)?%"} } + +hotspot.content = + (link | audio | video) + # ~~~~~~ tooltip tooltip = element tooltip { tooltip.attributes, tooltip.content } @@ -347,13 +365,11 @@ & y.attribute & dx.attribute? & dy.attribute? -x.attribute = attribute x { xsd:token {pattern = "\d{1,2}(\.\d)?%"} } -y.attribute = attribute y { xsd:token {pattern = "\d{1,2}(\.\d)?%"} } dx.attribute = attribute dx { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} } dy.attribute = attribute dy { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} } tooltip.content = - (p | image)+ + (p+ | image) # ~~~~~~ media.caption media.caption = element caption { caption.attributes, caption.content }