| AtteanX::Serializer::RDFa(3pm) | User Contributed Perl Documentation | AtteanX::Serializer::RDFa(3pm) |
AtteanX::Serializer::RDFa - RDFa Serializer for Attean
use Attean;
use Attean::RDF qw(iri);
use URI::NamespaceMap;
my $ser = Attean->get_serializer('RDFa')->new;
my $string = $ser->serialize_iter_to_bytes($iter);
my $ns = URI::NamespaceMap->new( { ex => iri('http://example.org/') });
$ns->guess_and_add('foaf');
my $note = RDF::RDFa::Generator::HTML::Pretty::Note->new(iri('http://example.org/foo'), 'This is a Note');
my $ser = Attean->get_serializer('RDFa')->new(base => iri('http://example.org/'),
namespaces => $ns,
style => 'HTML::Pretty',
generator_options => { notes => [$note]});
$ser->serialize_iter_to_io($fh, $iter);
This module can be used to serialize RDFa with several different styles. It is implemented using Attean to wrap around RDF::RDFa::Generator, which does the heavy lifting. It composes Attean::API::TripleSerializer and Attean::API::AbbreviatingSerializer.
In addition to attributes required by Attean::API::TripleSerializer that should not be a concern to users, the following attributes can be set:
This implements four required methods:
Please report any bugs to <https://github.com/kjetilk/p5-atteanx-serializer-rdfa/issues>.
RDF::RDFa::Generator, RDF::Trine::Serializer::RDFa.
Kjetil Kjernsmo <kjetilk@cpan.org>.
This software is copyright (c) 2017, 2018, 2019, 2021 by Kjetil Kjernsmo.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system 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.
| 2022-11-19 | perl v5.36.0 |