NAME
RDF::RDFa::Parser::Trine - Use a RDF::Trine::Model for the returned RDF graph
VERSION
Version 0.01
SYNOPSIS
This module inherits all the methods of its superclass, but overrides the graph method, and will instead return an RDF::Trine::Model.
It can also be configured to create graph names. It does this by looking for xml:id attributes of the nearest parent element to the node where it found the parsed triple.
$storage = RDF::Trine::Store::DBI->temporary_store;
$parser = RDF::RDFa::Parser::Trine->new($storage, $xhtml, 'http://example.com/foo');
$parser->consume;
my $graph = $parser->graph;
METHODS
- $p = RDF::RDFa::Parser::Trine->new($store, $xhtml, $baseuri)
-
The constructor. Has three parameters. The first is a (single) RDF::Trine::Store. The others are passed directly to the superclass.
- $p->graph
-
Will return an RDF::Trine::Model object containing the full graph. As per the RDFa specification, it will always return an unnamed graph containing all the triples of the RDFa document.
- $p->named_graph(0)
-
If this method is called with a true argument, the parser will also look for an xml:id attribute of the nearest parent element, and if found, will concatenate the attribute with the base URI and a hash to create a graph name URI. This feature is turned off by default.
AUTHOR
Kjetil Kjernsmo, <kjetilk at cpan.org>
BUGS
Please report any bugs or feature requests to bug-rdf-rdfa-parser-trine at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=RDF-RDFa-Parser-Trine. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc RDF::RDFa::Parser::Trine
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=RDF-RDFa-Parser-Trine
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
I would like to thank Toby Inkster for creating Swignition and the parser module that this module depends on. I would also like to thank Greg Williams for RDF::Trine.
Finally, I would like to thank the persistently circling dahuts for their help and encouragement.
COPYRIGHT & LICENSE
Copyright 2009 Kjetil Kjernsmo.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.