Template.pm

filter: Statementstmt 100% 8 / 8 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 10 / 10 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Template/SimpleQuery.pm ↑ Summary
1 package RDF::RDFa::Template;
2  
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $VERSION = '0.05';
7  
8  
9 =head1 NAME
10  
11 RDF::RDFa::Template - A simple templating system using RDFa to build RDF data views
12  
13 =head1 VERSION
14  
15 Version 0.05
16  
17 =head1 DESCRIPTION
18  
19 =head1 SYNOPSIS
20  
21 This module takes an RDFa Template document, and parses it. Then it
22 builds something that you can use to run queries.
23  
24  
25  
26 =head1 METHODS
27  
28 This package is just a placeholder for now, other packages in this
29 distribution contains the actual code. See the below TODO for the
30 status of this module, though.
31  
32 =head1 TODO
33  
34 This is an initial release just to enable a meaningful
35 discussion. Thus, there are many remaining tasks before this is a
36 fully functional templating system. This lists some of the most severe
37 things that need to be addressed:
38  
39 =over
40  
41 =item * Support for queries with multiple solutions is essential, but
42 not yet implemented.
43  
44 =item * Multiple queries in a single template is not tested.
45  
46 =item * Prefixes are hardcoded. In the finished system, the XML
47 namespace prefixes must not be hardcoded, but namespace URIs must be
48 used instead. This is not there yet. Thus, you need to use C<rat> and
49 C<sub> like in the examples.
50  
51 =item * The attribute that sets the graph name is hardcoded to
52 C<g:graph> or C<{http://example.org/graph#}graph>. This will be up to
53 the author to select and pass as C<doc_graph> for each unit. Thus,
54 this must change.
55  
56 =item * The RDF objects are checked for variables, which is contained
57 in XML Literals. Only the first child is used, this may not be
58 reliable.
59  
60 =item * DTD information is not prefixed to the result document.
61  
62 =item * The system doesn't follow OOP best practices in many places,
63 as instance variables are accessed directly rather than using
64 methods. Pretty nasty, it is, but it will be corrected.
65  
66 =item * Consider using just one namespace.
67  
68 =back
69  
70 =head1 EXAMPLE SCRIPT
71  
72 There is a simple web server script in the C<examples/> directory of
73 this distribution. This sets up a web server on your machine that can
74 do the template transform. Any template files in the directory can be
75 visited with a browser, e.g.
76  
77 http://localhost:8080/dbpedia-mustang-range.input.xhtml
78  
79  
80  
81 =head1 AUTHOR
82  
83 Kjetil Kjernsmo, C<< <kjetilk at cpan.org> >>
84  
85 =head1 BUGS
86  
87 Please report any bugs not already on the TODO list to C<bug-rdf-rdfa-template
88 at rt.cpan.org>, or through the web interface at
89 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=RDF-RDFa-Template>.
90 I will be notified, and then you'll automatically be notified of
91 progress on your bug as I make changes.
92  
93  
94  
95  
96 =head1 SUPPORT
97  
98 You can find documentation for this module with the perldoc command.
99  
100 perldoc RDF::RDFa::Template
101  
102 To discuss further directions for this module, please use the Perl/RDF mailing list at
103 L<http://lists.perlrdf.org/listinfo/dev>.
104  
105  
106  
107 You can also look for information at:
108  
109 =over 4
110  
111 =item * RT: CPAN's request tracker
112  
113 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=RDF-RDFa-Template>
114  
115 =item * AnnoCPAN: Annotated CPAN documentation
116  
117 L<http://annocpan.org/dist/RDF-RDFa-Template>
118  
119 =item * CPAN Ratings
120  
121 L<http://cpanratings.perl.org/d/RDF-RDFa-Template>
122  
123 =item * Search CPAN
124  
125 L<http://search.cpan.org/dist/RDF-RDFa-Template/>
126  
127 =back
128  
129  
130 =head1 ACKNOWLEDGEMENTS
131  
132 I would like to thank Greg Williams and Toby Inkster for useful
133 discussions when creating this module. I have also received important
134 help from Kip Hampton and Chris Prather.
135  
136 =head1 COPYRIGHT & LICENSE
137  
138 Copyright 2010 Kjetil Kjernsmo.
139  
140 This program is free software; you can redistribute it and/or modify it
141 under the same terms as Perl itself.
142  
143  
144 =cut
145  
146 2 1; # End of RDF::RDFa::Template
« Template/SimpleQuery.pm ↑ Summary