Injects an existing document with triples. $document is an XML::LibXML::Document to inject, or a well-formed XML string. $model is an RDF::Trine::Model object providing the triples. Returns an XML::LibXML::Document object suitable for serialising using its toString method.

See create_document for information about serving the RDFa with the text/html media type.

Can also be called as a class method. See create_document for details.

$gen->nodes($model)

Provides triple-laden XML::LibXML::Elements to be added to a document. $model is an RDF::Trine::Model object providing the triples. If called in list context, returns a list of XML::LibXML::Element objects which can be added to a document; otherwise returns an XML::LibXML::NodeList containing a list of such elements.

Can also be called as a class method. See create_document for details.

The HTML::Pretty generator can be passed a couple of additional options:

The notes are a list of RDF::RDFa::Generator::HTML::Pretty::Note objects which are added as notes to the end of each subject's data.

Additionally the methods serialize_model_to_file, serialize_model_to_string, serialize_iterator_to_file and serialize_iterator_to_string are provided for compatibility with the RDF::Trine::Serializer interface.

BUGS

SEE ALSO

AUTHOR

Toby Inkster <tobyink@cpan.org>.

COPYRIGHT AND LICENCE

Copyright (C) 2010 by Toby Inkster

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8 or, at your option, any later version of Perl 5 you may have available.