1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 """
18 ===============================
19 Default Soup Template Factory
20 ===============================
21
22 Default Soup Template Factory.
23 """
24 __author__ = u"Andr\xe9 Malo"
25 __docformat__ = "restructuredtext en"
26 __all__ = ['html', 'xml', 'text']
27
28 from tdi import factory as _factory
29
38
40 from tdi.markup.text import (
41 builder,
42 decoder,
43 encoder,
44 filters,
45 parser,
46 )
47
48
49 html = _factory.Factory(
50 parser=_soup.parser.DEFAULT_PARSER.html,
51 builder=_soup.builder.SoupBuilder,
52 encoder=_soup.encoder.SoupEncoder,
53 decoder=_soup.decoder.HTMLDecoder,
54 default_eventfilter_list=(_soup.filters.EncodingDetectFilter,),
55 )
56
57 xml = _factory.Factory(
58 parser=_soup.parser.DEFAULT_PARSER.xml,
59 builder=_soup.builder.SoupBuilder,
60 encoder=_soup.encoder.SoupEncoder,
61 decoder=_soup.decoder.XMLDecoder,
62 default_encoding='utf-8',
63 default_eventfilter_list=(_soup.filters.EncodingDetectFilter,),
64 )
65
66
67 text = _factory.Factory(
68 parser=_text.parser.TextParser,
69 builder=_text.builder.TextBuilder,
70 encoder=_text.encoder.TextEncoder,
71 decoder=_text.decoder.TextDecoder,
72 default_encoding='utf-8',
73 default_eventfilter_list=(_text.filters.EncodingDetectFilter,),
74 )
75