1# -*- coding: utf-8 -*-
2# cython: language_level=3, always_allow_keywords=True
3
4## Copyright 1999-2018 by LivingLogic AG, Bayreuth/Germany
5## Copyright 1999-2018 by Walter Dörwald
6##
7## All Rights Reserved
8##
9## See ll/xist/__init__.py for the license
10
11
12"""
13An XIST module that contains the elements and entities for i-mode compatible HTML.
14"""
15
16
17import cgi # for parse_header
18
19from ll.xist import xsc, sims
20
21
22__docformat__ = "reStructuredText"
23
24
25xmlns = "http://www.nttdocomo.co.jp/imode"
26
27
28class a(xsc.Element):
29	xmlns = xmlns
30	class Attrs(xsc.Element.Attrs):
31		class name(xsc.TextAttr):
32			"Designates a marker name within an HTML file (1.0)"
33		class accesskey(xsc.TextAttr):
34			"Directkey function (1.0)"
35		class href(xsc.URLAttr):
36			"Designates a link to a Web site (http), e-mail address (mailto) or phone number (tel) (1.0)"
37		class cti(xsc.TextAttr):
38			"Dial function + tone input function (2.0)"
39		class ijam(xsc.TextAttr):
40			"Designates the ID of the downloaded i appli that the OBJECT tag specifies. (3.0)"
41		class utn(xsc.BoolAttr):
42			"Verifies individual identification information (3.0)"
43		class subject(xsc.TextAttr):
44			"Designates the subject with mailto: (3.0)"
45		class body(xsc.TextAttr):
46			"Designates the body with mailto: (3.0)"
47		class telbook(xsc.TextAttr):
48			"Records in telphone book (3.0)"
49		class kana(xsc.TextAttr):
50			"Records in telphone book (3.0)"
51		class email(xsc.TextAttr):
52			"Records in telphone book (3.0)"
53			xmlname = "e-mail"
54
55
56class base(xsc.Element):
57	"""
58	Designates the base URL for the relative paths used in an HTML file. (1.0)
59	"""
60	xmlns = xmlns
61	class Attrs(xsc.Element.Attrs):
62		class href(xsc.URLAttr): pass
63
64
65class blink(xsc.Element):
66	"""
67	Blinks the designated text. (2.0)
68	"""
69	xmlns = xmlns
70
71
72class blockquote(xsc.Element):
73	"""
74	Creates a text block and displays a quote mark. (1.0)
75	"""
76	xmlns = xmlns
77
78
79class body(xsc.Element):
80	"""
81	Designates content to be displayed as a page.
82	"""
83	xmlns = xmlns
84	class Attrs(xsc.Element.Attrs):
85		class bgcolor(xsc.TextAttr):
86			"Designates background color (2.0)"
87		class text(xsc.TextAttr):
88			"Designates text color (2.0)"
89		class link(xsc.TextAttr):
90			"Designates link color (2.0)"
91
92
93class br(xsc.Element):
94	xmlns = xmlns
95	class Attrs(xsc.Element.Attrs):
96		class clear(xsc.TextAttr):
97			"""
98			Designates the way a character string wraps around an inline image by
99			deciding where line feeding takes place. Depending on the attribute,
100			it also cancels the wraparound function. (1.0)
101			"""
102
103
104class center(xsc.Element):
105	"""
106	Centers character strings, images and tables. (1.0)
107	"""
108	xmlns = xmlns
109
110
111class dd(xsc.Element):
112	"""
113	Creates a definition list. (See :class:`dl`) (1.0)
114	"""
115	xmlns = xmlns
116
117
118class dir(xsc.Element):
119	"""
120	Creates a list of menus or directories. Each list item must be a
121	:class:`li`. (1.0)
122	"""
123	xmlns = xmlns
124
125
126class div(xsc.Element):
127	xmlns = xmlns
128	class Attrs(xsc.Element.Attrs):
129		class align(xsc.TextAttr):
130			"Aligns the content left or right or centers it (1.0)"
131
132
133class dl(xsc.Element):
134	"""
135	Creates a definition list. The content consists of :class:`dd` and
136	:class:`dt` elements. (1.0)
137	"""
138	xmlns = xmlns
139
140
141class dt(xsc.Element):
142	"""
143	Designates the list heading and aligns the character string at left. (1.0)
144	"""
145	xmlns = xmlns
146
147
148class font(xsc.Element):
149	"""
150	Designates the color of a certain portion of text. (2.0)
151	"""
152	xmlns = xmlns
153	class Attrs(xsc.Element.Attrs):
154		class color(xsc.TextAttr): pass
155
156
157class form(xsc.Element):
158	"""
159	Encloses an area to be shown as a data input form. (1.0)
160	"""
161	xmlns = xmlns
162	class Attrs(xsc.Element.Attrs):
163		class action(xsc.URLAttr):
164			"URL or e-mail address (mailto) the input form will be sent to. (1.0)"
165		class method(xsc.TextAttr):
166			"Designates the method by which data is sent to the server, to either post or get. (1.0)"
167		class utn(xsc.BoolAttr):
168			"Verifies individual identification information. (3.0)"
169
170
171class head(xsc.Element):
172	"""
173	Designates the information that is used as the page title and/or by the
174	server. The :class:`head` tag follows the :class:`html` tag. (1.0)
175	"""
176	xmlns = xmlns
177
178
179class h1(xsc.Element):
180	"""
181	Designates level 1 header. (1.0)
182	"""
183	xmlns = xmlns
184	class Attrs(xsc.Element.Attrs):
185		class align(xsc.TextAttr):
186			"Designates the alignment of the header. (1.0)"
187
188
189class h2(xsc.Element):
190	"""
191	Designates level 2 header. (1.0)
192	"""
193	xmlns = xmlns
194	class Attrs(xsc.Element.Attrs):
195		class align(xsc.TextAttr):
196			"Designates the alignment of the header. (1.0)"
197
198
199class h3(xsc.Element):
200	"""
201	Designates level 3 header. (1.0)
202	"""
203	xmlns = xmlns
204	class Attrs(xsc.Element.Attrs):
205		class align(xsc.TextAttr):
206			"Designates the alignment of the header. (1.0)"
207
208
209class h4(xsc.Element):
210	"""
211	Designates level 4 header. (1.0)
212	"""
213	xmlns = xmlns
214	class Attrs(xsc.Element.Attrs):
215		class align(xsc.TextAttr):
216			"Designates the alignment of the header. (1.0)"
217
218
219class h5(xsc.Element):
220	"""
221	Designates level 5 header. (1.0)
222	"""
223	xmlns = xmlns
224	class Attrs(xsc.Element.Attrs):
225		class align(xsc.TextAttr):
226			"Designates the alignment of the header. (1.0)"
227
228
229class h6(xsc.Element):
230	"""
231	Designates level 6 header. (1.0)
232	"""
233	xmlns = xmlns
234	class Attrs(xsc.Element.Attrs):
235		class align(xsc.TextAttr):
236			"Designates the alignment of the header. (1.0)"
237
238
239class hr(xsc.Element):
240	"""
241	Designates the settings of the horizontal dividing line. (1.0)
242	"""
243	xmlns = xmlns
244	class Attrs(xsc.Element.Attrs):
245		class align(xsc.TextAttr):
246			"Designates the alignment of the horizontal line. (1.0)"
247		class size(xsc.TextAttr):
248			"Sets the thickness of the horizontal line.(1.0)"
249		class width(xsc.TextAttr):
250			"Determines the length of the horizontal line. (1.0)"
251		class noshade(xsc.BoolAttr):
252			"Gives the horizontal line a two-dimensional appearance. (1.0)"
253
254
255class html(xsc.Element):
256	"""
257	The root element
258	"""
259	xmlns = xmlns
260
261
262class img(xsc.Element):
263	"""
264	Designates an image file (1.0)
265	"""
266	xmlns = xmlns
267	class Attrs(xsc.Element.Attrs):
268		class src(xsc.URLAttr):
269			"the image URL (1.0)"
270		class align(xsc.TextAttr):
271			"""
272			Defines the way the image and character string are laid out, and how
273			the character string wraps around the image. ``top``, ``middle`` or
274			``bottom``. (1.0)
275			"""
276		class width(xsc.TextAttr):
277			"Sets the image width (1.0)"
278		class height(xsc.TextAttr):
279			"Sets the image height (1.0)"
280		class hspace(xsc.IntAttr):
281			"Sets the blank space to the left of the image on the screen. (1.0)"
282		class vspace(xsc.IntAttr):
283			"Sets the blank space between the image and the preceding line. (1.0)"
284		class alt(xsc.TextAttr):
285			"Designates a text string that can be shown as an alternative to the image. (1.0)"
286
287
288class input(xsc.Element):
289	xmlns = xmlns
290	class Attrs(xsc.Element.Attrs):
291		class type(xsc.TextAttr):
292			"""
293			Displays a textbox (``text``), a password input textbox (``password``),
294			checkbox (``checkbox``), radio button (``radio``), hidden field
295			(``hidden``), submit (``submit``) or reset (``reset``) (1.0)
296			"""
297		class name(xsc.TextAttr):
298			"""
299			Designates the name of the field employed to pass the data, obtained
300			using the :class:`input` tag, to an CGI script and others. (1.0)
301			"""
302		class size(xsc.IntAttr):
303			"Designates the width of the textbox by number of characters. (1.0)"
304		class maxlength(xsc.IntAttr):
305			"Limits the number of characters that can be input to the textbox. (1.0)"
306		class accesskey(xsc.TextAttr):
307			"Directkey function. (1.0)"
308		class value(xsc.TextAttr):
309			"Designates the initial value of the data. (1.0)"
310		class istyle(xsc.TextAttr):
311			"(2.0)"
312		class checked(xsc.BoolAttr):
313			"Makes a selected checkbox the default. (1.0)"
314
315
316class li(xsc.Element):
317	"""
318	A list item (1.0)
319	"""
320	xmlns = xmlns
321	class Attrs(xsc.Element.Attrs):
322		class type(xsc.TextAttr):
323			"""
324			Designates number format of a list. ``1`` is numeric, ``A`` is capital
325			Roman letters, and ``a`` is lower-case Roman letters. (2.0)
326			"""
327		class value(xsc.IntAttr):
328			"Designates the starting number of a list. (2.0)"
329
330
331class marquee(xsc.Element):
332	"""
333	Scrolls text horizontally (2.0)
334	"""
335	xmlns = xmlns
336	class Attrs(xsc.Element.Attrs):
337		class behaviour(xsc.TextAttr):
338			"""
339			Designates whether text will scroll off screen, stop at the edge of
340			the screen, etc. (``scroll``, ``slide`` or ``alternate``) (2.0)
341			"""
342		class direction(xsc.TextAttr):
343			"""
344			Designates which direction text will scroll. (``left`` or ``right``) (2.0)
345			"""
346		class loop(xsc.IntAttr):
347			"Designates how many times the text will scroll. (2.0)"
348		class height(xsc.TextAttr):
349			"Designates height. (Fixed at one line (Cannot be changed by user.).) (2.0)"
350		class width(xsc.TextAttr):
351			"Designates width. (Fixed to screen width (Cannot be changed by user.).) (2.0)"
352		class scrollamount(xsc.TextAttr):
353			"Designates the distance the text will scroll. (Cannot be changed by user.) (2.0)"
354		class scrolldelay(xsc.TextAttr):
355			"Designates the time it takes for text to scroll. (Cannot be changed by user.) (2.0)"
356
357
358class menu(xsc.Element):
359	"""
360	Creates a menu list (1.0)
361	"""
362	xmlns = xmlns
363
364
365class meta(xsc.Element):
366	"""
367	Page meta information (2.0)
368	"""
369	xmlns = xmlns
370	class Attrs(xsc.Element.Attrs):
371		class name(xsc.TextAttr):
372			"Designates the name of the meta field"
373		class http_equiv(xsc.TextAttr):
374			"Designates the HTTP header fields you want to emulate. (Fixed to ``Content-Type``) (2.0)"
375			xmlname = "http-equiv"
376		class content(xsc.TextAttr):
377			"Designates content type (Fixed ``to text/html; charset=SHIFT_JIS``) (2.0)"
378
379	def publish(self, publisher):
380		if "http_equiv" in self.attrs:
381			ctype = str(self["http_equiv"]).lower()
382			if ctype == "content-type" and "content" in self.attrs:
383				(contenttype, options) = cgi.parse_header(str(self["content"]))
384				if "charset" not in options or options["charset"] != publisher.encoding:
385					options["charset"] = publisher.encoding
386					node = self.__class__(
387						self.attrs,
388						http_equiv="Content-Type",
389						content=(contenttype, "; ", "; ".join(f"{name}={value}" for (name, value) in options.items()))
390					)
391					return node.publish(publisher) # return a generator-iterator
392		return super().publish(publisher) # return a generator-iterator
393
394
395class object(xsc.Element):
396	xmlns = xmlns
397	class Attrs(xsc.Element.Attrs):
398		class declare(xsc.BoolAttr):
399			"Identifier that that declares and OBJECT ??? (3.0)"
400		class id(xsc.TextAttr):
401			"The ID of this OBJECT tag (unique within HTML). (3.0)"
402		class data(xsc.URLAttr):
403			"The URL of the i appli ADF that corresponds to the OBJECT tag. (3.0)"
404		class type(xsc.TextAttr):
405			"""Content type of the ADF designated in the data attribute ("application/x-jam" fixed). (2.0)"""
406
407
408class ol(xsc.Element):
409	"""
410	Creates a numbered list. (1.0)
411	"""
412	xmlns = xmlns
413	class Attrs(xsc.Element.Attrs):
414		class type(xsc.TextAttr):
415			"""
416			Designates number format of a list. ``1`` is numeric, ``A`` is capital Roman letters,
417			and ``a`` is lower-case Roman letters. (2.0)
418			"""
419		class start(xsc.IntAttr):
420			"Designates the starting number of a list. (2.0)"
421
422
423class option(xsc.Element):
424	xmlns = xmlns
425	class Attrs(xsc.Element.Attrs):
426		class selected(xsc.BoolAttr):
427			"Designates the selected (initial value). (2.0)"
428		class value(xsc.TextAttr):
429			"Designates selected menu items. (1.0)"
430
431
432class p(xsc.Element):
433	"""
434	Creates a text block. (1.0)
435	"""
436	xmlns = xmlns
437	class Attrs(xsc.Element.Attrs):
438		class align(xsc.TextAttr):
439			"Aligns the content left or right or centers it (1.0)"
440
441
442class plaintext(xsc.Element):
443	"""
444	Displays a text file exactly as entered.
445	"""
446	xmlns = xmlns
447
448
449class pre(xsc.Element):
450	"""
451	Displays a source file exactly as entered, including line feeds and blank
452	spaces.
453	"""
454	xmlns = xmlns
455
456
457class select(xsc.Element):
458	xmlns = xmlns
459	class Attrs(xsc.Element.Attrs):
460		class name(xsc.TextAttr):
461			"Designates the name of the list for passing selected items. (1.0)"
462		class size(xsc.IntAttr):
463			"Designates the number of lines for the list. (1.0)"
464		class multiple(xsc.BoolAttr):
465			"Enables multiple selections. (2.0)"
466
467
468class textarea(xsc.Element):
469	xmlns = xmlns
470	class Attrs(xsc.Element.Attrs):
471		class name(xsc.TextAttr):
472			"""
473			Designates the name of the field employed to pass the data, obtained
474			using the TEXTAREA tag, to a CGI script and others. (1.0)
475			"""
476		class accesschar(xsc.TextAttr):
477			"(1.0)"
478		class rows(xsc.IntAttr):
479			"Designates the height of the input box field. (1.0)"
480		class cols(xsc.IntAttr):
481			"Designates the width of the input box field. (1.0)"
482		class istyle(xsc.TextAttr):
483			"Designates full-size Kana, half-size Kana, Roman letters, and numerals. (2.0)"
484
485
486class title(xsc.Element):
487	"""
488	Designates the page title.
489	"""
490	xmlns = xmlns
491
492
493class ul(xsc.Element):
494	"""
495	Creates a bullet point list (o).
496	"""
497	xmlns = xmlns
498
499
500###
501### "picture symbols"
502###
503
504# Weather
505class fine(xsc.CharRef): codepoint = 0xe63e; xmlns = xmlns
506class cloudy(xsc.CharRef): codepoint = 0xe63f; xmlns = xmlns
507class rain(xsc.CharRef): codepoint = 0xe640; xmlns = xmlns
508class snow(xsc.CharRef): codepoint = 0xe641; xmlns = xmlns
509class thunder(xsc.CharRef): codepoint = 0xe642; xmlns = xmlns
510class typhoon(xsc.CharRef): codepoint = 0xe643; xmlns = xmlns
511class fog(xsc.CharRef): codepoint = 0xe644; xmlns = xmlns
512class drizzle(xsc.CharRef): codepoint = 0xe645; xmlns = xmlns
513
514# Horoscope
515class aries(xsc.CharRef): codepoint = 0xe646; xmlns = xmlns
516class taurus(xsc.CharRef): codepoint = 0xe647; xmlns = xmlns
517class gemini(xsc.CharRef): codepoint = 0xe648; xmlns = xmlns
518class cancer(xsc.CharRef): codepoint = 0xe649; xmlns = xmlns
519class leo(xsc.CharRef): codepoint = 0xe64a; xmlns = xmlns
520class virgo(xsc.CharRef): codepoint = 0xe64b; xmlns = xmlns
521class libra(xsc.CharRef): codepoint = 0xe64c; xmlns = xmlns
522class scorpio(xsc.CharRef): codepoint = 0xe64d; xmlns = xmlns
523class sagittarius(xsc.CharRef): codepoint = 0xe64e; xmlns = xmlns
524class capricorn(xsc.CharRef): codepoint = 0xe64f; xmlns = xmlns
525class aquarius(xsc.CharRef): codepoint = 0xe650; xmlns = xmlns
526class pisces(xsc.CharRef): codepoint = 0xe651; xmlns = xmlns
527
528# Sports
529class sports(xsc.CharRef): codepoint = 0xe652; xmlns = xmlns
530class baseball(xsc.CharRef): codepoint = 0xe653; xmlns = xmlns
531class golf(xsc.CharRef): codepoint = 0xe654; xmlns = xmlns
532class tennis(xsc.CharRef): codepoint = 0xe655; xmlns = xmlns
533class soccer(xsc.CharRef): codepoint = 0xe656; xmlns = xmlns
534class ski(xsc.CharRef): codepoint = 0xe657; xmlns = xmlns
535class basketball(xsc.CharRef): codepoint = 0xe658; xmlns = xmlns
536class motorsports(xsc.CharRef): codepoint = 0xe659; xmlns = xmlns
537
538# General
539class pager(xsc.CharRef): codepoint = 0xe65a; xmlns = xmlns
540
541# Transport
542class train(xsc.CharRef): codepoint = 0xe65b; xmlns = xmlns
543class subway(xsc.CharRef): codepoint = 0xe65c; xmlns = xmlns
544class bullettrain(xsc.CharRef): codepoint = 0xe65d; xmlns = xmlns
545class carsedan(xsc.CharRef): codepoint = 0xe65e; xmlns = xmlns
546class carrv(xsc.CharRef): codepoint = 0xe65f; xmlns = xmlns
547class bus(xsc.CharRef): codepoint = 0xe660; xmlns = xmlns
548class ship(xsc.CharRef): codepoint = 0xe661; xmlns = xmlns
549class airplane(xsc.CharRef): codepoint = 0xe662; xmlns = xmlns
550
551# Town map
552class house(xsc.CharRef): codepoint = 0xe663; xmlns = xmlns
553class building(xsc.CharRef): codepoint = 0xe664; xmlns = xmlns
554class postoffice(xsc.CharRef): codepoint = 0xe665; xmlns = xmlns
555class hospital(xsc.CharRef): codepoint = 0xe666; xmlns = xmlns
556class bank(xsc.CharRef): codepoint = 0xe667; xmlns = xmlns
557class atm(xsc.CharRef): codepoint = 0xe668; xmlns = xmlns
558class hotel(xsc.CharRef): codepoint = 0xe669; xmlns = xmlns
559class conveniencestore(xsc.CharRef): codepoint = 0xe66a; xmlns = xmlns
560class gasstation(xsc.CharRef): codepoint = 0xe66b; xmlns = xmlns
561class parking(xsc.CharRef): codepoint = 0xe66c; xmlns = xmlns
562class trafficsignal(xsc.CharRef): codepoint = 0xe66d; xmlns = xmlns
563class toilet(xsc.CharRef): codepoint = 0xe66e; xmlns = xmlns
564class restaurant(xsc.CharRef): codepoint = 0xe66f; xmlns = xmlns
565class cafe(xsc.CharRef): codepoint = 0xe670; xmlns = xmlns
566class bar(xsc.CharRef): codepoint = 0xe671; xmlns = xmlns
567class beer(xsc.CharRef): codepoint = 0xe672; xmlns = xmlns
568class fastfood(xsc.CharRef): codepoint = 0xe673; xmlns = xmlns
569class boutique(xsc.CharRef): codepoint = 0xe674; xmlns = xmlns
570class hairdresser(xsc.CharRef): codepoint = 0xe675; xmlns = xmlns
571class karaoke(xsc.CharRef): codepoint = 0xe676; xmlns = xmlns
572class movie(xsc.CharRef): codepoint = 0xe677; xmlns = xmlns
573
574# Others
575class diagonallyupwardtowardright(xsc.CharRef): codepoint = 0xe678; xmlns = xmlns
576
577# Town map
578class amusementpark(xsc.CharRef): codepoint = 0xe679; xmlns = xmlns
579class music(xsc.CharRef): codepoint = 0xe67a; xmlns = xmlns
580class art(xsc.CharRef): codepoint = 0xe67b; xmlns = xmlns
581class drama(xsc.CharRef): codepoint = 0xe67c; xmlns = xmlns
582class event(xsc.CharRef): codepoint = 0xe67d; xmlns = xmlns
583class ticket(xsc.CharRef): codepoint = 0xe67e; xmlns = xmlns
584class smoking(xsc.CharRef): codepoint = 0xe67f; xmlns = xmlns
585class nonsmoking(xsc.CharRef): codepoint = 0xe680; xmlns = xmlns
586
587# Gazette
588class camera(xsc.CharRef): codepoint = 0xe681; xmlns = xmlns
589class bag(xsc.CharRef): codepoint = 0xe682; xmlns = xmlns
590class book(xsc.CharRef): codepoint = 0xe683; xmlns = xmlns
591class ribbon(xsc.CharRef): codepoint = 0xe684; xmlns = xmlns
592class present(xsc.CharRef): codepoint = 0xe685; xmlns = xmlns
593class birthday(xsc.CharRef): codepoint = 0xe686; xmlns = xmlns
594class phone(xsc.CharRef): codepoint = 0xe687; xmlns = xmlns
595class mobilephone(xsc.CharRef): codepoint = 0xe688; xmlns = xmlns
596class memo(xsc.CharRef): codepoint = 0xe689; xmlns = xmlns
597class tv(xsc.CharRef): codepoint = 0xe68a; xmlns = xmlns
598class game(xsc.CharRef): codepoint = 0xe68b; xmlns = xmlns
599class cd(xsc.CharRef): codepoint = 0xe68c; xmlns = xmlns
600
601# Playing
602class cardsheart(xsc.CharRef): codepoint = 0xe68d; xmlns = xmlns
603class cardsspade(xsc.CharRef): codepoint = 0xe68e; xmlns = xmlns
604class cardsdiamond(xsc.CharRef): codepoint = 0xe68f; xmlns = xmlns
605class cardsclub(xsc.CharRef): codepoint = 0xe690; xmlns = xmlns
606
607# Body
608class eyes(xsc.CharRef): codepoint = 0xe691; xmlns = xmlns
609class ear(xsc.CharRef): codepoint = 0xe692; xmlns = xmlns
610class handrock(xsc.CharRef): codepoint = 0xe693; xmlns = xmlns
611class handscissors(xsc.CharRef): codepoint = 0xe694; xmlns = xmlns
612class handpaper(xsc.CharRef): codepoint = 0xe695; xmlns = xmlns
613
614# Others
615class diagonallydownwardtowardright(xsc.CharRef): codepoint = 0xe696; xmlns = xmlns
616class diagonallyupwardtowardleft(xsc.CharRef): codepoint = 0xe697; xmlns = xmlns
617
618# Body
619class foot(xsc.CharRef): codepoint = 0xe698; xmlns = xmlns
620class shoe(xsc.CharRef): codepoint = 0xe699; xmlns = xmlns
621class eyeclasses(xsc.CharRef): codepoint = 0xe69a; xmlns = xmlns
622class wheelchair(xsc.CharRef): codepoint = 0xe69b; xmlns = xmlns
623
624# Moon
625class newmoon(xsc.CharRef): codepoint = 0xe69c; xmlns = xmlns
626class waningmoon(xsc.CharRef): codepoint = 0xe69d; xmlns = xmlns
627class halfmoon(xsc.CharRef): codepoint = 0xe69e; xmlns = xmlns
628class crescentmoon(xsc.CharRef): codepoint = 0xe69f; xmlns = xmlns
629class fullmoon(xsc.CharRef): codepoint = 0xe6a0; xmlns = xmlns
630
631# Others
632class dog(xsc.CharRef): codepoint = 0xe6a1; xmlns = xmlns
633class cat(xsc.CharRef): codepoint = 0xe6a2; xmlns = xmlns
634class resort(xsc.CharRef): codepoint = 0xe6a3; xmlns = xmlns
635class christmas(xsc.CharRef): codepoint = 0xe6a4; xmlns = xmlns
636
637class diagonallydownwardtowardleft(xsc.CharRef): codepoint = 0xe6a5; xmlns = xmlns
638
639# Service
640class phoneto(xsc.CharRef): codepoint = 0xe6ce; xmlns = xmlns
641class mailto(xsc.CharRef): codepoint = 0xe6cf; xmlns = xmlns
642class faxto(xsc.CharRef): codepoint = 0xe6d0; xmlns = xmlns
643class email(xsc.CharRef): codepoint = 0xe6d3; xmlns = xmlns
644class providedbydocomo(xsc.CharRef): codepoint = 0xe6d4; xmlns = xmlns
645class docomopoint(xsc.CharRef): codepoint = 0xe6d5; xmlns = xmlns
646class feecharging(xsc.CharRef): codepoint = 0xe6d6; xmlns = xmlns
647class freeofcharge(xsc.CharRef): codepoint = 0xe6d7; xmlns = xmlns
648class id(xsc.CharRef): codepoint = 0xe6d8; xmlns = xmlns
649class password(xsc.CharRef): codepoint = 0xe6d9; xmlns = xmlns
650class continuing(xsc.CharRef): codepoint = 0xe6da; xmlns = xmlns
651class clear(xsc.CharRef): codepoint = 0xe6db; xmlns = xmlns
652class search(xsc.CharRef): codepoint = 0xe6dc; xmlns = xmlns
653class new(xsc.CharRef): codepoint = 0xe6dd; xmlns = xmlns
654class locationinformation(xsc.CharRef): codepoint = 0xe6de; xmlns = xmlns
655class freedial(xsc.CharRef): codepoint = 0xe6df; xmlns = xmlns
656class sharpdial(xsc.CharRef): codepoint = 0xe6e0; xmlns = xmlns
657class mopaq(xsc.CharRef): codepoint = 0xe6e1; xmlns = xmlns
658class key1(xsc.CharRef): codepoint = 0xe6e2; xmlns = xmlns
659class key2(xsc.CharRef): codepoint = 0xe6e3; xmlns = xmlns
660class key3(xsc.CharRef): codepoint = 0xe6e4; xmlns = xmlns
661class key4(xsc.CharRef): codepoint = 0xe6e5; xmlns = xmlns
662class key5(xsc.CharRef): codepoint = 0xe6e6; xmlns = xmlns
663class key6(xsc.CharRef): codepoint = 0xe6e7; xmlns = xmlns
664class key7(xsc.CharRef): codepoint = 0xe6e8; xmlns = xmlns
665class key8(xsc.CharRef): codepoint = 0xe6e9; xmlns = xmlns
666class key9(xsc.CharRef): codepoint = 0xe6ea; xmlns = xmlns
667class key0(xsc.CharRef): codepoint = 0xe6eb; xmlns = xmlns
668
669# Mail
670class blackheart(xsc.CharRef): codepoint = 0xe6ec; xmlns = xmlns
671class flutteringheart(xsc.CharRef): codepoint = 0xe6ed; xmlns = xmlns
672class heartbreak(xsc.CharRef): codepoint = 0xe6ee; xmlns = xmlns
673class hearts(xsc.CharRef): codepoint = 0xe6ef; xmlns = xmlns
674class happyface(xsc.CharRef): codepoint = 0xe6f0; xmlns = xmlns
675class angryface(xsc.CharRef): codepoint = 0xe6f1; xmlns = xmlns
676class disappointedface(xsc.CharRef): codepoint = 0xe6f2; xmlns = xmlns
677class sadface(xsc.CharRef): codepoint = 0xe6f3; xmlns = xmlns
678class dizzy(xsc.CharRef): codepoint = 0xe6f4; xmlns = xmlns
679class good(xsc.CharRef): codepoint = 0xe6f5; xmlns = xmlns
680class cheerful(xsc.CharRef): codepoint = 0xe6f6; xmlns = xmlns
681class comfort(xsc.CharRef): codepoint = 0xe6f7; xmlns = xmlns
682class cute(xsc.CharRef): codepoint = 0xe6f8; xmlns = xmlns
683class kiss(xsc.CharRef): codepoint = 0xe6f9; xmlns = xmlns
684class shining(xsc.CharRef): codepoint = 0xe6fa; xmlns = xmlns
685class goodidea(xsc.CharRef): codepoint = 0xe6fb; xmlns = xmlns
686class angry(xsc.CharRef): codepoint = 0xe6fc; xmlns = xmlns
687class punch(xsc.CharRef): codepoint = 0xe6fd; xmlns = xmlns
688class bomb(xsc.CharRef): codepoint = 0xe6fe; xmlns = xmlns
689class mood(xsc.CharRef): codepoint = 0xe6ff; xmlns = xmlns
690class bad(xsc.CharRef): codepoint = 0xe700; xmlns = xmlns
691class sleepy(xsc.CharRef): codepoint = 0xe701; xmlns = xmlns
692class exclamation(xsc.CharRef): codepoint = 0xe702; xmlns = xmlns
693class exclamationquestion(xsc.CharRef): codepoint = 0xe703; xmlns = xmlns
694class exclamation2(xsc.CharRef): codepoint = 0xe704; xmlns = xmlns
695class bump(xsc.CharRef): codepoint = 0xe705; xmlns = xmlns
696class sweat(xsc.CharRef): codepoint = 0xe706; xmlns = xmlns
697class coldsweat(xsc.CharRef): codepoint = 0xe707; xmlns = xmlns
698class dash(xsc.CharRef): codepoint = 0xe708; xmlns = xmlns
699class macron1(xsc.CharRef): codepoint = 0xe709; xmlns = xmlns
700class macron2(xsc.CharRef): codepoint = 0xe70a; xmlns = xmlns
701class fixed(xsc.CharRef): codepoint = 0xe70b; xmlns = xmlns
702
703
704# Boiled down version of the same stuff in the html namespace
705pe_special_extra = (object, img)
706pe_special_basic = (br, )
707pe_special = pe_special_basic + pe_special_extra
708pe_fontstyle = (font, )
709pe_inline_forms = (input, select, textarea)
710pe_inline = (a,) + pe_special + pe_fontstyle + pe_inline_forms
711pe_Inline = pe_inline
712pe_heading = (h1, h2, h3, h4, h5, h6)
713pe_lists = (ul, ol, dl, menu, dir)
714pe_blocktext = (pre, hr, blockquote, center)
715pe_block = (p,) + pe_heading + (div,) + pe_lists + pe_blocktext
716pe_Flow = pe_block + (form,) + pe_inline
717
718
719base.model = \
720meta.model = \
721hr.model = \
722br.model = \
723img.model = \
724input.model = sims.Empty()
725# Just a guess for blink, plaintext and marquee
726body.model = \
727div.model = \
728li.model = \
729dd.model = \
730blockquote.model = \
731blink.model = \
732plaintext.model = \
733marquee.model = \
734center.model = sims.ElementsOrText(*pe_Flow)
735p.model = \
736h1.model = \
737h2.model = \
738h3.model = \
739h4.model = \
740h5.model = \
741h6.model = \
742dt.model = \
743font.model = sims.ElementsOrText(*pe_Inline)
744ul.model = \
745ol.model = \
746menu.model = \
747dir.model = sims.Elements(li)
748title.model = \
749option.model = \
750textarea.model = sims.NoElements()
751object.model = sims.ElementsOrText(*(pe_block + (form,) + pe_inline))
752dl.model = sims.Elements(dt, dd)
753html.model = sims.Elements(head, body)
754select.model = sims.Elements(option)
755head.model = sims.Elements(title, base, meta, object)
756pre.model = sims.ElementsOrText(*((a,) + pe_special_basic + pe_inline_forms))
757form.model = sims.ElementsOrText(*(pe_block + pe_inline))
758a.model = sims.ElementsOrText(*(pe_special + pe_fontstyle + pe_inline_forms))
759