Toby Inkster > HTML-Microformats > HTML::Microformats::Format::hCard

Download:
HTML-Microformats-0.105.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  2
View/Report Bugs
Module Version: 0.105   Source  

NAME ^

HTML::Microformats::Format::hCard - the hCard microformat

SYNOPSIS ^

 use HTML::Microformats::DocumentContext;
 use HTML::Microformats::Format::hCard;

 my $context = HTML::Microformats::DocumentContext->new($dom, $uri);
 my @cards   = HTML::Microformats::Format::hCard->extract_all(
                   $dom->documentElement, $context);
 foreach my $card (@cards)
 {
   print $card->get_fn . "\n";
 }

DESCRIPTION ^

HTML::Microformats::Format::hCard inherits from HTML::Microformats::Format. See the base class definition for a description of property getter/setter methods, constructors, etc.

Additional Method

MICROFORMAT ^

HTML::Microformats::Format::hCard supports hCard as described at http://microformats.org/wiki/hcard, with the following additions:

RDF OUTPUT ^

Data is returned using the W3C's vCard vocabulary (http://www.w3.org/2006/vcard/ns#) with some supplemental terms from Toby Inkster's vCard extensions vocabulary (http://buzzword.org.uk/rdf/vcardx#) and occasional other terms.

After long deliberation on the "has-a/is-a issue", the author of this module decided that the holder of a vCard and the vCard itself should be modelled as two separate resources, and this is how the data is returned. Some information about the holder of the vCard can be inferred from information about the vCard; for instance, the vCard's fn property can be used to determin the holder's foaf:name. This module uses FOAF (http://xmlns.com/foaf/0.1/) to represent information about the holder of the vCard.

BUGS ^

Please report any bugs to http://rt.cpan.org/.

SEE ALSO ^

HTML::Microformats::Format, HTML::Microformats.

AUTHOR ^

Toby Inkster <tobyink@cpan.org>.

COPYRIGHT AND LICENCE ^

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.

DISCLAIMER OF WARRANTIES ^

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

syntax highlighting: