RelaxNG/publidoc.rnc
changeset 176 b1ce505b889d
parent 173 d2b8386ab9a2
child 177 fbd3e7259bbc
equal deleted inserted replaced
175:9817635631aa 176:b1ce505b889d
   349 media.id.attribute = attribute id { xsd:NMTOKEN }
   349 media.id.attribute = attribute id { xsd:NMTOKEN }
   350 image.type = attribute type { "cover" | "thumbnail" | "icon" }
   350 image.type = attribute type { "cover" | "thumbnail" | "icon" }
   351 
   351 
   352 image.content =
   352 image.content =
   353    copyright?,
   353    copyright?,
   354    hotspot*,
   354    hotspot*
   355    tooltip*
       
   356 
   355 
   357 # ~~~~~~ audio
   356 # ~~~~~~ audio
   358 audio = element audio { audio.attributes }
   357 audio = element audio { audio.attributes }
   359 
   358 
   360 audio.attributes =
   359 audio.attributes =
   372 hotspot = element hotspot { hotspot.attributes, hotspot.content }
   371 hotspot = element hotspot { hotspot.attributes, hotspot.content }
   373 
   372 
   374 hotspot.attributes =
   373 hotspot.attributes =
   375    x.attribute
   374    x.attribute
   376  & y.attribute
   375  & y.attribute
       
   376  & dx.attribute?
       
   377  & dy.attribute?
   377  & (width.attribute & height.attribute)?
   378  & (width.attribute & height.attribute)?
       
   379  & hidden.attribute?
   378 x.attribute = attribute x { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
   380 x.attribute = attribute x { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
   379 y.attribute = attribute y { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
   381 y.attribute = attribute y { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
       
   382 dx.attribute = attribute dx { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} }
       
   383 dy.attribute = attribute dy { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} }
   380 width.attribute = attribute width {
   384 width.attribute = attribute width {
   381    xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
   385    xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
   382 height.attribute = attribute height {
   386 height.attribute = attribute height {
   383    xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
   387    xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
   384 
   388 hidden.attribute = attribute hidden { xsd:boolean }
       
   389    
   385 hotspot.content =
   390 hotspot.content =
   386    (link | audio | video)
   391    (p | link | image | audio | video)
   387    
       
   388 # ~~~~~~ tooltip
       
   389 tooltip = element tooltip { tooltip.attributes, tooltip.content }
       
   390 
       
   391 tooltip.attributes =
       
   392    x.attribute
       
   393  & y.attribute
       
   394  & dx.attribute?
       
   395  & dy.attribute?
       
   396 dx.attribute = attribute dx { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} }
       
   397 dy.attribute = attribute dy { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} }
       
   398 
       
   399 tooltip.content =
       
   400    (p+ | image)
       
   401    
   392    
   402 # ~~~~~~ media.caption
   393 # ~~~~~~ media.caption
   403 media.caption = element caption { caption.attributes, caption.content }
   394 media.caption = element caption { caption.attributes, caption.content }
   404 
   395 
   405 caption.attributes =
   396 caption.attributes =