The hreview and xfolk microformats
use HTML::Microformats::DocumentContext; use HTML::Microformats::Format::hReview; my $context = HTML::Microformats::DocumentContext->new($dom, $uri); my @reviews = HTML::Microformats::Format::hReview->extract_all( $dom->documentElement, $context); foreach my $review (@reviews) { print $review->get_reviewer->get_fn . "\n"; }
HTML::Microformats::Format::hReview inherits from HTML::Microformats::Format. See the base class definition for a description of property getter/setter methods, constructors, etc.
HTML::Microformats::Format::hReview supports hReview 0.3 and xFolk as described at <http://microformats.org/wiki/hreview> and <http://microformats.org/wiki/xfolk>, with the following differences:
hAudio hAudio microformats can be used as the reviewed item. (At the time of writing this documentation however, HTML::Microformats didn't support hAudio!)
Jumbled-up Support for xFolk and hReview are bundled together, so properties are usually supported in both, even if only defined by one microformat spec. (e.g. reviewer is defined by hReview, but this module supports it in xFolk entries.)
<http://www.purl.org/stuff/rev#>, <http://ontologi.es/hreview#>.
Please report any bugs to <http://rt.cpan.org/>.
Known limitations:
If no \*(L"reviewer\*(R" is found inside the hReview, parsers should look outside the hReview, in the context of the page, for the \*(L"reviewer\*(R". If there is no \*(L"reviewer\*(R" outside either, then parsers should use the author defined by the containing document language, e.g. for \s-1HTML\s0 documents, the <address> contact info for the page (which is ideally marked up as an hCard as well).
HTML::Microformats::Format, HTML::Microformats.
Toby Inkster <[email protected]>.
Copyright 2008-2012 Toby Inkster
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
\s-1THIS\s0 \s-1PACKAGE\s0 \s-1IS\s0 \s-1PROVIDED\s0 \*(L"\s-1AS\s0 \s-1IS\s0\*(R" \s-1AND\s0 \s-1WITHOUT\s0 \s-1ANY\s0 \s-1EXPRESS\s0 \s-1OR\s0 \s-1IMPLIED\s0 \s-1WARRANTIES\s0, \s-1INCLUDING\s0, \s-1WITHOUT\s0 \s-1LIMITATION\s0, \s-1THE\s0 \s-1IMPLIED\s0 \s-1WARRANTIES\s0 \s-1OF\s0 \s-1MERCHANTIBILITY\s0 \s-1AND\s0 \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0.