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