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 <em>work-in-progress</em> set of Perl modules for |
<p><dfn>Whatpm</dfn> is a <em>work-in-progress</em> set of <m>P</m>erl |
17 |
Web hypertext application technologies. It is part |
<m>m</m>odules for <m>W</m>eb <m>h</m>ypertext <m>a</m>pplication |
18 |
|
<m>t</m>echnologies. It is part |
19 |
of the <a href="http://suika.fam.cx/www/2006/manakai/" rel=up>manakai</a> |
of the <a href="http://suika.fam.cx/www/2006/manakai/" rel=up>manakai</a> |
20 |
project.</p> |
project.</p> |
21 |
|
|
22 |
<dl> |
<dl> |
23 |
<dt>Modules</dt> |
<dt>Modules</dt> |
24 |
<dd><dl> |
<dd><dl> |
25 |
|
<dt><a href="Whatpm/CacheManifest.html"><code>Whatpm::CacheManifest</code></a></dt> |
26 |
|
<dd>An |
27 |
|
<a href="http://www.whatwg.org/specs/web-apps/current-work/#manifests">HTML5 |
28 |
|
cache manifest</a> parser.</dd> |
29 |
|
<dt id=whatpm-charset-universalchardet><a href="Whatpm/Charset/UniversalCharDet.html"><code>Whatpm::Charset::UniversalCharDet</code></a></dt> |
30 |
|
<dd>A Perl interface to universalchardet character encoding detection |
31 |
|
library.</dd> |
32 |
<dt><a href="Whatpm/ContentChecker.html"><code>Whatpm::ContentChecker</code></a></dt> |
<dt><a href="Whatpm/ContentChecker.html"><code>Whatpm::ContentChecker</code></a></dt> |
33 |
<dd>A DOM5 HTML (in-memory representation of a document) conformance |
<dd>A DOM5 HTML (in-memory representation of a document) conformance |
34 |
checker with a partial support for Atom 1.0. (See also |
checker with a partial support for Atom 1.0. (See also |
35 |
<a href="#demo-html-parser">demo</a>.)</dd> |
<a href="#demo-html-parser">demo</a>.)</dd> |
36 |
<dt><a href="Whatpm/ContentType.html"><code>Whatpm::ContentType</code></a></dt> |
<dt><a href="Whatpm/ContentType.html"><code>Whatpm::ContentType</code></a></dt> |
37 |
<dd>An implementation of HTML5 Content Type sniffing algorithm.</dd> |
<dd>An implementation of HTML5 Content Type sniffing algorithm.</dd> |
38 |
|
|
39 |
|
<dt><a href="Whatpm/CSS/Cascade.html"><code>Whatpm::CSS::Cascade</code></a> |
40 |
|
<dd>A media-independent implementation of CSS cascading and value |
41 |
|
computation. (See also <a href="#demo-css-parser">demo</a>.) |
42 |
|
<dt><a href="Whatpm/CSS/Parser.html"><code>Whatpm::CSS::Parser</code></a> |
43 |
|
<dd>A CSS parser that constructs CSSOM trees from style sheets. (See |
44 |
|
also <a href="#demo-css-parser">demo</a>.) |
45 |
|
|
46 |
<dt><a href="Whatpm/CSS/SelectorsParser.html"><code>Whatpm::CSS::SelectorsParser</code></a></dt> |
<dt><a href="Whatpm/CSS/SelectorsParser.html"><code>Whatpm::CSS::SelectorsParser</code></a></dt> |
47 |
<dd>A <a href="http://www.w3.org/TR/css3-selectors/#grouping">group of |
<dd>A <a href="http://www.w3.org/TR/css3-selectors/#grouping">group of |
48 |
selectors</a> parser. (See also <a href="#demo-css-parser">demo</a>.)</dd> |
selectors</a> parser. (See also <a href="#demo-css-parser">demo</a>.)</dd> |
52 |
and <a href="#demo-css-parser">demo</a>.)</dd> |
and <a href="#demo-css-parser">demo</a>.)</dd> |
53 |
<dt><a href="Whatpm/CSS/Tokenizer.html"><code>Whatpm::CSS::Tokenizer</code></a></dt> |
<dt><a href="Whatpm/CSS/Tokenizer.html"><code>Whatpm::CSS::Tokenizer</code></a></dt> |
54 |
<dd>A CSS tokenizer. (See also <a href="#demo-css-parser">demo</a>.)</dd> |
<dd>A CSS tokenizer. (See also <a href="#demo-css-parser">demo</a>.)</dd> |
55 |
<dt><a href="Whatpm/HTML.html"><code>Whatpm::HTML</code></a></dt> |
<dt id=module-whatpm-html><a href="Whatpm/HTML.html"><code>Whatpm::HTML</code></a></dt> |
56 |
<dd>An implementation of HTML5 parsing algorithm, fragment |
<dd>An implementation of HTML5 document and fragment |
57 |
parsing, and fragment serialization algorithms. It can be used |
parsing algorithms. It can be used |
58 |
to convert a string into DOM, or <i lang="">vice versa</i>. |
to convert an arbitrary string into a |
59 |
|
<abbr title="Document Object Model">DOM</abbr>. (See also |
60 |
|
<a href="#demo-html-parser">demo</a>.)</dd> |
61 |
|
<dt id=module-whatpm-html-serializer><a href="Whatpm/HTML/Serializer.html"><code>Whatpm::HTML::Serializer</code></a></dt> |
62 |
|
<dd>An implementation of HTML5 fragment serialization algorithm. |
63 |
(See also <a href="#demo-html-parser">demo</a>.)</dd> |
(See also <a href="#demo-html-parser">demo</a>.)</dd> |
64 |
<dt><a href="Whatpm/HTMLTable.html"><code>Whatpm::HTMLTable</code></a></dt> |
<dt><a href="Whatpm/HTMLTable.html"><code>Whatpm::HTMLTable</code></a></dt> |
65 |
<dd>An implementation of the HTML5 table algorithm. It can be |
<dd>An implementation of the HTML5 table algorithm. It can be |
68 |
<dt><a href="Whatpm/IMTChecker.html"><code>Whatpm::IMTChecker</code></a></dt> |
<dt><a href="Whatpm/IMTChecker.html"><code>Whatpm::IMTChecker</code></a></dt> |
69 |
<dd>An Internet Media Type (<abbr>aka</abbr> MIME type) label |
<dd>An Internet Media Type (<abbr>aka</abbr> MIME type) label |
70 |
conformance checker.</dd> |
conformance checker.</dd> |
71 |
|
|
72 |
<dt><a href="Whatpm/URIChecker.html"><code>Whatpm::URIChecker</code></a></dt> |
<dt><a href="Whatpm/URIChecker.html"><code>Whatpm::URIChecker</code></a></dt> |
73 |
<dd>An IRI reference conformance checker.</dd> |
<dd>An IRI reference conformance checker.</dd> |
74 |
|
|
75 |
|
<dt><a href="Whatpm/WebIDL.html"><code>Whatpm::WebIDL</code></a></dt> |
76 |
|
<dd>A WebIDL fragment parser. It parses an IDL fragment, whether conforming |
77 |
|
or not, and constructs a DOM-like object model for further processing. |
78 |
|
Non-conforming (or broken) IDL fragment-like string will be parsed using |
79 |
|
CSS-like error-tolerant parsing rules, e.g. ignoring anything until next |
80 |
|
<code>;</code> character. |
81 |
|
|
82 |
|
<dt><a href="Whatpm/LangTag.html"><code>Whatpm::LangTag</code></a> |
83 |
|
<dd>A language tag parser and conformance checker, supporting both |
84 |
|
older RFC 3066 definition and latest RFC 4646 definition. (See also |
85 |
|
<a href="#demo-langtag">demo</a>.) |
86 |
|
|
87 |
<dt><a href="Whatpm/XMLSerializer.html"><code>Whatpm::XMLSerializer</code></a></dt> |
<dt><a href="Whatpm/XMLSerializer.html"><code>Whatpm::XMLSerializer</code></a></dt> |
88 |
<dd>A simple XML serializer.</dd> |
<dd>A simple XML serializer.</dd> |
89 |
</dl> |
</dl> |
93 |
|
|
94 |
<p>Note also that some modules have no documentation for now.</p> |
<p>Note also that some modules have no documentation for now.</p> |
95 |
</dd> |
</dd> |
96 |
<dt id=spec>Specification</dt> |
<dt id=spec>Specifications</dt> |
97 |
<dd><dl> |
<dd><dl> |
98 |
<dt id=spec-ssft><a href="http://suika.fam.cx/www/markup/selectors/ssft/ssft"><abbr title="Selectors Serialization Format for Testing">SSFT</abbr> |
<dt id=spec-ssft><a href="http://suika.fam.cx/www/markup/selectors/ssft/ssft"><abbr title="Selectors Serialization Format for Testing">SSFT</abbr> |
99 |
Specification</a></dt> |
Specification</a></dt> |
100 |
<dd>The specification for the serialization format used for |
<dd>The specification for the serialization format used for |
101 |
testing Selectors-related modules.</dd> |
testing Selectors-related modules.</dd> |
102 |
|
<dt id=spec-manakai-selectors"><a href="http://suika.fam.cx/gate/2005/sw/manakai/Selectors%20Extensions">manakai's |
103 |
|
Selectors Extensions</a></dt> |
104 |
|
<dd>The specification for <code>:-manakai-<var>*</var></code> |
105 |
|
pseudo-classes implemented by Selectors-related modules.</dd> |
106 |
</dl></dd> |
</dl></dd> |
107 |
<dt>Documentation</dt> |
<dt>Documentations</dt> |
108 |
<dd><dl> |
<dd><dl> |
109 |
<dt><a href="http://suika.fam.cx/gate/2005/sw/Whatpm%20Error%20Types">List of error types</a></dt> |
<dt><a href="http://suika.fam.cx/gate/2005/sw/Whatpm%20Error%20Types">List of error types</a></dt> |
110 |
<dd>Description of errors to be notified to callback functions by Whatpm |
<dd>Description of errors to be notified to callback functions by Whatpm |
111 |
modules.</dd> |
modules.</dd> |
112 |
</dd></dl></dd> |
<dt><a href="Whatpm/CSS/selectors-object">Selectors object</a></dt> |
113 |
|
<dd>Description of data structure for Selectors, as implemented by |
114 |
|
<a href="Whatpm/CSS/SelectorsParser.html"><code>Whatpm::CSS::SelectorsParser</code></a> |
115 |
|
(as output), and |
116 |
|
<a href="Whatpm/CSS/SelectorsSerializer.html"><code>Whatpm::CSS::SelectorsSerializer</code></a> |
117 |
|
(as input)<!--, and |
118 |
|
<a href="http://suika.fam.cx/www/manakai-core/lib/Message/DOM/SelectorsAPI.html"><code>Message::DOM::SelectorsAPI</code></a>-->.</dd> |
119 |
|
<dt id=doc-user-data-names><a href="http://suika.fam.cx/gate/2005/sw/manakai/Predefined%20User%20Data%20Names">List of predefined user data names</a></dt> |
120 |
|
<dd>List of user data names defined by Whatpm modules.</dd> |
121 |
|
<dt id=doc-handles><a href="Whatpm/Charset/handles">Handle objects</a> |
122 |
|
<dd>Description of character or byte stream input handle interfaces. |
123 |
|
</dl> |
124 |
|
</dd> |
125 |
</dl> |
</dl> |
126 |
|
<!-- Whatpm::ContentChecker::*, Whatpm::H2H, Whatpm::NanoDOM, and |
127 |
|
Whatpm::XMLParser are intentionally omitted from the list. --> |
128 |
</div> |
</div> |
129 |
|
|
130 |
<div class="section" id="demo"> |
<div class="section" id="demo"> |
142 |
<li id=demo-html-table><a href="http://suika.fam.cx/gate/2007/html/table-interface">HTML5 table |
<li id=demo-html-table><a href="http://suika.fam.cx/gate/2007/html/table-interface">HTML5 table |
143 |
structure visualization demo</a> |
structure visualization demo</a> |
144 |
(<a href="http://suika.fam.cx/gate/cvs/*checkout*/webroot/gate/2007/html/table.cgi">source</a>)</li> |
(<a href="http://suika.fam.cx/gate/cvs/*checkout*/webroot/gate/2007/html/table.cgi">source</a>)</li> |
145 |
<li id=demo-css-parser><a href="http://suika.fam.cx/gate/2007/css/parser-interface">CSS tokenizer |
|
146 |
demo</a> |
<li id=demo-css-parser><a href="http://suika.fam.cx/gate/2007/css/parser-interface">CSS |
147 |
|
tokenizer, parser, and computed style computation demo</a> |
148 |
(<a href="http://suika.fam.cx/gate/cvs/*checkout*/webroot/gate/2007/css/parser.cgi">source</a>)</li> |
(<a href="http://suika.fam.cx/gate/cvs/*checkout*/webroot/gate/2007/css/parser.cgi">source</a>)</li> |
149 |
|
|
150 |
|
<li id=demo-langtag><a href="http://suika.fam.cx/gate/2007/langtag/langtag-demo-interface">Language |
151 |
|
tag parsing and conformance checking demo</a> |
152 |
|
(<a href="http://suika.fam.cx/gate/cvs/*checkout*/webroot/gate/2007/langtag/langtag-demo.cgi">source</a>) |
153 |
|
</ul> |
154 |
|
</div> |
155 |
|
|
156 |
|
<div class=section id=applications> |
157 |
|
<h2>Application</h2> |
158 |
|
|
159 |
|
<ul> |
160 |
|
<li><a href="http://suika.fam.cx/gate/2007/html/cc/"><abbr>WebHACC</abbr> |
161 |
|
(Web hypertext application conformance checker)</a> |
162 |
</ul> |
</ul> |
163 |
</div> |
</div> |
164 |
|
|
166 |
<h2>Dependency</h2> |
<h2>Dependency</h2> |
167 |
|
|
168 |
<dl> |
<dl> |
169 |
<dt>Perl 5.8 or later</dt> |
<dt id=dependency-perl>Perl 5.8 or later</dt> |
170 |
<dd>It is recommended to use newer release of Perl 5.8 or later.</dd> |
<dd>It is recommended to use newer stable release of Perl 5.8 (or |
171 |
|
later).</dd> |
172 |
|
<dd id=dependency-encode>Some modules require <code>Encode</code> |
173 |
|
modules, which are part of standard Perl distribution.</dd> |
174 |
|
<dt id=dependency-manakai-core>Modules from |
175 |
|
<a href="http://suika.fam.cx/www/2006/manakai/">manakai-core</a></dt> |
176 |
|
<dd> |
177 |
|
<dl> |
178 |
|
<dt id=dependency-error><a href="http://search.cpan.org/author/SHLOMIF/Error-0.17009/lib/Error.pm"><code>Error</code></a></dt> |
179 |
|
<dd>Module <code>Whatpm::HTML</code> requires <code>Error</code>, |
180 |
|
which is bundled in |
181 |
|
<a href="http://suika.fam.cx/www/2006/manakai/">manakai-core</a>.</dd> |
182 |
<dt><code>Message::IMT::InternetMediaType</code></dt> |
<dt><code>Message::IMT::InternetMediaType</code></dt> |
183 |
<dd><code>Whatpm::IMTChecker</code> depends on |
<dd>Module <code>Whatpm::IMTChecker</code> depends on |
184 |
<code>Message::IMT::InternetMediaType</code>, which is part of |
<code>Message::IMT::InternetMediaType</code>, which is part of |
185 |
<a href="http://suika.fam.cx/www/2006/manakai/">manakai</a>.</dd> |
<a href="http://suika.fam.cx/www/2006/manakai/">manakai-core</a>.</dd> |
186 |
<dt><code>Message::URI::URIReference</code></dt> |
<dt><code>Message::URI::URIReference</code></dt> |
187 |
<dd><code>Whatpm::URIChecker</code> depends on |
<dd>Modules <code>Whatpm::URIChecker</code> and |
188 |
<code>Message::URI::URIReference</code>, which is part of |
<code>Whatpm::CacheManifest</code> depend on |
189 |
<a href="http://suika.fam.cx/www/2006/manakai/">manakai</a>.</dd> |
<a href="http://suika.fam.cx/www/manakai-core/lib/Message/URI/URIReference.html"><code>Message::URI::URIReference</code></a>, |
190 |
|
which is part of |
191 |
|
<a href="http://suika.fam.cx/www/2006/manakai/">manakai-core</a>.</dd> |
192 |
|
<dt><code>Message::Charset::Info</code></dt> |
193 |
|
<dd>Module <code>Whatpm::ContentChecker</code> depends on |
194 |
|
<a href="http://suika.fam.cx/www/manakai-core/lib/Message/Charset/Info.html"><code>Message::Charset::Info</code></a>, |
195 |
|
which is part of |
196 |
|
<a href="http://suika.fam.cx/www/2006/manakai/">manakai-core</a>.</dd> |
197 |
|
<dt><code>Message::DOM::DOMImplementation</code> |
198 |
|
<dd>Module <code>Whatpm::URIChecker</code> depends on |
199 |
|
<code>Message::DOM::DOMImplementation</code>, |
200 |
|
which is part of |
201 |
|
<a href="http://suika.fam.cx/www/2006/manakai/">manakai-core</a>. |
202 |
|
<dt><code>Message::DOM::DOMImplementation</code> and related modules</dt> |
203 |
|
<dd><em>Testing</em> for module <code>Whatpm::ContentChecker</code> |
204 |
|
depends on <code>Message::DOM::DOMImplementation</code> and related modules |
205 |
|
in <a href="http://suika.fam.cx/www/2006/manakai/">manakai-core</a>. |
206 |
|
They are not required in practice.</dd> |
207 |
|
</dl> |
208 |
|
</dd> |
209 |
<dt><a href="http://suika.fam.cx/www/manakai-charlib/readme">manakai |
<dt><a href="http://suika.fam.cx/www/manakai-charlib/readme">manakai |
210 |
charlib</a></dt> |
charlib</a></dt> |
211 |
<dd><code>Whatpm::Charset::DeocdeHandle</code> depends on |
<dd>Module <code>Whatpm::Charset::DecodeHandle</code> depends on |
212 |
modules in <a href="http://suika.fam.cx/www/manakai-charlib/readme">manakai |
modules in <a href="http://suika.fam.cx/www/manakai-charlib/readme">manakai |
213 |
charlib</a> for <em>decoding Japanese character encodings</em>. |
charlib</a> for decoding of <em>Japanese character encodings</em>. |
214 |
See the documentation for |
See the documentation for |
215 |
<a href="http://suika.fam.cx/www/manakai-charlib/readme">manakai |
<a href="http://suika.fam.cx/www/manakai-charlib/readme">manakai |
216 |
charlib</a> for more information.</dd> |
charlib</a> for more information.</dd> |
217 |
<dt><code>Message::DOM::DOMImplementation</code> and related modules</dt> |
<dt><a href="http://www.python.org/">Python</a>, Perl |
218 |
<dd><em>Testing</em> for <code>Whatpm::ContentChecker</code> |
<a href="http://search.cpan.org/~neilw/Inline-Python-0.22/"><code>Inline::Python</code></a> |
219 |
depends on <code>Message::DOM::DOMImplementation</code> and related modules |
module, and <a href="http://chardet.feedparser.org/">Universal Encoding |
220 |
in <a href="http://suika.fam.cx/www/2006/manakai/">manakai</a>. |
Detector</a></dt> |
221 |
They are not required in practice.</dd> |
<dd>For the module <code>Whatpm::Charset::UniversalCharDet</code> being |
222 |
|
meaningful, these softwares are required on the system. See the |
223 |
|
<a href="Whatpm/Charset/UniversalCharDet.html#dependency">documentation</a> |
224 |
|
for more information.</dd> |
225 |
<dt><a href="http://search.cpan.org/~makamaka/JSON-1.14/"><code>JSON</code></a></dt> |
<dt><a href="http://search.cpan.org/~makamaka/JSON-1.14/"><code>JSON</code></a></dt> |
226 |
<dd><em>Testing</em> for <code>Whatpm::HTML</code> and |
<dd><em>Testing</em> for modules <code>Whatpm::HTML</code> and |
227 |
<code>Whatpm::CSS::Tokenizer</code> |
<code>Whatpm::CSS::Tokenizer</code> |
228 |
depends on <a href="http://search.cpan.org/~makamaka/JSON-1.14/"><code>JSON</code> and related modules</a>. |
depends on <a href="http://search.cpan.org/~makamaka/JSON-1.14/"><code>JSON</code> and related modules</a>. |
229 |
They are not required in practice.</dd> |
They are not required in practice.</dd> |
237 |
<a href="http://suika.fam.cx/gate/cvs/markup/html/whatpm/">CVS |
<a href="http://suika.fam.cx/gate/cvs/markup/html/whatpm/">CVS |
238 |
repository</a>.</p> |
repository</a>.</p> |
239 |
|
|
240 |
|
<p><a href="http://suika.fam.cx/gate/cvs/markup/html/whatpm/whatpm.tar.gz?tarball=1">The |
241 |
|
latest developmenet version of the Whatpm</a> is also available as a |
242 |
|
tarball. |
243 |
|
|
244 |
</div> |
</div> |
245 |
|
|
246 |
<div class="section" id="todo"> |
<div class="section" id="todo"> |
252 |
<a href="t/tokenizer-result">HTML tokenization</a>, |
<a href="t/tokenizer-result">HTML tokenization</a>, |
253 |
<a href="t/tree-construction-result">HTML tree construction</a>, |
<a href="t/tree-construction-result">HTML tree construction</a>, |
254 |
<a href="t/content-checker-result"><code>Whatpm::ContentChecker</code></a>).</li> |
<a href="t/content-checker-result"><code>Whatpm::ContentChecker</code></a>).</li> |
255 |
|
<li>Merge with the <a href="http://suika.fam.cx/www/2006/manakai/">manakai-core</a> |
256 |
|
code tree. |
257 |
<li>Charset detection.</li> |
<li>Charset detection.</li> |
258 |
<li>Validation for <code>meta</code>.</li> |
<li>Validation for <code>meta</code>.</li> |
259 |
<li>Validation for media queries, IRIs (against URI schemes), language tags, |
<li>Validation for media queries, IRIs (against URI schemes), language tags, |
260 |
and so on.</li> |
and so on.</li> |
261 |
<li>Documentations are missing for some features.</li> |
<li>Documentations are missing for some features.</li> |
262 |
<li><q>Whatpm</q> is a code name in fact. Please let me know |
<li>XML parser<!-- with application cache selection algorithm hook-->.</li> |
|
if you have a better name.</li> |
|
263 |
<li>In addition, each module has its own TO DO items. |
<li>In addition, each module has its own TO DO items. |
264 |
(Search for <q>## TODO</q> and <q>## ISSUE</q> in each module.)</li> |
(Search for <q>## TODO</q> and <q>## ISSUE</q> in each module.)</li> |
265 |
</ul> |
</ul> |
269 |
<h2>Acknowledgments</h2> |
<h2>Acknowledgments</h2> |
270 |
|
|
271 |
<p>Thanks to the <a href="http://code.google.com/p/html5lib/">html5lib</a> |
<p>Thanks to the <a href="http://code.google.com/p/html5lib/">html5lib</a> |
272 |
team for <a href="http://html5lib.googlecode.com/svn/trunk/testdata/">HTML5 |
team for their |
273 |
|
<a href="http://html5lib.googlecode.com/svn/trunk/testdata/">HTML5 |
274 |
parser test data</a>.</p> |
parser test data</a>.</p> |
275 |
</div> |
</div> |
276 |
|
|
283 |
<div class="section" id="license"> |
<div class="section" id="license"> |
284 |
<h2>License</h2> |
<h2>License</h2> |
285 |
|
|
286 |
<p>Copyright 2007 Wakaba |
<p>Copyright 2007$B!>(B2008 Wakaba |
287 |
<code class="mail"><<a href="mailto:w@suika.fam.cx" |
<code class="mail"><<a href="mailto:w@suika.fam.cx" |
288 |
rel="author">w@suika.fam.cx</a>></code>.</p> |
rel="author">w@suika.fam.cx</a>></code>.</p> |
289 |
|
|