Toby Inkster > RDF-vCard-0.012 > RDF::vCard::Exporter

Download:
RDF-vCard-0.012.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.012   Source  

NAME ^

RDF::vCard::Exporter - export RDF data to vCard format

SYNOPSIS ^

 use RDF::vCard;
 
 my $input    = "http://example.com/contact-data.rdf";
 my $exporter = RDF::vCard::Exporter->new(vcard_version => 3);
 
 print $_ foreach $exporter->export_cards($input);

DESCRIPTION ^

This module reads RDF and writes vCards.

Constructor

Methods

RDF Input

Input is expected to use the newer of the 2010 revision of the W3C's vCard vocabulary http://www.w3.org/Submission/vcard-rdf/. (Note that even though this was revised in 2010, the term URIs include "2006" in them.)

Some extensions from the namespace http://buzzword.org.uk/rdf/vcardx# are also supported. (Namely: vx:usage, vx:kind, vx:gender, vx:sex, vx:dday, vx:anniversary, vx:lang, vx:caladruri, vx:caluri, vx:fburl, vx:impp, vx:source.)

The module author has made the decision not to support FOAF and other RDF vocabularies that may be used to model contact information for people and organisations, as they do not necessarily map cleanly onto vCard. People hoping to map non-vCard RDF to vCard using this module may have some luck pre-processing their RDF using a rules-based reasoner.

vCard Output

The output of this module mostly aims at vCard 3.0 (RFC 2426) compliance. In the face of weird input data though, (e.g. an FN property that is a URI instead of a literal) it can pretty easily descend into exporting junk, non-compliant vCards.

Many vCard 4.0 properties, such as the IMPP and KIND, are also supported.

The vcard_version constructor option allows you to influence how some properties like GEO and TEL (which differ between 3.0 and 4.0) are output.

SEE ALSO ^

RDF::vCard, HTML::Microformats, RDF::TrineShortcuts.

http://www.w3.org/Submission/vcard-rdf/.

http://www.perlrdf.org/.

AUTHOR ^

Toby Inkster <tobyink@cpan.org>.

COPYRIGHT ^

Copyright 2011 Toby Inkster

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: