| HTML::HTML5::Microdata::ToRDFa - rewrite HTML5+Microdata into XHTML+RDFa |
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;
0.01
This module may be used to convert HTML documents marked up with Microdata into XHTML+RDFa (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 the XML::LibXML::Document manpage 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.
Please report any bugs to http://rt.cpan.org/.
the HTML::HTML5::Microdata::Parser manpage, the RDF::RDFa::Parser manpage.
Toby Inkster <tobyink@cpan.org>.
Copyright 2010 Toby Inkster
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| HTML::HTML5::Microdata::ToRDFa - rewrite HTML5+Microdata into XHTML+RDFa |