Parent Directory
|
Revision Log
++ whatpm/t/ChangeLog 17 Feb 2008 12:18:01 -0000 * content-model-1.dat, content-model-2.dat: Updated. 2008-02-17 Wakaba <wakaba@suika.fam.cx> ++ whatpm/Whatpm/ChangeLog 17 Feb 2008 12:12:56 -0000 * ContentChecker.pm ({unsupported_level}): New value. * HTML.pm.src: Save whether |meta| |content| attribute contains character references or not. 2008-02-17 Wakaba <wakaba@suika.fam.cx> ++ whatpm/Whatpm/ContentChecker/ChangeLog 17 Feb 2008 12:17:33 -0000 * HTML.pm: |<meta http-equiv=Content-Type| support (HTML5 revision 1180). 2008-02-17 Wakaba <wakaba@suika.fam.cx>
| 1 | wakaba | 1.1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>Whatpm::CacheManifest - An HTML5 Cache Manifest Parser</title> | ||
| 5 | <link rel="stylesheet" href="http://suika.fam.cx/www/style/html/pod.css" type="text/css" /> | ||
| 6 | <link rev="made" href="mailto:[email protected]" /> | ||
| 7 | </head> | ||
| 8 | |||
| 9 | <body> | ||
| 10 | |||
| 11 | <p><a name="__index__"></a></p> | ||
| 12 | <!-- INDEX BEGIN --> | ||
| 13 | |||
| 14 | <ul> | ||
| 15 | |||
| 16 | <li><a href="#name">NAME</a></li> | ||
| 17 | <li><a href="#synopsis">SYNOPSIS</a></li> | ||
| 18 | <li><a href="#description">DESCRIPTION</a></li> | ||
| 19 | <li><a href="#methods">METHODS</a></li> | ||
| 20 | <li><a href="#manifest_data_structure">MANIFEST DATA STRUCTURE</a></li> | ||
| 21 | <li><a href="#dependency">DEPENDENCY</a></li> | ||
| 22 | <li><a href="#see_also">SEE ALSO</a></li> | ||
| 23 | <li><a href="#todo">TODO</a></li> | ||
| 24 | <li><a href="#author">AUTHOR</a></li> | ||
| 25 | <li><a href="#license">LICENSE</a></li> | ||
| 26 | </ul> | ||
| 27 | <!-- INDEX END --> | ||
| 28 | |||
| 29 | <hr /> | ||
| 30 | <p> | ||
| 31 | </p> | ||
| 32 | <h1><a name="name">NAME</a></h1> | ||
| 33 | <p>Whatpm::CacheManifest - An HTML5 Cache Manifest Parser</p> | ||
| 34 | <p> | ||
| 35 | </p> | ||
| 36 | <hr /> | ||
| 37 | <h1><a name="synopsis">SYNOPSIS</a></h1> | ||
| 38 | <pre> | ||
| 39 | use Whatpm::CacheManifest; | ||
| 40 | |||
| 41 | my $manifest_uri = q<<a href="http://www.example.com/manifest>">http://www.example.com/manifest></a>;; | ||
| 42 | my ($manifest_data, $manifest_base_uri) | ||
| 43 | = some_function_to_retrieve_content ($manifest_uri); | ||
| 44 | |||
| 45 | # or, | ||
| 46 | |||
| 47 | my $manifest = Whatpm::CacheManifest->parse_byte_string | ||
| 48 | ($manifest_data, $manifest_uri, $manifest_base_uri, sub { | ||
| 49 | my %err = @_; | ||
| 50 | warn $err{type}, "\n"; | ||
| 51 | }); | ||
| 52 | |||
| 53 | $manifest_data = Encode::decode ('utf-8', $manifest_data); | ||
| 54 | my $manifest = Whatpm::CacheManifest->parse_char_string | ||
| 55 | ($manifest_data, $manifest_uri, $manifest_base_uri, sub { | ||
| 56 | my %err = @_; | ||
| 57 | warn $err{type}, "\n"; | ||
| 58 | }); | ||
| 59 | |||
| 60 | # $manifest->[0]: Array reference of explicit URIs. | ||
| 61 | # $manifest->[1]: Hash reference of fallback URIs. | ||
| 62 | # $manifest->[2]: Array reference of online whitelist.</pre> | ||
| 63 | <p> | ||
| 64 | </p> | ||
| 65 | <hr /> | ||
| 66 | <h1><a name="description">DESCRIPTION</a></h1> | ||
| 67 | <p>The <code>Whatpm::CacheManifest</code> module implements the parsing algorithm | ||
| 68 | for HTML5 cache manifest format, used to describe an offline Web | ||
| 69 | application.</p> | ||
| 70 | <p> | ||
| 71 | </p> | ||
| 72 | <hr /> | ||
| 73 | <h1><a name="methods">METHODS</a></h1> | ||
| 74 | <p>This module provides two class methods to parse cache manifests:</p> | ||
| 75 | <dl> | ||
| 76 | <dt><strong><a name="item_parse_byte_string"><em>$manifest</em> = Whatpm::CacheManifest->parse_byte_string (<em>$manifest_bytes</em>, <em>$manifest_uri</em>, <em>$manifest_base_uri</em>, <em>$onerror</em>)</a></strong><br /> | ||
| 77 | </dt> | ||
| 78 | <dt><strong><a name="item_parse_char_string"><em>$manifest</em> = Whatpm::CacheManifest->parse_char_string (<em>$manifest_chars</em>, <em>$manifest_uri</em>, <em>$manifest_base_uri</em>, <em>$onerror</em>)</a></strong><br /> | ||
| 79 | </dt> | ||
| 80 | </dl> | ||
| 81 |