| HTML-HTML5-Microdata-ToRDFa documentation | view source | Contained in the HTML-HTML5-Microdata-ToRDFa distribution. |
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 (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_stringGet the document converted to RDFa as a string. This will be well-formed XML, but not necessarily valid XHTML.
$rdfa->get_domGet 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.
Please report any bugs to http://rt.cpan.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.
| HTML-HTML5-Microdata-ToRDFa documentation | view source | Contained in the HTML-HTML5-Microdata-ToRDFa distribution. |