HTML::HTML5::Microdata::ToRDFa - rewrite HTML5+Microdata into XHTML+RDFa
use HTML::HTML5::Microdata::ToRDFa; my $rdfa = HTML::HTML5::Microdata::ToRDFa->new($html, $baseuri); print $rdfa->get_string;
This module may be used to convert HTML documents marked up with Microdata into XHTML+RDFa 1.0 (which is more widely implemented by consuming software).
If the input document uses a mixture of Microdata and RDFa, the semantics of the output document may be incorrect.
$rdfa = HTML::HTML5::Microdata::ToRDFa->new($html, $baseuri)
$html may be an HTML document (as a string) or an XML::LibXML::Document object.
$baseuri is the base URI for resolving relative URI references. If $html is undefined, then this module will fetch $baseuri to obtain the document to be converted.
$rdfa->get_string
Get the document converted to RDFa as a string. This will be well-formed XML, but not necessarily valid XHTML.
$rdfa->get_dom
Get the document converted to XHTML+RDFa as an XML::LibXML::Document object.
Note that each time get_string and get_dom are called, the conversion process is run from scratch. Repeatedly calling these methods is wasteful.
get_string
get_dom
Please report any bugs to http://rt.cpan.org/.
HTML::HTML5::Microdata::Parser, RDF::RDFa::Parser.
http://www.perlrdf.org/.
Toby Inkster <tobyink@cpan.org>.
Copyright 2010-2011 Toby Inkster
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
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.
To install HTML::HTML5::Microdata::ToRDFa, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::HTML5::Microdata::ToRDFa
CPAN shell
perl -MCPAN -e shell install HTML::HTML5::Microdata::ToRDFa
For more information on module installation, please visit the detailed CPAN module installation guide.