|
1 <!-- |
|
2 Wireless Markup Language (WML) Document Type Definition. |
|
3 WML is an XML language. Typical usage: |
|
4 <?xml version="1.0"?> |
|
5 <!DOCTYPE WML PUBLIC "-//WAPFORUM//DTD WML 1.0//EN" |
|
6 "http://www.wapforum.org/DTD/wml.xml"> |
|
7 <WML> |
|
8 ... |
|
9 </WML> |
|
10 --> |
|
11 |
|
12 <!ENTITY % length "CDATA"> <!-- [0-9]+ for pixels or [0-9]+"%" for |
|
13 percentage length --> |
|
14 <!ENTITY % vdata "CDATA"> <!-- attribute value possibly containing |
|
15 variable references --> |
|
16 <!ENTITY % URL "%vdata;"> <!-- URL or URN designating a hypertext |
|
17 node. May contain variable references --> |
|
18 <!ENTITY % boolean "(TRUE|FALSE)"> |
|
19 <!ENTITY % number "NMTOKEN"> <!-- a number, with format [0-9]+ --> |
|
20 |
|
21 <!ENTITY % emph "EM | STRONG | B | I | U | BIG | SMALL"> |
|
22 <!ENTITY % tab "TAB"> |
|
23 <!ENTITY % layout "BR"> |
|
24 |
|
25 <!ENTITY % text "#PCDATA | %emph; | %tab;"> |
|
26 <!ENTITY % inline "%text; | %layout;"> |
|
27 |
|
28 <!-- flow covers "card-level" elements, such as text and images --> |
|
29 <!ENTITY % flow "%inline; | IMG | A"> |
|
30 |
|
31 <!-- Task types --> |
|
32 <!ENTITY % task "GO | PREV | NOOP | REFRESH"> |
|
33 |
|
34 <!-- Navigation and event elements --> |
|
35 <!ENTITY % navelmts "DO | ONEVENT"> |
|
36 |
|
37 <!--================ Decks and Cards ================--> |
|
38 |
|
39 <!ELEMENT WML ( HEAD?, TEMPLATE?, CARD+ )> |
|
40 <!ATTLIST WML |
|
41 xml:lang NMTOKEN #IMPLIED |
|
42 > |
|
43 |
|
44 <!-- card intrinsic events --> |
|
45 <!ENTITY % cardev |
|
46 "ONENTERFORWARD %URL; #IMPLIED |
|
47 ONENTERBACKWARD %URL; #IMPLIED |
|
48 ONTIMER %URL; #IMPLIED" |
|
49 > |
|
50 |
|
51 <!-- CARD field types --> |
|
52 <!ENTITY % fields "%flow; | INPUT | SELECT | FIELDSET"> |
|
53 |
|
54 <!ELEMENT CARD (%fields; | %navelmts; | TIMER)*> |
|
55 <!ATTLIST CARD |
|
56 NAME NMTOKEN #IMPLIED |
|
57 TITLE %vdata; #IMPLIED |
|
58 NEWCONTEXT %boolean; "FALSE" |
|
59 STYLE (LIST|SET) "LIST" |
|
60 %cardev; |
|
61 > |
|
62 |
|
63 <!--================ Event Bindings ================--> |
|
64 |
|
65 <!ELEMENT DO (%task;)> |
|
66 <!ATTLIST DO |
|
67 TYPE CDATA #REQUIRED |
|
68 LABEL %vdata; #IMPLIED |
|
69 NAME NMTOKEN #IMPLIED |
|
70 OPTIONAL %boolean; "FALSE" |
|
71 > |
|
72 |
|
73 <!ELEMENT ONEVENT (%task;)> |
|
74 <!ATTLIST ONEVENT |
|
75 TYPE CDATA #REQUIRED |
|
76 > |
|
77 |
|
78 <!--================ Deck-level declarations ================--> |
|
79 |
|
80 <!ELEMENT HEAD ( ACCESS | META )+> |
|
81 |
|
82 <!ELEMENT TEMPLATE (%navelmts;)*> |
|
83 <!ATTLIST TEMPLATE |
|
84 %cardev; |
|
85 > |
|
86 |
|
87 <!ELEMENT ACCESS EMPTY> |
|
88 <!ATTLIST ACCESS |
|
89 DOMAIN CDATA #IMPLIED |
|
90 PATH CDATA #IMPLIED |
|
91 PUBLIC %boolean; "FALSE" |
|
92 > |
|
93 |
|
94 <!ELEMENT META EMPTY> |
|
95 <!ATTLIST META |
|
96 HTTP-EQUIV CDATA #IMPLIED |
|
97 NAME CDATA #IMPLIED |
|
98 USER-AGENT CDATA #IMPLIED |
|
99 CONTENT CDATA #REQUIRED |
|
100 SCHEME CDATA #IMPLIED |
|
101 > |
|
102 |
|
103 <!--================ Tasks ================--> |
|
104 |
|
105 <!ELEMENT GO (VAR)*> |
|
106 <!ATTLIST GO |
|
107 URL %URL; #REQUIRED |
|
108 SENDREFERER %boolean; "FALSE" |
|
109 METHOD (POST|GET) "GET" |
|
110 ACCEPT-CHARSET CDATA #IMPLIED |
|
111 POSTDATA %vdata; #IMPLIED |
|
112 > |
|
113 |
|
114 <!ELEMENT PREV (VAR)*> |
|
115 |
|
116 <!ELEMENT REFRESH (VAR)+> |
|
117 |
|
118 <!ELEMENT NOOP EMPTY> |
|
119 |
|
120 <!--================ VAR ================--> |
|
121 |
|
122 <!ELEMENT VAR EMPTY> |
|
123 <!ATTLIST VAR |
|
124 NAME %vdata; #REQUIRED |
|
125 VALUE %vdata; #REQUIRED |
|
126 > |
|
127 |
|
128 <!--================ CARD Fields ================--> |
|
129 |
|
130 <!ELEMENT SELECT (OPTGROUP|OPTION)+> |
|
131 <!ATTLIST SELECT |
|
132 TITLE %vdata; #IMPLIED |
|
133 KEY NMTOKEN #IMPLIED |
|
134 DEFAULT %vdata; #IMPLIED |
|
135 IKEY NMTOKEN #IMPLIED |
|
136 IDEFAULT %vdata; #IMPLIED |
|
137 MULTIPLE %boolean; "FALSE" |
|
138 TABINDEX %number; #IMPLIED |
|
139 > |
|
140 |
|
141 <!ELEMENT OPTGROUP (OPTGROUP|OPTION)+ > |
|
142 <!ATTLIST OPTGROUP |
|
143 TITLE %vdata; #IMPLIED |
|
144 > |
|
145 |
|
146 <!ELEMENT OPTION (%text; | ONEVENT)*> |
|
147 <!ATTLIST OPTION |
|
148 VALUE %vdata; #IMPLIED |
|
149 TITLE %vdata; #IMPLIED |
|
150 ONCLICK %URL; #IMPLIED |
|
151 > |
|
152 |
|
153 <!ELEMENT INPUT EMPTY> |
|
154 <!ATTLIST INPUT |
|
155 KEY NMTOKEN #REQUIRED |
|
156 TYPE (TEXT|PASSWORD) "TEXT" |
|
157 VALUE %vdata; #IMPLIED |
|
158 DEFAULT %vdata; #IMPLIED |
|
159 FORMAT CDATA #IMPLIED |
|
160 EMPTYOK %boolean; "FALSE" |
|
161 SIZE %number; #IMPLIED |
|
162 MAXLENGTH %number; #IMPLIED |
|
163 TABINDEX %number; #IMPLIED |
|
164 TITLE %vdata; #IMPLIED |
|
165 > |
|
166 |
|
167 <!ELEMENT FIELDSET (%fields;)* > |
|
168 <!ATTLIST FIELDSET |
|
169 TITLE %vdata; #IMPLIED |
|
170 > |
|
171 |
|
172 <!ELEMENT TIMER EMPTY> |
|
173 <!ATTLIST TIMER |
|
174 KEY NMTOKEN #IMPLIED |
|
175 DEFAULT %vdata; #REQUIRED |
|
176 > |
|
177 |
|
178 <!--================ Images ================--> |
|
179 |
|
180 <!ENTITY % IAlign "(TOP|MIDDLE|BOTTOM)" > |
|
181 |
|
182 <!ELEMENT IMG EMPTY> |
|
183 <!ATTLIST IMG |
|
184 ALT %vdata; #IMPLIED |
|
185 SRC %URL; #IMPLIED |
|
186 LOCALSRC %vdata; #IMPLIED |
|
187 VSPACE %length; "0" |
|
188 HSPACE %length; "0" |
|
189 ALIGN %IAlign; "BOTTOM" |
|
190 HEIGHT %length; #IMPLIED |
|
191 WIDTH %length; #IMPLIED |
|
192 > |
|
193 |
|
194 <!--================ Anchor ================--> |
|
195 |
|
196 <!ELEMENT A ( %inline; | GO | PREV | REFRESH )*> |
|
197 <!ATTLIST A |
|
198 TITLE %vdata; #IMPLIED |
|
199 > |
|
200 |
|
201 <!--================ Text layout and line breaks ================--> |
|
202 |
|
203 <!-- Text alignment attributes --> |
|
204 <!ENTITY % TAlign "(LEFT|RIGHT|CENTER)" > |
|
205 |
|
206 <!ELEMENT TAB EMPTY> |
|
207 <!ATTLIST TAB |
|
208 ALIGN %TAlign; "LEFT" |
|
209 > |
|
210 |
|
211 <!ELEMENT EM (%flow;)*> |
|
212 <!ELEMENT STRONG (%flow;)*> |
|
213 <!ELEMENT B (%flow;)*> |
|
214 <!ELEMENT I (%flow;)*> |
|
215 <!ELEMENT U (%flow;)*> |
|
216 <!ELEMENT BIG (%flow;)*> |
|
217 <!ELEMENT SMALL (%flow;)*> |
|
218 |
|
219 <!ENTITY % BRMode "(WRAP|NOWRAP)" > |
|
220 <!ELEMENT BR EMPTY> |
|
221 <!ATTLIST BR |
|
222 ALIGN %TAlign; "LEFT" |
|
223 MODE %BRMode; #IMPLIED |
|
224 > |
|
225 |
|
226 <!ENTITY quot """> <!-- quotation mark --> |
|
227 <!ENTITY amp "&#38;"> <!-- ampersand --> |
|
228 <!ENTITY apos "'"> <!-- apostrophe --> |
|
229 <!ENTITY lt "&#60;"> <!-- less than --> |
|
230 <!ENTITY gt ">"> <!-- greater than --> |
|
231 <!ENTITY nbsp " "> <!-- non-breaking space --> |
|
232 <!ENTITY shy "­"> <!-- soft hyphen (discretionary hyphen) --> |