RelaxNG/publianim.rnc
author iinov
dim., 20 janv. 2019 16:50:11 +0100
changeset 476 6c30a3543cd8
parent 409 e55d34c4db69
permissions -rw-r--r--
Restructuration
Coraline@409
     1
Coraline@409
     2
Coraline@409
     3
include "publidoc.rnc" {
Coraline@409
     4
   start = publianim
Coraline@409
     5
Coraline@409
     6
   image.attributes =
Coraline@409
     7
      media.id.attribute
Coraline@409
     8
    & image.type.attribute?
Coraline@409
     9
    & image.zoom.attribute?
Coraline@409
    10
    & alt.attribute?
Coraline@409
    11
   
Coraline@409
    12
   image.zoom.attribute = attribute zoom {"true" | "false"}
Coraline@409
    13
Coraline@409
    14
   media.image.content =
Coraline@409
    15
   copyright?,
Coraline@409
    16
   hotspot*
Coraline@409
    17
   
Coraline@409
    18
   audio.attributes =
Coraline@409
    19
      media.id.attribute
Coraline@409
    20
    & audio.type?
Coraline@409
    21
   audio.type = attribute type { "music" | "voice" | "fr" | "en"
Coraline@409
    22
    | "background" | "smil" }
Coraline@409
    23
Coraline@409
    24
   
Coraline@409
    25
   inlines = mixed {
Coraline@409
    26
      sup*
Coraline@409
    27
    & sub*
Coraline@409
    28
    & var*
Coraline@409
    29
    & number*
Coraline@409
    30
    & acronym*
Coraline@409
    31
    & warning*
Coraline@409
    32
Coraline@409
    33
    & highlight*
Coraline@409
    34
    & emphasis*
Coraline@409
    35
    & mentioned*
Coraline@409
    36
    & literal*
Coraline@409
    37
    & term*
Coraline@409
    38
    & stage*
Coraline@409
    39
    & name*
Coraline@409
    40
    & foreign*
Coraline@409
    41
    & date*
Coraline@409
    42
    & math*
Coraline@409
    43
    & quote*
Coraline@409
    44
    & initial*
Coraline@409
    45
    & note*
Coraline@409
    46
    & link*
Coraline@409
    47
    & anchor*
Coraline@409
    48
    & index*
Coraline@409
    49
    & image*
Coraline@409
    50
    & audio*
Coraline@409
    51
    & smil*
Coraline@409
    52
   }
Coraline@409
    53
   
Coraline@409
    54
}
Coraline@409
    55
Coraline@409
    56
publianim = element publianim {
Coraline@409
    57
   publianim.attributes,
Coraline@409
    58
   publianim.content
Coraline@409
    59
}
Coraline@409
    60
Coraline@409
    61
publianim.attributes =
Coraline@409
    62
   version.attribute
Coraline@409
    63
Coraline@409
    64
publianim.content =
Coraline@409
    65
   document
iinov@476
    66
 | topic
Coraline@409
    67
Coraline@409
    68
Coraline@409
    69
# =============================================================================
Coraline@409
    70
#                                 BLOCK LEVEL
Coraline@409
    71
# =============================================================================
Coraline@409
    72
Coraline@409
    73
Coraline@409
    74
# ~~~~~~ hotspot
Coraline@409
    75
# hotspot = element hotspot { hotspot.attributes, hotspot.content }
Coraline@409
    76
Coraline@409
    77
# hotspot.attributes =
Coraline@409
    78
#    x.attribute
Coraline@409
    79
#  & y.attribute
Coraline@409
    80
#  & w.attribute
Coraline@409
    81
#  & h.attribute?
Coraline@409
    82
#  & hotspot.display.attribute?
Coraline@409
    83
#  & hotspot.type.attribute?
Coraline@409
    84
#  & xmlid.attribute?
Coraline@409
    85
# x.attribute = attribute x { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
Coraline@409
    86
# y.attribute = attribute y { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
Coraline@409
    87
# w.attribute = attribute w { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
Coraline@409
    88
