RelaxNG/publidoc.rnc
changeset 122 a0b8294a5a99
parent 120 01d4b1ac09af
child 127 efce69890bfd
equal deleted inserted replaced
121:f3e221b25f64 122:a0b8294a5a99
   109 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ topic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   109 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ topic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   110 
   110 
   111 topic = element topic { topic.attributes, topic.content }
   111 topic = element topic { topic.attributes, topic.content }
   112 
   112 
   113 topic.attributes =
   113 topic.attributes =
   114    topic.id.attribute?
   114    (topic.id.attribute | topic.xmlid.attribute)?
   115  & topic.type.attribute?
   115  & topic.type.attribute?
   116  & lang.attribute?
   116  & lang.attribute?
       
   117 topic.xmlid.attribute = attribute xml:id { xsd:ID }
   117 
   118 
   118 topic.content =
   119 topic.content =
   119    component.head?,
   120    component.head?,
   120    section+
   121    section+
   121 
   122 
   320 media.id.attribute = attribute id { xsd:NMTOKEN }
   321 media.id.attribute = attribute id { xsd:NMTOKEN }
   321 image.type = attribute type { "thumbnail" | "icon" }
   322 image.type = attribute type { "thumbnail" | "icon" }
   322 
   323 
   323 image.content =
   324 image.content =
   324    copyright?,
   325    copyright?,
       
   326    hotspot*,
   325    tooltip*
   327    tooltip*
   326 
   328 
   327 # ~~~~~~ audio
   329 # ~~~~~~ audio
   328 audio = element audio { audio.attributes }
   330 audio = element audio { audio.attributes }
   329 
   331 
   336 video = element video { video.attributes }
   338 video = element video { video.attributes }
   337 
   339 
   338 video.attributes =
   340 video.attributes =
   339    media.id.attribute
   341    media.id.attribute
   340 
   342 
       
   343 # ~~~~~~ hotspot
       
   344 
       
   345 hotspot = element hotspot { hotspot.attributes, hotspot.content }
       
   346 
       
   347 hotspot.attributes =
       
   348    x.attribute
       
   349  & y.attribute
       
   350  & (width.attribute & height.attribute)?
       
   351 x.attribute = attribute x { xsd:token {pattern = "\d{1,2}(\.\d)?%"} }
       
   352 y.attribute = attribute y { xsd:token {pattern = "\d{1,2}(\.\d)?%"} }
       
   353 width.attribute = attribute width { xsd:token {pattern = "\d{1,2}(\.\d)?%"} }
       
   354 height.attribute = attribute height { xsd:token {pattern = "\d{1,2}(\.\d)?%"} }
       
   355 
       
   356 hotspot.content =
       
   357    (link | audio | video)
       
   358    
   341 # ~~~~~~ tooltip
   359 # ~~~~~~ tooltip
   342 
   360 
   343 tooltip = element tooltip { tooltip.attributes, tooltip.content }
   361 tooltip = element tooltip { tooltip.attributes, tooltip.content }
   344 
   362 
   345 tooltip.attributes =
   363 tooltip.attributes =
   346    x.attribute
   364    x.attribute
   347  & y.attribute
   365  & y.attribute
   348  & dx.attribute?
   366  & dx.attribute?
   349  & dy.attribute?
   367  & dy.attribute?
   350 x.attribute = attribute x { xsd:token {pattern = "\d{1,2}(\.\d)?%"} }
       
   351 y.attribute = attribute y { xsd:token {pattern = "\d{1,2}(\.\d)?%"} }
       
   352 dx.attribute = attribute dx { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} }
   368 dx.attribute = attribute dx { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} }
   353 dy.attribute = attribute dy { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} }
   369 dy.attribute = attribute dy { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} }
   354 
   370 
   355 tooltip.content =
   371 tooltip.content =
   356    (p | image)+
   372    (p+ | image)
   357    
   373    
   358 # ~~~~~~ media.caption
   374 # ~~~~~~ media.caption
   359 media.caption = element caption { caption.attributes, caption.content }
   375 media.caption = element caption { caption.attributes, caption.content }
   360 
   376 
   361 caption.attributes =
   377 caption.attributes =