13 |
<div class="section" id="introduction"> |
<div class="section" id="introduction"> |
14 |
<h2>Introduction</h2> |
<h2>Introduction</h2> |
15 |
|
|
16 |
<p><dfn>Whatpm</dfn> is a set of Perl modules for |
<p><dfn>Whatpm</dfn> is a <em>work-in-progress</em> set of Perl modules for |
17 |
Web hypertext application technologies.</p> |
Web hypertext application technologies. It is part |
18 |
|
of the <a href="http://suika.fam.cx/www/2006/manakai/" rel=up>manakai</a> |
19 |
<p>It currently contains two Perl modules:</p> |
project.</p> |
20 |
|
|
21 |
<dl> |
<dl> |
22 |
|
<dt>Modules</dt> |
23 |
|
<dd><dl> |
24 |
|
<dt><a href="Whatpm/ContentChecker.html"><code>Whatpm::ContentChecker</code></a></dt> |
25 |
|
<dd>A DOM5 HTML (in-memory representation of a document) conformance |
26 |
|
checker with a partial support for Atom 1.0. (See also |
27 |
|
<a href="#demo-html-parser">demo</a>.)</dd> |
28 |
<dt><a href="Whatpm/ContentType.html"><code>Whatpm::ContentType</code></a></dt> |
<dt><a href="Whatpm/ContentType.html"><code>Whatpm::ContentType</code></a></dt> |
29 |
<dd>An implementation of HTML5 Content Type sniffing algorithm.</dd> |
<dd>An implementation of HTML5 Content Type sniffing algorithm.</dd> |
30 |
|
<dt><a href="Whatpm/CSS/SelectorsParser.html"><code>Whatpm::CSS::SelectorsParser</code></a></dt> |
31 |
|
<dd>A <a href="http://www.w3.org/TR/css3-selectors/#grouping">group of |
32 |
|
selectors</a> parser. (See also <a href="#demo-css-parser">demo</a>.)</dd> |
33 |
|
<dt><a href="Whatpm/CSS/SelectorsSerializer.html"><code>Whatpm::CSS::SelectorsSerializer</code></a></dt> |
34 |
|
<dd>A <a href="http://www.w3.org/TR/css3-selectors/#grouping">group of |
35 |
|
selectors</a> serializer. (See also <a href="#spec-ssft">specification</a> |
36 |
|
and <a href="#demo-css-parser">demo</a>.)</dd> |
37 |
|
<dt><a href="Whatpm/CSS/Tokenizer.html"><code>Whatpm::CSS::Tokenizer</code></a></dt> |
38 |
|
<dd>A CSS tokenizer. (See also <a href="#demo-css-parser">demo</a>.)</dd> |
39 |
<dt><a href="Whatpm/HTML.html"><code>Whatpm::HTML</code></a></dt> |
<dt><a href="Whatpm/HTML.html"><code>Whatpm::HTML</code></a></dt> |
40 |
<dd>An implementation of HTML5 parsing algorithm and |
<dd>An implementation of HTML5 parsing algorithm, fragment |
41 |
<code>innerHTML</code> serialization.</dd> |
parsing, and fragment serialization algorithms. It can be used |
42 |
|
to convert a string into DOM, or <i lang="">vice versa</i>. |
43 |
|
(See also <a href="#demo-html-parser">demo</a>.)</dd> |
44 |
|
<dt><a href="Whatpm/HTMLTable.html"><code>Whatpm::HTMLTable</code></a></dt> |
45 |
|
<dd>An implementation of the HTML5 table algorithm. It can be |
46 |
|
used to extract a table structure from a DOM <code>table</code> |
47 |
|
element node. (See also <a href="#demo-html-table">demo</a>.)</dd> |
48 |
|
<dt><a href="Whatpm/IMTChecker.html"><code>Whatpm::IMTChecker</code></a></dt> |
49 |
|
<dd>An Internet Media Type (<abbr>aka</abbr> MIME type) label |
50 |
|
conformance checker.</dd> |
51 |
|
<dt><a href="Whatpm/URIChecker.html"><code>Whatpm::URIChecker</code></a></dt> |
52 |
|
<dd>An IRI reference conformance checker.</dd> |
53 |
|
<dt><a href="Whatpm/XMLSerializer.html"><code>Whatpm::XMLSerializer</code></a></dt> |
54 |
|
<dd>A simple XML serializer.</dd> |
55 |
|
</dl> |
56 |
|
|
57 |
|
<p>Note that all of these modules are <em>work in progress</em> |
58 |
|
and have <a href="#todo">a number of unresolved problems</a>.</p> |
59 |
|
|
60 |
|
<p>Note also that some modules have no documentation for now.</p> |
61 |
|
</dd> |
62 |
|
<dt id=spec>Specification</dt> |
63 |
|
<dd><dl> |
64 |
|
<dt id=spec-ssft><a href="http://suika.fam.cx/www/markup/selectors/ssft/ssft"><abbr title="Selectors Serialization Format for Testing">SSFT</abbr> |
65 |
|
Specification</a></dt> |
66 |
|
<dd>The specification for the serialization format used for |
67 |
|
testing Selectors-related modules.</dd> |
68 |
|
</dl></dd> |
69 |
|
<dt>Documentation</dt> |
70 |
|
<dd><dl> |
71 |
|
<dt><a href="http://suika.fam.cx/gate/2005/sw/Whatpm%20Error%20Types">List of error types</a></dt> |
72 |
|
<dd>Description of errors to be notified to callback functions by Whatpm |
73 |
|
modules.</dd> |
74 |
|
</dd></dl></dd> |
75 |
</dl> |
</dl> |
76 |
</div> |
</div> |
77 |
|
|
78 |
<div class="section" id="demo"> |
<div class="section" id="demo"> |
79 |
<h2>Demo</h2> |
<h2>Demo</h2> |
80 |
|
|
81 |
<p><a href="http://suika.fam.cx/gate/2007/html/parser-interface">HTML5 parser |
<ul> |
82 |
demo</a></p> |
<li id=demo-html-parser-nanodom><a href="http://suika.fam.cx/gate/2007/html/parser-interface">HTML5 parser |
83 |
|
and checker demo</a> |
84 |
|
(<a href="http://suika.fam.cx/gate/cvs/*checkout*/webroot/gate/2007/html/parser.cgi">source</a>, |
85 |
|
with <a href="Whatpm/NanoDOM.html">a lightweight non-conforming |
86 |
|
DOM implementation</a>)</li> |
87 |
|
<li id=demo-html-parser-manakai><a href="http://suika.fam.cx/gate/2007/html/parser-manakai-interface">HTML5 |
88 |
|
parser and checker demo, with manakai's DOM implementation</a> |
89 |
|
(<a href="http://suika.fam.cx/gate/cvs/*checkout*/webroot/gate/2007/html/parser-manakai.cgi">source</a>)</li> |
90 |
|
<li id=demo-html-table><a href="http://suika.fam.cx/gate/2007/html/table-interface">HTML5 table |
91 |
|
structure visualization demo</a> |
92 |
|
(<a href="http://suika.fam.cx/gate/cvs/*checkout*/webroot/gate/2007/html/table.cgi">source</a>)</li> |
93 |
|
<li id=demo-css-parser><a href="http://suika.fam.cx/gate/2007/css/parser-interface">CSS tokenizer |
94 |
|
demo</a> |
95 |
|
(<a href="http://suika.fam.cx/gate/cvs/*checkout*/webroot/gate/2007/css/parser.cgi">source</a>)</li> |
96 |
|
</ul> |
97 |
|
</div> |
98 |
|
|
99 |
|
<div class="section" id="dependency"> |
100 |
|
<h2>Dependency</h2> |
101 |
|
|
102 |
|
<dl> |
103 |
|
<dt>Perl 5.8 or later</dt> |
104 |
|
<dd>It is recommended to use newer release of Perl 5.8 or later.</dd> |
105 |
|
<dt><code>Message::IMT::InternetMediaType</code></dt> |
106 |
|
<dd><code>Whatpm::IMTChecker</code> depends on |
107 |
|
<code>Message::IMT::InternetMediaType</code>, which is part of |
108 |
|
<a href="http://suika.fam.cx/www/2006/manakai/">manakai</a>.</dd> |
109 |
|
<dt><code>Message::URI::URIReference</code></dt> |
110 |
|
<dd><code>Whatpm::URIChecker</code> depends on |
111 |
|
<code>Message::URI::URIReference</code>, which is part of |
112 |
|
<a href="http://suika.fam.cx/www/2006/manakai/">manakai</a>.</dd> |
113 |
|
<dt><a href="http://suika.fam.cx/www/manakai-charlib/readme">manakai |
114 |
|
charlib</a></dt> |
115 |
|
<dd><code>Whatpm::Charset::DeocdeHandle</code> depends on |
116 |
|
modules in <a href="http://suika.fam.cx/www/manakai-charlib/readme">manakai |
117 |
|
charlib</a> for <em>decoding Japanese character encodings</em>. |
118 |
|
See the documentation for |
119 |
|
<a href="http://suika.fam.cx/www/manakai-charlib/readme">manakai |
120 |
|
charlib</a> for more information.</dd> |
121 |
|
<dt><code>Message::DOM::DOMImplementation</code> and related modules</dt> |
122 |
|
<dd><em>Testing</em> for <code>Whatpm::ContentChecker</code> |
123 |
|
depends on <code>Message::DOM::DOMImplementation</code> and related modules |
124 |
|
in <a href="http://suika.fam.cx/www/2006/manakai/">manakai</a>. |
125 |
|
They are not required in practice.</dd> |
126 |
|
<dt><a href="http://search.cpan.org/~makamaka/JSON-1.14/"><code>JSON</code></a></dt> |
127 |
|
<dd><em>Testing</em> for <code>Whatpm::HTML</code> and |
128 |
|
<code>Whatpm::CSS::Tokenizer</code> |
129 |
|
depends on <a href="http://search.cpan.org/~makamaka/JSON-1.14/"><code>JSON</code> and related modules</a>. |
130 |
|
They are not required in practice.</dd> |
131 |
|
</dl> |
132 |
</div> |
</div> |
133 |
|
|
134 |
<div class="section" id="download"> |
<div class="section" id="download"> |
135 |
<h2>Distribution</h2> |
<h2>Distribution</h2> |
136 |
|
|
|
<p>Tarball will be available when setter for <code>innerHTML</code> |
|
|
is implemented.</p> |
|
|
|
|
137 |
<p>The development version of Whatpm may be found in the |
<p>The development version of Whatpm may be found in the |
138 |
<a href="http://suika.fam.cx/gate/cvs/markup/html/whatpm/">CVS |
<a href="http://suika.fam.cx/gate/cvs/markup/html/whatpm/">CVS |
139 |
repository</a>.</p> |
repository</a>.</p> |
145 |
|
|
146 |
<ul> |
<ul> |
147 |
<li>Bug fix (Test results: |
<li>Bug fix (Test results: |
148 |
|
<a href="t/content-type-result"><code>Whatpm::ContentType</code></a>, |
149 |
<a href="t/tokenizer-result">HTML tokenization</a>, |
<a href="t/tokenizer-result">HTML tokenization</a>, |
150 |
<a href="t/tree-construction-result">HTML tree construction</a>)</li> |
<a href="t/tree-construction-result">HTML tree construction</a>, |
151 |
<li><code>innerHTML</code> setter</li> |
<a href="t/content-checker-result"><code>Whatpm::ContentChecker</code></a>).</li> |
152 |
<li>Charset detection</li> |
<li>Charset detection.</li> |
153 |
|
<li>Validation for <code>meta</code>.</li> |
154 |
|
<li>Validation for media queries, IRIs (against URI schemes), language tags, |
155 |
|
and so on.</li> |
156 |
|
<li>Documentations are missing for some features.</li> |
157 |
<li><q>Whatpm</q> is a code name in fact. Please let me know |
<li><q>Whatpm</q> is a code name in fact. Please let me know |
158 |
if you have a better name.</li> |
if you have a better name.</li> |
159 |
<li>Each module has its own TO DO list.</li> |
<li>In addition, each module has its own TO DO items. |
160 |
|
(Search for <q>## TODO</q> and <q>## ISSUE</q> in each module.)</li> |
161 |
</ul> |
</ul> |
162 |
</div> |
</div> |
163 |
|
|
164 |
|
<div class=section id=acknowledgments> |
165 |
|
<h2>Acknowledgments</h2> |
166 |
|
|
167 |
|
<p>Thanks to the <a href="http://code.google.com/p/html5lib/">html5lib</a> |
168 |
|
team for <a href="http://html5lib.googlecode.com/svn/trunk/testdata/">HTML5 |
169 |
|
parser test data</a>.</p> |
170 |
|
</div> |
171 |
|
|
172 |
<div class="section" id="author"> |
<div class="section" id="author"> |
173 |
<h2>Author</h2> |
<h2>Author</h2> |
174 |
|
|
175 |
<p><a href="http://suika.fam.cx/~wakaba/who?">Wakaba</a>.</p> |
<p><a href="http://suika.fam.cx/~wakaba/who?" rel="author">Wakaba</a>.</p> |
176 |
</div> |
</div> |
177 |
|
|
178 |
<div class="section" id="license"> |
<div class="section" id="license"> |
179 |
<h2>License</h2> |
<h2>License</h2> |
180 |
|
|
181 |
<p>Copyright 2007 Wakaba <w@suika.fam.cx></p> |
<p>Copyright 2007 Wakaba |
182 |
|
<code class="mail"><<a href="mailto:w@suika.fam.cx" |
183 |
|
rel="author">w@suika.fam.cx</a>></code>.</p> |
184 |
|
|
185 |
<p>This library is free software; you can redistribute it and/or modify |
<p>This library is free software; you can redistribute it and/or modify |
186 |
it under the same terms as Perl itself.</p> |
it under the same terms as Perl itself.</p> |