RDF::RDFa::Template - A simple templating system using RDFa to build RDF data views
Version 0.05
This module takes an RDFa Template document, and parses it. Then it builds something that you can use to run queries.
This package is just a placeholder for now, other packages in this distribution contains the actual code. See the below TODO for the status of this module, though.
This is an initial release just to enable a meaningful discussion. Thus, there are many remaining tasks before this is a fully functional templating system. This lists some of the most severe things that need to be addressed:
Support for queries with multiple solutions is essential, but not yet implemented.
Multiple queries in a single template is not tested.
Prefixes are hardcoded. In the finished system, the XML namespace prefixes must not be hardcoded, but namespace URIs must be used instead. This is not there yet. Thus, you need to use rat and sub like in the examples.
rat
sub
The attribute that sets the graph name is hardcoded to g:graph or {http://example.org/graph#}graph. This will be up to the author to select and pass as doc_graph for each unit. Thus, this must change.
g:graph
{http://example.org/graph#}graph
doc_graph
The RDF objects are checked for variables, which is contained in XML Literals. Only the first child is used, this may not be reliable.
DTD information is not prefixed to the result document.
The system doesn't follow OOP best practices in many places, as instance variables are accessed directly rather than using methods. Pretty nasty, it is, but it will be corrected.
Consider using just one namespace.
There is a simple web server script in the examples/ directory of this distribution. This sets up a web server on your machine that can do the template transform. Any template files in the directory can be visited with a browser, e.g.
examples/
http://localhost:8080/dbpedia-mustang-range.input.xhtml
Kjetil Kjernsmo, <kjetilk at cpan.org>
<kjetilk at cpan.org>
Please report any bugs not already on the TODO list to bug-rdf-rdfa-template at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=RDF-RDFa-Template. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-rdf-rdfa-template at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc RDF::RDFa::Template
To discuss further directions for this module, please use the Perl/RDF mailing list at http://lists.perlrdf.org/listinfo/dev.
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=RDF-RDFa-Template
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/RDF-RDFa-Template
CPAN Ratings
http://cpanratings.perl.org/d/RDF-RDFa-Template
Search CPAN
http://search.cpan.org/dist/RDF-RDFa-Template/
I would like to thank Greg Williams and Toby Inkster for useful discussions when creating this module. I have also received important help from Kip Hampton and Chris Prather.
Copyright 2010 Kjetil Kjernsmo.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install RDF::RDFa::Template, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RDF::RDFa::Template
CPAN shell
perl -MCPAN -e shell install RDF::RDFa::Template
For more information on module installation, please visit the detailed CPAN module installation guide.