# h.attribute = attribute h { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
Coraline@409
    89
# hotspot.display.attribute = attribute display { "normal" | "visible" | "pulse" }
Coraline@409
    90
# hotspot.type.attribute = attribute type { xsd:NCName }
Coraline@409
    91
Coraline@409
    92
# hotspot.content =
Coraline@409
    93
#    ((link | p+ | image | audio | video), (spot, scenario?)?)
Coraline@409
    94
#  | (spot, scenario?)
Coraline@409
    95
#  | empty
Coraline@409
    96
Coraline@409
    97
# ~~~~~~ spot
Coraline@409
    98
# spot = element spot { spot.attributes, spot.content }
Coraline@409
    99
Coraline@409
   100
# spot.attributes =
Coraline@409
   101
#    dx.attribute?
Coraline@409
   102
#  & dy.attribute?
Coraline@409
   103
#  & dw.attribute?
Coraline@409
   104
#  & dh.attribute?
Coraline@409
   105
# dx.attribute = attribute dx { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} }
Coraline@409
   106
# dy.attribute = attribute dy { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} }
Coraline@409
   107
# dw.attribute = attribute dw { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} }
Coraline@409
   108
# dh.attribute = attribute dh { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} }
Coraline@409
   109
Coraline@409
   110
# spot.content =
Coraline@409
   111
#    ((p+ | image), audio?)
Coraline@409
   112
#  | audio
Coraline@409
   113
#  | video
Coraline@409
   114
Coraline@409
   115
# ~~~~~~ media.caption
Coraline@409
   116
# media.caption = element caption { caption.attributes, caption.content }
Coraline@409
   117
Coraline@409
   118
# caption.attributes =
Coraline@409
   119
#    x.attribute?
Coraline@409
   120
#  & y.attribute?
Coraline@409
   121
Coraline@409
   122
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ scenario ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Coraline@409
   123
Coraline@409
   124
# ~~~~~~ scenario
Coraline@409
   125
# scenario = element scenario { scenario.content }
Coraline@409
   126
Coraline@409
   127
# scenario.content =
Coraline@409
   128
#    init*,
Coraline@409
   129
#    onclick*
Coraline@409
   130
Coraline@409
   131
# ~~~~~~ init
Coraline@409
   132
# init = element init { init.attributes }
Coraline@409
   133
Coraline@409
   134
# init.attributes =
Coraline@409
   135
#    init.action.attribute
Coraline@409
   136
#  & target.attribute?
Coraline@409
   137
# init.action.attribute = attribute action { "hide" }
Coraline@409
   138
# target.attribute = attribute target { "hotspot" | "spot" }
Coraline@409
   139
Coraline@409
   140
# ~~~~~~ onclick
Coraline@409
   141
# onclick = element onclick { onclick.attributes }
Coraline@409
   142
Coraline@409
   143
# onclick.attributes =
Coraline@409
   144
#    onclick.action.attribute
Coraline@409
   145
#  & target.attribute?
Coraline@409
   146
# onclick.action.attribute = attribute action { "show" }
Coraline@409
   147
Coraline@409
   148
Coraline@409
   149
# =============================================================================
Coraline@409
   150
#                                 INLINE LEVEL
Coraline@409
   151
# =============================================================================
Coraline@409
   152
Coraline@409
   153
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ smil ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Coraline@409
   154
Coraline@409
   155
# smil = element smil { smil.attributes, smil.content }
Coraline@409
   156
Coraline@409
   157
# smil.attributes =
Coraline@409
   158
#    audio.attribute?
Coraline@409
   159
#  & begin.attribute?
Coraline@409
   160
#  & end.attribute?
Coraline@409
   161
# audio.attribute = attribute audio { xsd:anyURI }
Coraline@409
   162
# begin.attribute = attribute begin { xsd:decimal }
Coraline@409
   163
# end.attribute = attribute end { xsd:decimal }
Coraline@409
   164
Coraline@409
   165
# smil.content = inlines