HTML-Microformats
view release on metacpan or search on metacpan
The general pattern of usage is to create an HTML::Microformats object
(which corresponds to an HTML document) using the "new_document" method;
then ask for the data, as a Perl hashref, a JSON string, or an
RDF::Trine model.
Constructor
"$doc = HTML::Microformats->new_document($html, $uri, %opts)"
Constructs a document object.
$html is the HTML or XHTML source (string) or an
XML::LibXML::Document.
$uri is the document URI, important for resolving relative URL
references.
%opts are additional parameters; currently only one option is
defined: $opts{'type'} is set to 'text/html' or
'application/xhtml+xml', to control how $html is parsed.
Profile Management
lib/HTML/Microformats.pm view on Meta::CPAN
a JSON string, or an RDF::Trine model.
=head2 Constructor
=over 4
=item C<< $doc = HTML::Microformats->new_document($html, $uri, %opts) >>
Constructs a document object.
$html is the HTML or XHTML source (string) or an XML::LibXML::Document.
$uri is the document URI, important for resolving relative URL references.
%opts are additional parameters; currently only one option is defined:
$opts{'type'} is set to 'text/html' or 'application/xhtml+xml', to
control how $html is parsed.
=back
=head2 Profile Management
lib/HTML/Microformats/Format/XFN.pm view on Meta::CPAN
{
my $self = shift;
return $self->{'hcard'};
}
1;
=head1 MICROFORMAT
HTML::Microformats::Format::XFN supports XHTML Friends Network 1.0 and 1.1
as described at L<http://gmpg.org/xfn/1> and L<http://gmpg.org/xfn/11>; plus the
relationship profile described at L<http://purl.org/vocab/relationship/>;
and XHTML Enemies Network 1.0 as described at L<http://xen.adactio.com/>.
By default, only XFN 1.1 is parsed, but if the context has profiles matching the
other URIs above, then the other vocabularies are supported.
=head1 RDF OUTPUT
Data is returned using the DERI's XFN vocabulary
(L<http://vocab.sindice.com/xfn#>) and when appropriate, Ian Davis'
RDF relationship vocab (L<http://purl.org/vocab/relationship/>)
and Toby Inkster's XEN vocab (L<http://buzzword.org.uk/rdf/xen#>).
( run in 1.171 second using v1.01-cache-2.11-cpan-49f99fa48dc )