COPYRIGHT000644001750001750 301213217160351 16126 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.106Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: RDF-RDFa-Generator Upstream-Contact: Kjetil Kjernsmo (KJETILK) and Toby Inkster (TOBYINK) Source: https://metacpan.org/release/RDF-RDFa-Generator Files: Changes META.json META.yml dist.ini doap.ttl lib/RDF/RDFa/Generator/HTML/Head.pm lib/RDF/RDFa/Generator/HTML/Hidden.pm lib/RDF/RDFa/Generator/HTML/Pretty.pm t/01basic.t t/02_kk_namespaces.t t/uninit_lang_warning.t Copyright: Copyright 2017 Kjetil Kjernsmo and Toby Inkster. License: GPL-1.0+ or Artistic-1.0 Files: INSTALL LICENSE TODO examples/example1-out.html examples/example1.css examples/example1.pl Copyright: Unknown License: Unknown Files: COPYRIGHT CREDITS SIGNATURE Copyright: None License: public-domain Files: README README.pod lib/RDF/RDFa/Generator.pm Copyright: Copyright (C) 2010 by Toby Inkster, 2017 Kjetil Kjernsmo. License: GPL-1.0+ or Artistic-1.0 Files: lib/RDF/RDFa/Generator/HTML/Pretty/Note.pm Copyright: Copyright (C) 2010 by Toby Inkster. License: GPL-1.0+ or Artistic-1.0 Files: Makefile.PL Copyright: Copyright 2013 Toby Inkster. License: GPL-1.0+ or Artistic-1.0 License: Artistic-1.0 This software is Copyright (c) 2017 by the copyright holder(s). This is free software, licensed under: The Artistic License 1.0 License: GPL-1.0 This software is Copyright (c) 2017 by the copyright holder(s). This is free software, licensed under: The GNU General Public License, Version 1, February 1989 CREDITS000644001750001750 21713217160350 15636 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.106Maintainer: - Kjetil Kjernsmo (KJETILK) - Toby Inkster (TOBYINK) Contributor: - ZORAN Changes000644001750001750 337013217160350 16134 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.106RDF-RDFa-Generator ================== Created: 2010-05-05 Home page: Bug tracker: Maintainer: Toby Inkster (TOBYINK) Maintainer: Kjetil Kjernsmo (KJETILK) 0.106 2017-12-22 [ Bug Fixes ] - Prevent XML::LibXML::Element::setAttribute complaining about uninitialized value. ZORAN++ [ Packaging ] - Many minor improvements in packaging. - Upgrade distribution build system to Dist::Inkt. 0.103 2012-12-12 [ Bug Fixes ] - Fix strange buglet that affected RDF::RDFa::Linter. [ Packaging ] - Upgrade distribution build system. [ Other ] - Drop common::sense and parent.pm deps. 0.102 2011-07-06 [ Bug Fixes ] - element should name @name, not @nane. - Namespaces in HTML::Head and HTML::Hidden. 0.101 2010-09-06 - Added: Icons for a few extra classes. - Added: Support 'namespaces' option for the constructor, for compatibility with other Trine serialisers. - Added: use RDF::Prefixes. 0.100 2010-07-25 - Added: HTML::Pretty now includes cross-links to other resources. 0.05 2010-05-27 [ Bug Fixes ] - UTF-8 fixes. 0.04 2010-05-21 - HTML::Hidden and HTML::Pretty now use @about instead of @src to set the subject URI. - HTML::Pretty no longer makes 'javascript:' URLs into links. 0.03 2010-05-19 [ Bug Fixes ] - HTML::Pretty Fallback to sorting by object now works. [ Other ] - Added: HTML::Pretty can now force safe HTML (prevents injection attacks). 0.02 2010-05-18 - Added: HTML::Pretty can now include additional textual notes in the output. This functionality added for RDF::RDFa::Linter. - Using FamFamFam Silk icons. 0.01 2010-05-09 Original version INSTALL000644001750001750 173313217160350 15673 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.106 Installing RDF-RDFa-Generator should be straightforward. INSTALLATION WITH CPANMINUS If you have cpanm, you only need one line: % cpanm RDF::RDFa::Generator If you are installing into a system-wide directory, you may need to pass the "-S" flag to cpanm, which uses sudo to install the module: % cpanm -S RDF::RDFa::Generator INSTALLATION WITH THE CPAN SHELL Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan RDF::RDFa::Generator MANUAL INSTALLATION As a last resort, you can manually install it. Download the tarball and unpack it. Consult the file META.json for a list of pre-requisites. Install these first. To build RDF-RDFa-Generator: % perl Makefile.PL % make && make test Then install it: % make install If you are installing into a system-wide directory, you may need to run: % sudo make install LICENSE000644001750001750 4375113217160350 15675 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.106This software is copyright (c) 2017 by Kjetil Kjernsmo and Toby Inkster. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2017 by Kjetil Kjernsmo and Toby Inkster. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2017 by Kjetil Kjernsmo and Toby Inkster. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. 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. The End MANIFEST000644001750001750 67113217160351 15754 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.106COPYRIGHT CREDITS Changes INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README README.pod SIGNATURE TODO dist.ini doap.ttl examples/example1-out.html examples/example1.css examples/example1.pl lib/RDF/RDFa/Generator.pm lib/RDF/RDFa/Generator/HTML/Head.pm lib/RDF/RDFa/Generator/HTML/Hidden.pm lib/RDF/RDFa/Generator/HTML/Pretty.pm lib/RDF/RDFa/Generator/HTML/Pretty/Note.pm t/01basic.t t/02_kk_namespaces.t t/uninit_lang_warning.t META.json000644001750001750 524113217160351 16262 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.106{ "abstract" : "Generate data for RDFa serialization", "author" : [ "Toby Inkster (TOBYINK) ", "Kjetil Kjernsmo (KJETILK) " ], "dynamic_config" : 0, "generated_by" : "Dist::Inkt::Profile::TOBYINK version 0.024, CPAN::Meta::Converter version 2.150010", "keywords" : [], "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "RDF-RDFa-Generator", "no_index" : { "directory" : [ "eg", "examples", "inc", "t", "xt" ] }, "optional_features" : {}, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.17" } }, "runtime" : { "requires" : { "Data::Dumper" : "0", "Icon::FamFamFam::Silk" : "0", "RDF::Prefixes" : "0", "RDF::Trine" : "0.112", "XML::LibXML" : "1.60" } }, "test" : { "requires" : { "Test::More" : "0.96", "Test::Output" : "0" } } }, "provides" : { "RDF::RDFa::Generator" : { "file" : "lib/RDF/RDFa/Generator.pm", "version" : "0.106" }, "RDF::RDFa::Generator::HTML::Head" : { "file" : "lib/RDF/RDFa/Generator/HTML/Head.pm", "version" : "0.106" }, "RDF::RDFa::Generator::HTML::Hidden" : { "file" : "lib/RDF/RDFa/Generator/HTML/Hidden.pm", "version" : "0.106" }, "RDF::RDFa::Generator::HTML::Pretty" : { "file" : "lib/RDF/RDFa/Generator/HTML/Pretty.pm", "version" : "0.106" }, "RDF::RDFa::Generator::HTML::Pretty::Note" : { "file" : "lib/RDF/RDFa/Generator/HTML/Pretty/Note.pm", "version" : "0.106" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/kjetilk/p5-rdf-rdfa-generator/issues" }, "homepage" : "https://metacpan.org/release/RDF-RDFa-Generator", "license" : [ "http://dev.perl.org/licenses/" ], "repository" : { "type" : "git", "url" : "git://github.com/kjetilk/p5-rdf-rdfa-generator.git", "web" : "https://github.com/kjetilk/p5-rdf-rdfa-generator" }, "x_IRC" : "irc://irc.perl.org/#perlrdf", "x_identifier" : "http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/project" }, "version" : "0.106", "x_contributors" : [ "ZORAN " ], "x_serialization_backend" : "JSON::PP version 2.27300_01", "x_static_install" : 1 } META.yml000644001750001750 335213217160351 16113 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.106--- abstract: 'Generate data for RDFa serialization' author: - 'Toby Inkster (TOBYINK) ' - 'Kjetil Kjernsmo (KJETILK) ' build_requires: Test::More: '0.96' Test::Output: '0' configure_requires: ExtUtils::MakeMaker: '6.17' dynamic_config: 0 generated_by: 'Dist::Inkt::Profile::TOBYINK version 0.024, CPAN::Meta::Converter version 2.150010' keywords: [] license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: RDF-RDFa-Generator no_index: directory: - eg - examples - inc - t - xt optional_features: {} provides: RDF::RDFa::Generator: file: lib/RDF/RDFa/Generator.pm version: '0.106' RDF::RDFa::Generator::HTML::Head: file: lib/RDF/RDFa/Generator/HTML/Head.pm version: '0.106' RDF::RDFa::Generator::HTML::Hidden: file: lib/RDF/RDFa/Generator/HTML/Hidden.pm version: '0.106' RDF::RDFa::Generator::HTML::Pretty: file: lib/RDF/RDFa/Generator/HTML/Pretty.pm version: '0.106' RDF::RDFa::Generator::HTML::Pretty::Note: file: lib/RDF/RDFa/Generator/HTML/Pretty/Note.pm version: '0.106' requires: Data::Dumper: '0' Icon::FamFamFam::Silk: '0' RDF::Prefixes: '0' RDF::Trine: '0.112' XML::LibXML: '1.60' resources: IRC: irc://irc.perl.org/#perlrdf Identifier: http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/project bugtracker: https://github.com/kjetilk/p5-rdf-rdfa-generator/issues homepage: https://metacpan.org/release/RDF-RDFa-Generator license: http://dev.perl.org/licenses/ repository: git://github.com/kjetilk/p5-rdf-rdfa-generator.git version: '0.106' x_contributors: - 'ZORAN ' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' x_static_install: 1 Makefile.PL000644001750001750 1432513217160351 16636 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.106use strict; use ExtUtils::MakeMaker 6.17; my $EUMM = eval( $ExtUtils::MakeMaker::VERSION ); my $meta = { "abstract" => "Generate data for RDFa serialization", "author" => [ "Toby Inkster (TOBYINK) ", "Kjetil Kjernsmo (KJETILK) ", ], "dynamic_config" => 0, "generated_by" => "Dist::Inkt::Profile::TOBYINK version 0.024, CPAN::Meta::Converter version 2.150010", "keywords" => [], "license" => ["perl_5"], "meta-spec" => { url => "http://search.cpan.org/perldoc?CPAN::Meta::Spec", version => 2, }, "name" => "RDF-RDFa-Generator", "no_index" => { directory => ["eg", "examples", "inc", "t", "xt"] }, "prereqs" => { configure => { requires => { "ExtUtils::MakeMaker" => 6.17 } }, runtime => { requires => { "Data::Dumper" => 0, "Icon::FamFamFam::Silk" => 0, "RDF::Prefixes" => 0, "RDF::Trine" => 0.112, "XML::LibXML" => "1.60", }, }, test => { requires => { "Test::More" => 0.96, "Test::Output" => 0 } }, }, "provides" => { "RDF::RDFa::Generator" => { file => "lib/RDF/RDFa/Generator.pm", version => 0.106 }, "RDF::RDFa::Generator::HTML::Head" => { file => "lib/RDF/RDFa/Generator/HTML/Head.pm", version => 0.106 }, "RDF::RDFa::Generator::HTML::Hidden" => { file => "lib/RDF/RDFa/Generator/HTML/Hidden.pm", version => 0.106 }, "RDF::RDFa::Generator::HTML::Pretty" => { file => "lib/RDF/RDFa/Generator/HTML/Pretty.pm", version => 0.106 }, "RDF::RDFa::Generator::HTML::Pretty::Note" => { file => "lib/RDF/RDFa/Generator/HTML/Pretty/Note.pm", version => 0.106, }, }, "release_status" => "stable", "resources" => { bugtracker => { web => "https://github.com/kjetilk/p5-rdf-rdfa-generator/issues", }, homepage => "https://metacpan.org/release/RDF-RDFa-Generator", license => ["http://dev.perl.org/licenses/"], repository => { type => "git", url => "git://github.com/kjetilk/p5-rdf-rdfa-generator.git", web => "https://github.com/kjetilk/p5-rdf-rdfa-generator", }, x_identifier => "http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/project", x_IRC => "irc://irc.perl.org/#perlrdf", }, "version" => 0.106, "x_contributors" => ["ZORAN "], "x_static_install" => 1, }; my %dynamic_config; my %WriteMakefileArgs = ( ABSTRACT => $meta->{abstract}, AUTHOR => ($EUMM >= 6.5702 ? $meta->{author} : $meta->{author}[0]), DISTNAME => $meta->{name}, VERSION => $meta->{version}, EXE_FILES => [ map $_->{file}, values %{ $meta->{x_provides_scripts} || {} } ], NAME => do { my $n = $meta->{name}; $n =~ s/-/::/g; $n }, test => { TESTS => "t/*.t" }, %dynamic_config, ); $WriteMakefileArgs{LICENSE} = $meta->{license}[0] if $EUMM >= 6.3001; sub deps { my %r; for my $stage (@_) { for my $dep (keys %{$meta->{prereqs}{$stage}{requires}}) { next if $dep eq 'perl'; my $ver = $meta->{prereqs}{$stage}{requires}{$dep}; $r{$dep} = $ver if !exists($r{$dep}) || $ver >= $r{$dep}; } } \%r; } my ($build_requires, $configure_requires, $runtime_requires, $test_requires); if ($EUMM >= 6.6303) { $WriteMakefileArgs{BUILD_REQUIRES} ||= deps('build'); $WriteMakefileArgs{CONFIGURE_REQUIRES} ||= deps('configure'); $WriteMakefileArgs{TEST_REQUIRES} ||= deps('test'); $WriteMakefileArgs{PREREQ_PM} ||= deps('runtime'); } elsif ($EUMM >= 6.5503) { $WriteMakefileArgs{BUILD_REQUIRES} ||= deps('build', 'test'); $WriteMakefileArgs{CONFIGURE_REQUIRES} ||= deps('configure'); $WriteMakefileArgs{PREREQ_PM} ||= deps('runtime'); } elsif ($EUMM >= 6.52) { $WriteMakefileArgs{CONFIGURE_REQUIRES} ||= deps('configure'); $WriteMakefileArgs{PREREQ_PM} ||= deps('runtime', 'build', 'test'); } else { $WriteMakefileArgs{PREREQ_PM} ||= deps('configure', 'build', 'test', 'runtime'); } { my ($minperl) = reverse sort( grep defined && /^[0-9]+(\.[0-9]+)?$/, map $meta->{prereqs}{$_}{requires}{perl}, qw( configure build runtime ) ); if (defined($minperl)) { die "Installing $meta->{name} requires Perl >= $minperl" unless $] >= $minperl; $WriteMakefileArgs{MIN_PERL_VERSION} ||= $minperl if $EUMM >= 6.48; } } sub FixMakefile { return unless -d 'inc'; my $file = shift; local *MAKEFILE; open MAKEFILE, "< $file" or die "FixMakefile: Couldn't open $file: $!; bailing out"; my $makefile = do { local $/; }; close MAKEFILE or die $!; $makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /; $makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g; $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g; $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m; $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m; open MAKEFILE, "> $file" or die "FixMakefile: Couldn't open $file: $!; bailing out"; print MAKEFILE $makefile or die $!; close MAKEFILE or die $!; } my $mm = WriteMakefile(%WriteMakefileArgs); FixMakefile($mm->{FIRST_MAKEFILE} || 'Makefile'); exit(0); README000644001750001750 1061413217160350 15540 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.106NAME RDF::RDFa::Generator - Generate data for RDFa serialization DESCRIPTION Constructor `$gen = RDF::RDFa::Generator->new(style => $style, %options)` Creates a new generator object. $style is one of the following case-sensitive strings: 'HTML::Head' (the default), 'HTML::Hidden' or 'HTML::Pretty'. You can also construct an object like this: $gen = RDF::RDFa::Generator::HTML::Head->new(%options); Options include: * base - the base URL where the output data will be published. This allows in some cases for the generated RDFa to include relative URIs. * data_context - if non-null, a URI (string) which indicates the context (named graph) containing the data to generate RDFa for. * namespaces - a {prefix=>uri} hashref of preferred CURIE prefixes. * ns - a {uri=>prefix} hashref of preferred CURIE prefixes. DEPRECATED - use namespaces instead. * prefix_attr - use the @prefix attribute for CURIE prefixes (RDFa 1.1 only). Boolean, defaults to false. * safe_xml_literals - prevents XML literals from injecting arbitrary XHTML into the output. Boolean, defaults to FALSE. * title - assign a element for generated XHTML documents. * version - set generated RDFa version. Valid values are '1.0' (the default) or '1.1'. Public Methods `$gen->create_document($model)` Creates a new RDFa file containing triples. $model is an RDF::Trine::Model object providing the triples. Returns an XML::LibXML::Document object suitable for serialising using its `toString` method. If you're planning on serving the RDFa with the text/html media type, then it is recommended that you use HTML::HTML5::Writer to serialise the document rather than `toString`. Can also be called as a class method: $document = RDF::RDFa::Generator->create_document($model) # Same as: # $document = RDF::RDFa::Generator->new->create_document($model) `$gen->inject_document($document, $model)` 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: $gen->nodes($model, notes_heading=>'Additional Info', notes=>\@notes); 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 Please report any bugs to <https://github.com/kjetilk/p5-rdf-rdfa-generator/issues>. SEE ALSO HTML::HTML5::Writer, XML::LibXML, RDF::RDFa::Parser, RDF::Trine, RDF::Prefixes. <http://www.perlrdf.org/>. AUTHOR Toby Inkster <tobyink@cpan.org>. Kjetil Kjernsmo <kjetilk@cpan.org>. COPYRIGHT AND LICENCE Copyright (C) 2010 by Toby Inkster, 2017 Kjetil Kjernsmo 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. Icons RDF::RDFa::Generator::HTML::Pretty uses the FamFamFam Silk icons; see <http://famfamfam.com/lab/icons/silk/>. ��������������������������������������������������������������������������������������������������������������������README.pod������������������������������������������������������������������������������������������000644��001750��001750�� 13467�13217160350� 16332� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.106�����������������������������������������������������������������������������������������������������������������������������������������������=head1 NAME RDF::RDFa::Generator - Generate data for RDFa serialization =cut package RDF::RDFa::Generator; use 5.008; use strict; our $VERSION = '0.106'; use RDF::RDFa::Generator::HTML::Head; use RDF::RDFa::Generator::HTML::Hidden; use RDF::RDFa::Generator::HTML::Pretty; use RDF::Trine; BEGIN { $RDF::Trine::Serializer::serializer_names{ 'rdfa' } = __PACKAGE__; foreach my $type (qw(application/xhtml+xml text/html)) { $RDF::Trine::Serializer::media_types{ $type } = __PACKAGE__; } } =head1 DESCRIPTION =head2 Constructor =over 4 =item C<< $gen = RDF::RDFa::Generator->new(style => $style, %options) >> Creates a new generator object. $style is one of the following case-sensitive strings: 'HTML::Head' (the default), 'HTML::Hidden' or 'HTML::Pretty'. You can also construct an object like this: $gen = RDF::RDFa::Generator::HTML::Head->new(%options); Options include: =over 4 =item * B<base> - the base URL where the output data will be published. This allows in some cases for the generated RDFa to include relative URIs. =item * B<data_context> - if non-null, a URI (string) which indicates the context (named graph) containing the data to generate RDFa for. =item * B<namespaces> - a {prefix=>uri} hashref of preferred CURIE prefixes. =item * B<ns> - a {uri=>prefix} hashref of preferred CURIE prefixes. DEPRECATED - use B<namespaces> instead. =item * B<prefix_attr> - use the @prefix attribute for CURIE prefixes (RDFa 1.1 only). Boolean, defaults to false. =item * B<safe_xml_literals> - prevents XML literals from injecting arbitrary XHTML into the output. Boolean, B<defaults to FALSE>. =item * B<title> - assign a <title> element for generated XHTML documents. =item * B<version> - set generated RDFa version. Valid values are '1.0' (the default) or '1.1'. =back =back =cut sub new { my ($class, %opts) = @_; my $implementation = sprintf('%s::%s', __PACKAGE__, $opts{'style'} || 'HTML::Head'); return $implementation->new(%opts); } =head2 Public Methods =over 4 =item C<< $gen->create_document($model) >> Creates a new RDFa file containing triples. $model is an RDF::Trine::Model object providing the triples. Returns an XML::LibXML::Document object suitable for serialising using its C<toString> method. If you're planning on serving the RDFa with the text/html media type, then it is recommended that you use HTML::HTML5::Writer to serialise the document rather than C<toString>. Can also be called as a class method: $document = RDF::RDFa::Generator->create_document($model) # Same as: # $document = RDF::RDFa::Generator->new->create_document($model) =cut sub create_document { my $proto = shift; my $self = (ref $proto) ? $proto : $proto->new; return $self->create_document(@_); } =item C<< $gen->inject_document($document, $model) >> 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 C<toString> method. See C<create_document> for information about serving the RDFa with the text/html media type. Can also be called as a class method. See C<create_document> for details. =cut sub inject_document { my $proto = shift; my $self = (ref $proto) ? $proto : $proto->new; return $self->inject_document(@_); } =item C<< $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 C<create_document> for details. The HTML::Pretty generator can be passed a couple of additional options: $gen->nodes($model, notes_heading=>'Additional Info', notes=>\@notes); 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. =cut sub nodes { my $proto = shift; my $self = (ref $proto) ? $proto : $proto->new; return $self->nodes(@_); } =back Additionally the methods C<serialize_model_to_file>, C<serialize_model_to_string>, C<serialize_iterator_to_file> and C<serialize_iterator_to_string> are provided for compatibility with the L<RDF::Trine::Serializer> interface. =cut sub serialize_model_to_string { my ($proto, $model) = @_; return $proto->create_document($model)->toString; } sub serialize_model_to_file { my ($proto, $fh, $model) = @_; print {$fh} $proto->create_document($model)->toString; } sub serialize_iterator_to_string { my ($proto, $iter) = @_; my $model = RDF::Trine::Model->temporary_model; while (my $st = $iter->next) { $model->add_statement($st); } return $proto->serialize_model_to_string($model); } sub serialize_iterator_to_file { my ($proto, $fh, $iter) = @_; my $model = RDF::Trine::Model->temporary_model; while (my $st = $iter->next) { $model->add_statement($st); } return $proto->serialize_model_to_file($fh, $model); } 1; __END__ =head1 BUGS Please report any bugs to L<https://github.com/kjetilk/p5-rdf-rdfa-generator/issues>. =head1 SEE ALSO L<HTML::HTML5::Writer>, L<XML::LibXML>, L<RDF::RDFa::Parser>, L<RDF::Trine>, L<RDF::Prefixes>. L<http://www.perlrdf.org/>. =head1 AUTHOR Toby Inkster E<lt>tobyink@cpan.orgE<gt>. Kjetil Kjernsmo E<lt>kjetilk@cpan.orgE<gt>. =head1 COPYRIGHT AND LICENCE Copyright (C) 2010 by Toby Inkster, 2017 Kjetil Kjernsmo 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. =head2 Icons RDF::RDFa::Generator::HTML::Pretty uses the FamFamFam Silk icons; see L<http://famfamfam.com/lab/icons/silk/>. =cut ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������SIGNATURE�������������������������������������������������������������������������������������������000644��001750��001750�� 5606�13217160351� 16132� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.106�����������������������������������������������������������������������������������������������������������������������������������������������This file contains message digests of all files listed in MANIFEST, signed via the Module::Signature module, version 0.81. To verify the content in this distribution, first make sure you have Module::Signature installed, then type: % cpansign -v It will check each file's integrity, as well as the signature's validity. If "==> Signature verified OK! <==" is not displayed, the distribution may already have been compromised, and you should not run its Makefile.PL or Build.PL. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 SHA1 7b5d208800e6d75929c9fc8460bada94765653f0 COPYRIGHT SHA1 50ff1164ce6a80b19cf718197559e6fec454b9b1 CREDITS SHA1 125b501027ea9d6e5631e76d57a36de8212de4bb Changes SHA1 4ff8b9c58bb0c75deffb5f515f261e1c89169987 INSTALL SHA1 1afd04fac8d7ac4c1394adc84336667e82af1717 LICENSE SHA1 9e905317af507662dc62a6cc076ff72fdbee42de MANIFEST SHA1 96c850ba1b9758c277b4ff9172a0d11ef475397b META.json SHA1 62e66a9b1095baade547bb68f4393ef2bfe0ea4f META.yml SHA1 14a5c103b1cc6b1a071bb925e5fd0beafac1d6e4 Makefile.PL SHA1 c00346de257677198de3383e44c9773b22ff219e README SHA1 d30c24ef906a136b022e6a086f2db8d99698ff72 README.pod SHA1 7c3202fe551655d70b690f389f10a348b614294a TODO SHA1 08212f2a6e388e70dcc89e35c5a2862a142efd6c dist.ini SHA1 036b0796dccfe0998bad9dbe54d4a700fc4c440b doap.ttl SHA1 c7aee86ed37f40b6ef6122ad21114e2cdac427f8 examples/example1-out.html SHA1 1e494669f72f4cd350c2aec64901989643320234 examples/example1.css SHA1 49e255ea736380898d62fd73b5f62037b1eb50ff examples/example1.pl SHA1 d30c24ef906a136b022e6a086f2db8d99698ff72 lib/RDF/RDFa/Generator.pm SHA1 e96c03dea3940ab6b60525c28b6b12f03caae49d lib/RDF/RDFa/Generator/HTML/Head.pm SHA1 c196cf8a94aa5f54233c0c8858eb8c4e896f78ea lib/RDF/RDFa/Generator/HTML/Hidden.pm SHA1 7287d2b32da8783cb1bebd7e968730ace6dda349 lib/RDF/RDFa/Generator/HTML/Pretty.pm SHA1 9f64f3919f54351f6e7b07082c1eaf9fa6a3694b lib/RDF/RDFa/Generator/HTML/Pretty/Note.pm SHA1 b01bb61e52c0bb2c07305304677e11993daf8a9e t/01basic.t SHA1 47372671246d38f6374fa052faeac9278b7176c0 t/02_kk_namespaces.t SHA1 955084ab7ff814d0bf0b7adcae676aca5d975cd4 t/uninit_lang_warning.t -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEDsyLxtCi6bk7pBcmf77o3zqeSqUFAlo84OkACgkQf77o3zqe SqVUrQ//b00tNzR8w6eXPVJPCcU3/DEeomTAq/1h/DZtVc82lP5hJkXlyeQisqN/ BGi8meY4ro2ssdY+YBsENDsltA04m/G3NejsHdheg/B96ntVKbgDDvJIfR+6czHt 09Q3cKoDlKWCtruFHWlUQkPnH7hck/yNc7fIufj4+HOUwXt7vUpMSS9j+zEl4Dja l4X89glbzbbErVr480WvqtEHpgFDKIMvBHRvG+8SGCNW5tcYYEauzUne/iSgVzQA fCcNLhzbgKDmON++NHd2xmZzK9BQwmeqJ5ueEV8H9LvLHsAEufQafDTGLOstK5nT IusbE+/vSvSkVGgHrf28/4IKXozV25dw9UTnuhpdigSaL1+oABCxfV/M60Dpjid7 mxHZYito78dIiuzLWx6sYp87o26VR96R8wQqAxRO3T8YCfS3R6f4vkh0TB/Kl5vx 7chVdF84+oA6jqOGuIaPT6iaXyfg0P5bUxDMlqxlTny8pd9nFfhnQx58Deu2iPSI DCFhqBt5DQtCi8TuzMmIwP+H//rKjZsBFKMHzz+KD8kkTU5AmQu/CG6weLE7OfoF u7YKys3VNgQkCt0WJUxRRrg+t6uFi9b7I8Two14SJgVmtp3809Pq/4+VEI8ltul2 qEwdCzNWfZNLE3ISXKwCsR8tY4waLDL8TyhP3lQVF2olkQurUzQ= =Rtqe -----END PGP SIGNATURE----- ��������������������������������������������������������������������������������������������������������������������������TODO������������������������������������������������������������������������������������������������000644��001750��001750�� 161�13217160350� 15304� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.106�����������������������������������������������������������������������������������������������������������������������������������������������* Add an Atom (DataRSS) generator. * More icons for HTML::Pretty. * Add links between resources in HTML::Pretty. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������dist.ini��������������������������������������������������������������������������������������������000644��001750��001750�� 104�13217160350� 16255� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.106�����������������������������������������������������������������������������������������������������������������������������������������������;;class='Dist::Inkt::Profile::TOBYINK' ;;name='RDF-RDFa-Generator' ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doap.ttl��������������������������������������������������������������������������������������������000644��001750��001750�� 40143�13217160350� 16330� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.106�����������������������������������������������������������������������������������������������������������������������������������������������_:rb299877ac254a44b7811226f2e382ecb8r0 <http://ontologi.es/doap-deps#on> "Test::More 0.96"^^<http://ontologi.es/doap-deps#CpanId> . _:rb299877ac254a44b7811226f2e382ecb8r1 <http://ontologi.es/doap-deps#on> "Test::Output"^^<http://ontologi.es/doap-deps#CpanId> . _:rb299877ac254a44b7811226f2e382ecb8r2 <http://ontologi.es/doap-deps#on> "Data::Dumper"^^<http://ontologi.es/doap-deps#CpanId> . _:rb299877ac254a44b7811226f2e382ecb8r3 <http://ontologi.es/doap-deps#on> "Icon::FamFamFam::Silk"^^<http://ontologi.es/doap-deps#CpanId> . _:rb299877ac254a44b7811226f2e382ecb8r4 <http://ontologi.es/doap-deps#on> "RDF::Trine 0.112"^^<http://ontologi.es/doap-deps#CpanId> . _:rb299877ac254a44b7811226f2e382ecb8r5 <http://ontologi.es/doap-deps#on> "RDF::Prefixes"^^<http://ontologi.es/doap-deps#CpanId> . _:rb299877ac254a44b7811226f2e382ecb8r6 <http://ontologi.es/doap-deps#on> "XML::LibXML 1.60"^^<http://ontologi.es/doap-deps#CpanId> . _:rb7b3f8e63d3d3482da74eaf28a9b0e56er0 <http://usefulinc.com/ns/doap#browse> <https://github.com/kjetilk/p5-rdf-rdfa-generator> ; a <http://usefulinc.com/ns/doap#GitRepository> ; <http://www.w3.org/ns/prov#has_provenance> <http://git2prov.org/git2prov?giturl=https://github.com/kjetilk/p5-rdf-rdfa-generator&serialization=PROV-O#> . _:rb95fd96d32f704714b4057c6c8f3ab85ar0 <http://ontologi.es/doap-changeset#item> [ <http://www.w3.org/2000/01/rdf-schema#label> "Using FamFamFam Silk icons."@en ], [ a <http://ontologi.es/doap-changeset#Addition> ; <http://www.w3.org/2000/01/rdf-schema#label> "HTML::Pretty can now include additional textual notes in the output. This functionality added for RDF::RDFa::Linter."@en ] . _:rb95fd96d32f704714b4057c6c8f3ab85ar10 a <http://ontologi.es/doap-changeset#Bugfix> ; <http://www.w3.org/2000/01/rdf-schema#label> "UTF-8 fixes."@en . _:rb95fd96d32f704714b4057c6c8f3ab85ar11 <http://ontologi.es/doap-changeset#item> [ a <http://ontologi.es/doap-changeset#Addition> ; <http://www.w3.org/2000/01/rdf-schema#label> "HTML::Pretty now includes cross-links to other resources."@en ] . _:rb95fd96d32f704714b4057c6c8f3ab85ar13 <http://ontologi.es/doap-changeset#item> [ a <http://ontologi.es/doap-changeset#Addition> ; <http://www.w3.org/2000/01/rdf-schema#label> "use RDF::Prefixes."@en ], [ a <http://ontologi.es/doap-changeset#Addition> ; <http://www.w3.org/2000/01/rdf-schema#label> "Support 'namespaces' option for the constructor, for compatibility with other Trine serialisers."@en ], [ a <http://ontologi.es/doap-changeset#Addition> ; <http://www.w3.org/2000/01/rdf-schema#label> "Icons for a few extra classes."@en ] . _:rb95fd96d32f704714b4057c6c8f3ab85ar17 <http://ontologi.es/doap-changeset#item> [ <http://ontologi.es/doap-changeset#fixes> [ <http://ontologi.es/doap-bugs#reporter> <http://purl.org/NET/cpan-uri/person/kjetilk> ] ; a <http://ontologi.es/doap-changeset#Bugfix> ; <http://www.w3.org/2000/01/rdf-schema#label> "<meta> element should name @name, not @nane."@en ], [ <http://ontologi.es/doap-changeset#fixes> [ <http://ontologi.es/doap-bugs#reporter> <http://purl.org/NET/cpan-uri/person/kjetilk> ] ; a <http://ontologi.es/doap-changeset#Bugfix> ; <http://www.w3.org/2000/01/rdf-schema#label> "Namespaces in HTML::Head and HTML::Hidden."@en ] . _:rb95fd96d32f704714b4057c6c8f3ab85ar22 <http://ontologi.es/doap-changeset#item> [ a <http://ontologi.es/doap-changeset#Packaging> ; <http://www.w3.org/2000/01/rdf-schema#label> "Upgrade distribution build system."@en ], [ a <http://ontologi.es/doap-changeset#Bugfix> ; <http://www.w3.org/2000/01/rdf-schema#label> "Fix strange buglet that affected RDF::RDFa::Linter."@en ], [ <http://www.w3.org/2000/01/rdf-schema#label> "Drop common::sense and parent.pm deps."@en ] . _:rb95fd96d32f704714b4057c6c8f3ab85ar26 <http://ontologi.es/doap-changeset#item> [ a <http://ontologi.es/doap-changeset#Packaging> ; <http://www.w3.org/2000/01/rdf-schema#label> "Upgrade distribution build system to Dist::Inkt."@en ], [ <http://ontologi.es/doap-changeset#blame> <http://purl.org/NET/cpan-uri/person/zoran> ; a <http://ontologi.es/doap-changeset#Bugfix> ; <http://www.w3.org/2000/01/rdf-schema#label> "Prevent XML::LibXML::Element::setAttribute complaining about uninitialized value."@en ], [ a <http://ontologi.es/doap-changeset#Packaging> ; <http://www.w3.org/2000/01/rdf-schema#label> "Many minor improvements in packaging."@en ] . _:rb95fd96d32f704714b4057c6c8f3ab85ar3 <http://ontologi.es/doap-changeset#item> [ a <http://ontologi.es/doap-changeset#Bugfix> ; <http://www.w3.org/2000/01/rdf-schema#label> "HTML::Pretty Fallback to sorting by object now works."@en ], [ a <http://ontologi.es/doap-changeset#Addition> ; <http://www.w3.org/2000/01/rdf-schema#label> "HTML::Pretty can now force safe HTML (prevents injection attacks)."@en ] . _:rb95fd96d32f704714b4057c6c8f3ab85ar6 <http://ontologi.es/doap-changeset#item> [ <http://www.w3.org/2000/01/rdf-schema#label> "HTML::Hidden and HTML::Pretty now use @about instead of @src to set the subject URI."@en ], [ <http://www.w3.org/2000/01/rdf-schema#label> "HTML::Pretty no longer makes 'javascript:' URLs into links."@en ] . _:rb95fd96d32f704714b4057c6c8f3ab85ar9 <http://ontologi.es/doap-changeset#item> _:rb95fd96d32f704714b4057c6c8f3ab85ar10 . <http://dev.perl.org/licenses/> <http://purl.org/dc/terms/title> "the same terms as the perl 5 programming language system itself" . <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/project> <http://ontologi.es/doap-deps#runtime-requirement> _:rb299877ac254a44b7811226f2e382ecb8r2, _:rb299877ac254a44b7811226f2e382ecb8r3, _:rb299877ac254a44b7811226f2e382ecb8r4, _:rb299877ac254a44b7811226f2e382ecb8r5, _:rb299877ac254a44b7811226f2e382ecb8r6 ; <http://ontologi.es/doap-deps#test-requirement> _:rb299877ac254a44b7811226f2e382ecb8r0, _:rb299877ac254a44b7811226f2e382ecb8r1 ; <http://purl.org/dc/terms/contributor> <http://purl.org/NET/cpan-uri/person/kjetilk>, <http://purl.org/NET/cpan-uri/person/tobyink> ; <http://usefulinc.com/ns/doap#bug-database> <https://github.com/kjetilk/p5-rdf-rdfa-generator/issues> ; <http://usefulinc.com/ns/doap#category> <http://dbpedia.org/resource/Category:Semantic_Web> ; <http://usefulinc.com/ns/doap#created> "2010-05-05"^^<http://www.w3.org/2001/XMLSchema#date> ; <http://usefulinc.com/ns/doap#developer> <http://purl.org/NET/cpan-uri/person/kjetilk>, <http://purl.org/NET/cpan-uri/person/tobyink> ; <http://usefulinc.com/ns/doap#documenter> <http://purl.org/NET/cpan-uri/person/tobyink> ; <http://usefulinc.com/ns/doap#download-page> <https://metacpan.org/release/RDF-RDFa-Generator> ; <http://usefulinc.com/ns/doap#homepage> <https://metacpan.org/release/RDF-RDFa-Generator> ; <http://usefulinc.com/ns/doap#license> <http://dev.perl.org/licenses/> ; <http://usefulinc.com/ns/doap#maintainer> <http://purl.org/NET/cpan-uri/person/kjetilk>, <http://purl.org/NET/cpan-uri/person/tobyink> ; <http://usefulinc.com/ns/doap#name> "RDF-RDFa-Generator" ; <http://usefulinc.com/ns/doap#programming-language> "Perl" ; <http://usefulinc.com/ns/doap#release> <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-01>, <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-02>, <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-03>, <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-04>, <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-05>, <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-100>, <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-101>, <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-102>, <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-103>, <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-106> ; <http://usefulinc.com/ns/doap#repository> _:rb7b3f8e63d3d3482da74eaf28a9b0e56er0 ; <http://usefulinc.com/ns/doap#shortdesc> "Generate data for RDFa serialization"@en ; <http://usefulinc.com/ns/doap#support-forum> <irc://irc.perl.org/#perlrdf> ; <http://usefulinc.com/ns/doap#tester> <http://purl.org/NET/cpan-uri/person/tobyink> ; a <http://usefulinc.com/ns/doap#Project> . <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-01> <http://ontologi.es/doap-changeset#released-by> <http://purl.org/NET/cpan-uri/person/tobyink> ; <http://purl.org/dc/terms/identifier> "RDF-RDFa-Generator-0.01"^^<http://www.w3.org/2001/XMLSchema#string> ; <http://purl.org/dc/terms/issued> "2010-05-09"^^<http://www.w3.org/2001/XMLSchema#date> ; <http://usefulinc.com/ns/doap#file-release> <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.01.tar.gz> ; <http://usefulinc.com/ns/doap#revision> "0.01"^^<http://www.w3.org/2001/XMLSchema#string> ; a <http://usefulinc.com/ns/doap#Version> ; <http://www.w3.org/2000/01/rdf-schema#label> "Original version"@en . <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-02> <http://ontologi.es/doap-changeset#changeset> _:rb95fd96d32f704714b4057c6c8f3ab85ar0 ; <http://ontologi.es/doap-changeset#released-by> <http://purl.org/NET/cpan-uri/person/tobyink> ; <http://purl.org/dc/terms/identifier> "RDF-RDFa-Generator-0.02"^^<http://www.w3.org/2001/XMLSchema#string> ; <http://purl.org/dc/terms/issued> "2010-05-18"^^<http://www.w3.org/2001/XMLSchema#date> ; <http://usefulinc.com/ns/doap#file-release> <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.02.tar.gz> ; <http://usefulinc.com/ns/doap#revision> "0.02"^^<http://www.w3.org/2001/XMLSchema#string> ; a <http://usefulinc.com/ns/doap#Version> . <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-03> <http://ontologi.es/doap-changeset#changeset> _:rb95fd96d32f704714b4057c6c8f3ab85ar3 ; <http://ontologi.es/doap-changeset#released-by> <http://purl.org/NET/cpan-uri/person/tobyink> ; <http://purl.org/dc/terms/identifier> "RDF-RDFa-Generator-0.03"^^<http://www.w3.org/2001/XMLSchema#string> ; <http://purl.org/dc/terms/issued> "2010-05-19"^^<http://www.w3.org/2001/XMLSchema#date> ; <http://usefulinc.com/ns/doap#file-release> <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.03.tar.gz> ; <http://usefulinc.com/ns/doap#revision> "0.03"^^<http://www.w3.org/2001/XMLSchema#string> ; a <http://usefulinc.com/ns/doap#Version> . <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-04> <http://ontologi.es/doap-changeset#changeset> _:rb95fd96d32f704714b4057c6c8f3ab85ar6 ; <http://ontologi.es/doap-changeset#released-by> <http://purl.org/NET/cpan-uri/person/tobyink> ; <http://purl.org/dc/terms/identifier> "RDF-RDFa-Generator-0.04"^^<http://www.w3.org/2001/XMLSchema#string> ; <http://purl.org/dc/terms/issued> "2010-05-21"^^<http://www.w3.org/2001/XMLSchema#date> ; <http://usefulinc.com/ns/doap#file-release> <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.04.tar.gz> ; <http://usefulinc.com/ns/doap#revision> "0.04"^^<http://www.w3.org/2001/XMLSchema#string> ; a <http://usefulinc.com/ns/doap#Version> . <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-05> <http://ontologi.es/doap-changeset#changeset> _:rb95fd96d32f704714b4057c6c8f3ab85ar9 ; <http://ontologi.es/doap-changeset#released-by> <http://purl.org/NET/cpan-uri/person/tobyink> ; <http://purl.org/dc/terms/identifier> "RDF-RDFa-Generator-0.05"^^<http://www.w3.org/2001/XMLSchema#string> ; <http://purl.org/dc/terms/issued> "2010-05-27"^^<http://www.w3.org/2001/XMLSchema#date> ; <http://usefulinc.com/ns/doap#file-release> <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.05.tar.gz> ; <http://usefulinc.com/ns/doap#revision> "0.05"^^<http://www.w3.org/2001/XMLSchema#string> ; a <http://usefulinc.com/ns/doap#Version> . <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-100> <http://ontologi.es/doap-changeset#changeset> _:rb95fd96d32f704714b4057c6c8f3ab85ar11 ; <http://ontologi.es/doap-changeset#released-by> <http://purl.org/NET/cpan-uri/person/tobyink> ; <http://purl.org/dc/terms/identifier> "RDF-RDFa-Generator-0.100"^^<http://www.w3.org/2001/XMLSchema#string> ; <http://purl.org/dc/terms/issued> "2010-07-25"^^<http://www.w3.org/2001/XMLSchema#date> ; <http://usefulinc.com/ns/doap#file-release> <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.100.tar.gz> ; <http://usefulinc.com/ns/doap#revision> "0.100"^^<http://www.w3.org/2001/XMLSchema#string> ; a <http://usefulinc.com/ns/doap#Version> . <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-101> <http://ontologi.es/doap-changeset#changeset> _:rb95fd96d32f704714b4057c6c8f3ab85ar13 ; <http://ontologi.es/doap-changeset#released-by> <http://purl.org/NET/cpan-uri/person/tobyink> ; <http://purl.org/dc/terms/identifier> "RDF-RDFa-Generator-0.101"^^<http://www.w3.org/2001/XMLSchema#string> ; <http://purl.org/dc/terms/issued> "2010-09-06"^^<http://www.w3.org/2001/XMLSchema#date> ; <http://usefulinc.com/ns/doap#file-release> <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.101.tar.gz> ; <http://usefulinc.com/ns/doap#revision> "0.101"^^<http://www.w3.org/2001/XMLSchema#string> ; a <http://usefulinc.com/ns/doap#Version> . <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-102> <http://ontologi.es/doap-changeset#changeset> _:rb95fd96d32f704714b4057c6c8f3ab85ar17 ; <http://ontologi.es/doap-changeset#released-by> <http://purl.org/NET/cpan-uri/person/tobyink> ; <http://purl.org/dc/terms/identifier> "RDF-RDFa-Generator-0.102"^^<http://www.w3.org/2001/XMLSchema#string> ; <http://purl.org/dc/terms/issued> "2011-07-06"^^<http://www.w3.org/2001/XMLSchema#date> ; <http://usefulinc.com/ns/doap#file-release> <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.102.tar.gz> ; <http://usefulinc.com/ns/doap#revision> "0.102"^^<http://www.w3.org/2001/XMLSchema#string> ; a <http://usefulinc.com/ns/doap#Version> . <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-103> <http://ontologi.es/doap-changeset#changeset> _:rb95fd96d32f704714b4057c6c8f3ab85ar22 ; <http://ontologi.es/doap-changeset#released-by> <http://purl.org/NET/cpan-uri/person/tobyink> ; <http://purl.org/dc/terms/identifier> "RDF-RDFa-Generator-0.103"^^<http://www.w3.org/2001/XMLSchema#string> ; <http://purl.org/dc/terms/issued> "2012-12-12"^^<http://www.w3.org/2001/XMLSchema#date> ; <http://usefulinc.com/ns/doap#file-release> <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.103.tar.gz> ; <http://usefulinc.com/ns/doap#revision> "0.103"^^<http://www.w3.org/2001/XMLSchema#string> ; a <http://usefulinc.com/ns/doap#Version> . <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-106> <http://ontologi.es/doap-changeset#changeset> _:rb95fd96d32f704714b4057c6c8f3ab85ar26 ; <http://ontologi.es/doap-changeset#released-by> <http://purl.org/NET/cpan-uri/person/kjetilk> ; <http://purl.org/dc/terms/identifier> "RDF-RDFa-Generator-0.106"^^<http://www.w3.org/2001/XMLSchema#string> ; <http://purl.org/dc/terms/issued> "2017-12-22"^^<http://www.w3.org/2001/XMLSchema#date> ; <http://usefulinc.com/ns/doap#file-release> <http://backpan.cpan.org/authors/id/K/KJ/KJETILK/RDF-RDFa-Generator-0.106.tar.gz> ; <http://usefulinc.com/ns/doap#revision> "0.106"^^<http://www.w3.org/2001/XMLSchema#string> ; a <http://usefulinc.com/ns/doap#Version> . <http://purl.org/NET/cpan-uri/person/kjetilk> a <http://xmlns.com/foaf/0.1/Person> ; <http://www.w3.org/2002/07/owl#sameAs> <http://git2prov.org/git2prov?giturl=https://github.com/kjetilk/p5-rdf-rdfa-generator&serialization=PROV-O#user-Kjetil-Kjernsmo>, <http://www.kjetil.kjernsmo.net/foaf#me> ; <http://xmlns.com/foaf/0.1/mbox> <mailto:kjetilk@cpan.org> ; <http://xmlns.com/foaf/0.1/name> "Kjetil Kjernsmo" ; <http://xmlns.com/foaf/0.1/nick> "KJETILK", "kjetilk" ; <http://xmlns.com/foaf/0.1/page> <https://metacpan.org/author/KJETILK> . <http://purl.org/NET/cpan-uri/person/tobyink> a <http://xmlns.com/foaf/0.1/Person> ; <http://www.w3.org/2002/07/owl#sameAs> <http://git2prov.org/git2prov?giturl=https://github.com/kjetilk/p5-rdf-rdfa-generator&serialization=PROV-O#user-Toby-Inkster> ; <http://xmlns.com/foaf/0.1/mbox> <mailto:tobyink@cpan.org> ; <http://xmlns.com/foaf/0.1/name> "Toby Inkster" ; <http://xmlns.com/foaf/0.1/nick> "TOBYINK" ; <http://xmlns.com/foaf/0.1/page> <https://metacpan.org/author/TOBYINK> . <http://purl.org/NET/cpan-uri/person/zoran> a <http://xmlns.com/foaf/0.1/Person> ; <http://xmlns.com/foaf/0.1/nick> "ZORAN" ; <http://xmlns.com/foaf/0.1/page> <https://metacpan.org/author/ZORAN> . �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������example1-out.html�����������������������������������������������������������������������������������000644��001750��001750�� 7456�13217160350� 21677� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.106/examples��������������������������������������������������������������������������������������������������������������������������������������<link rel=stylesheet href="example1.css"> <div xmlns="http://www.w3.org/1999/xhtml" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:xhv="http://www.w3.org/1999/xhtml/vocab#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><div id="id-_:r049E17D46FDF11DF9B46D954215DFA7Br0" about="[_:r049E17D46FDF11DF9B46D954215DFA7Br0]"><h3 class="blank">_:r049E17D46FDF11DF9B46D954215DFA7Br0</h3><span class="rdf-type" rel="rdf:type"><img about="http://xmlns.com/foaf/0.1/Person" alt="http://xmlns.com/foaf/0.1/Person" src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJ3SURBVDjLpZNtSNNRFIcNKunF1rZWBMJqKaSiX9RP1dClsjldA42slW0q5oxZiuHrlqllLayoaJa2jbm1Lc3QUZpKFmmaTMsaRp+kMgjBheSmTL2//kqMBJlFHx44XM7vOfdyuH4A/P6HFQ9zo7cpa/mM6RvCrVDzaVDy6C5JJKv6rwSnIhlFd0R0Up/GwF2KWyl01CTSkM/dQoQRzAurCjRCGnRUUE2FaoSL0HExiYVzsQwcj6RNrSqo4W5Gh6Yc4+1qDDTkIy+GhYK4nTgdz0H2PrrHUJzs71NQn86enPn+CVN9GnzruoYR63mMPbkC59gQzDl7pt7rc9f7FNyUhPY6Bx9gwt4E9zszhWWpdg6ZcS8j3O7zCTuEpnXB+3MNZkUUZu0NmHE8XsL91oSWwiiEc3MeseLrN6woYCWa/Zl8ozyQ3w3Hl2lYy0SwlCUvsVi/Gv2JwITnYPDun2Hy6jYuEzAF1jUBCVYpO6kXo+NuGMeBAgcgfwNkvgBOPgUqXgKvP7rBFvRhE1crp8Vq1noFYSlacVyqGk0D86gbART9BDk9BFnPCNJbCY5aCFL1Cyhtp0RWAp74MsKSrkq9guHyvfMTtmLc1togpZoyqYmyNoITzVTYRJCiXYBIQ3CwFqi83o3JDhX6C0M8XsGIMoQ4OyuRlq1DdZcLkmbgGDX1iIEKNxAcbgTEOqC4ZRaJ6Ub86K7CYFEo8Qo+GBQlQyXBczLZpbloaQ9k1NUz/kD2myBBKxRZpa5hVcQslalatoUxizxAVVrN3CW21bFj9F858Q9dnIRmDyeuybM71uxmH9BNBB1q6zybV7H9s1Ue4PM3/gu/AEbfqfWy2twsAAAAAElFTkSuQmCC" title="http://xmlns.com/foaf/0.1/Person"/></span><dl><dt title="http://xmlns.com/foaf/0.1/name">foaf:name</dt><dd property="foaf:name" class="plain-literal" xml:lang="">Joe Bloggs</dd><dt title="http://xmlns.com/foaf/0.1/plan">foaf:plan</dt><dd property="foaf:plan" class="plain-literal" xml:lang="en">To conquer the world!</dd><dt class="seeAlso">see also</dt><dd class="seeAlso"><span>is <i title="http://xmlns.com/foaf/0.1/primaryTopic">foaf:primaryTopic</i> of <a about="http://example.net/" rel="seeAlso" href="#id-http:-2f--2f-example.net-2f-">http://example.net/</a></span>.</dd></dl></div><div id="id-http:-2f--2f-example.net-2f-" about="http://example.net/"><h3 class="resource">http://example.net/</h3><span class="rdf-type" rel="rdf:type"><img about="http://xmlns.com/foaf/0.1/Document" alt="http://xmlns.com/foaf/0.1/Document" src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADoSURBVBgZBcExblNBGAbA2ceegTRBuIKOgiihSZNTcC5LUHAihNJR0kGKCDcYJY6D3/77MdOinTvzAgCw8ysThIvn/VojIyMjIyPP+bS1sUQIV2s95pBDDvmbP/mdkft83tpYguZq5Jh/OeaYh+yzy8hTHvNlaxNNczm+la9OTlar1UdA/+C2A4trRCnD3jS8BB1obq2Gk6GU6QbQAS4BUaYSQAf4bhhKKTFdAzrAOwAxEUAH+KEM01SY3gM6wBsEAQB0gJ+maZoC3gI6iPYaAIBJsiRmHU0AALOeFC3aK2cWAACUXe7+AwO0lc9eTHYTAAAAAElFTkSuQmCC" title="http://xmlns.com/foaf/0.1/Document"/></span><dl><dt title="http://www.w3.org/1999/xhtml/vocab#next">xhv:next</dt><dd class="resource"><a rel="xhv:next" href="http://example.net/page2">http://example.net/page2</a></dd><dt title="http://www.w3.org/1999/xhtml/vocab#title">xhv:title</dt><dd property="xhv:title" class="plain-literal" xml:lang="">About Joe</dd><dt title="http://xmlns.com/foaf/0.1/primaryTopic">foaf:primaryTopic</dt><dd class="blank"><span rel="foaf:primaryTopic" resource="[_:r049E17D46FDF11DF9B46D954215DFA7Br0]">_:r049E17D46FDF11DF9B46D954215DFA7Br0</span> <a about="[_:r049E17D46FDF11DF9B46D954215DFA7Br0]" rel="seeAlso" href="#id-r049E17D46FDF11DF9B46D954215DFA7Br0">see also</a></dd><dt title="http://xmlns.com/foaf/0.1/segment">foaf:segment</dt><dd property="foaf:segment" class="typed-literal datatype-xmlliteral" datatype="rdf:XMLLiteral">Hello <b>World</b></dd><dt title="http://xmlns.com/foaf/0.1/utf8">foaf:utf8</dt><dd property="foaf:utf8" class="plain-literal" xml:lang="">fces</dd></dl></div></div> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������example1.css����������������������������������������������������������������������������������������000644��001750��001750�� 2312�13217160350� 20700� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.106/examples��������������������������������������������������������������������������������������������������������������������������������������/* <link rel="stylesheet" type="text/css" href="example1.css"/> */ div > div { background: #fd9; border: 1px solid #db7; margin: 1em; padding: 0.67em; } div > div h3 { margin: 0; padding: 0; } div > div span.rdf-type { float: right; text-align: right; width: 40px; position: relative; top: -1.67em; } div > div dl dt { margin: 0.5em 0 0; padding: 0; font-weight: bold; font-style: italic; font-size: smaller; } dd.seeAlso a, a[rel="seeAlso"] { background: transparent url("data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAEsSURBVDjLY/j//z8DJZhhmBuQvdj8a+p8w//xc3U5yTIgeb7h18bNUf/DZ2j8958qz0nQgPyltv9zF5v/TV9o/Ddxrv7fmvWh/1ednvi/ZLX/f9d+8b+23YI8eA0AOvn/hnPT/q89OwWsccXpCf8n7Cn5v/B41/+MpW7/TdvZ/+o2M/LjNADoZLDmvl35/zt3ZP9v3Zb2v2Fz4v+mren/Zxxq/h+zwOa/aj3DH5wGRM/W/L/y1IT/S0/0/l94rOv/vKMdQEOy/k8/1PQ/banHf8VahlfSlQwGOA0InK74z3Oi9D/nftF/1t38/+LmW/2fdrDhf9Jit//ytQzPJSsZtEiKBe1mxq/xC53/y1czPAFqVic5GoFO/ipXzfxftJJBkeyUKFzOwDm48wIAh5XH+g7drOwAAAAASUVORK5CYII=") no-repeat scroll center left; color: #393; padding: 0 0 0 16px; text-decoration: none; font-size: 80%; } dd.seeAlso a[rel="seeAlso"] { font-size: 100%; }����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������example1.pl�����������������������������������������������������������������������������������������000644��001750��001750�� 1420�13217160350� 20522� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.106/examples��������������������������������������������������������������������������������������������������������������������������������������use lib "lib"; use RDF::RDFa::Generator; use RDF::TrineShortcuts; my $graph = rdf_parse(<<TURTLE, type=>'turtle'); \@prefix foaf: <http://xmlns.com/foaf/0.1/> . \@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . <http://example.net/> a foaf:Document ; <http://www.w3.org/1999/xhtml/vocab#next> <http://example.net/page2> ; <http://www.w3.org/1999/xhtml/vocab#title> "About Joe"@en ; foaf:primaryTopic [ a foaf:Person ; foaf:name "Joe Bloggs" ; foaf:plan "To conquer the world!"\@en ] ; foaf:utf8 "fæces" ; foaf:segment "Hello <b xmlns='http://www.w3.org/1999/xhtml'>World</b>"^^rdf:XMLLiteral . TURTLE my @nodes = RDF::RDFa::Generator->new(style=>'HTML::Head')->nodes($graph,id_prefix=>'id-',interlink=>'see also'); print $_->toString foreach @nodes; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������01basic.t�������������������������������������������������������������������������������������������000644��001750��001750�� 106�13217160350� 16465� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.106/t���������������������������������������������������������������������������������������������������������������������������������������������use Test::More tests => 1; BEGIN { use_ok('RDF::RDFa::Generator') }; ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������02_kk_namespaces.t����������������������������������������������������������������������������������000644��001750��001750�� 1355�13217160350� 20377� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.106/t���������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/perl # tests from KjetilK use strict; use Test::More; use RDF::Trine::Model; my $model = RDF::Trine::Model->temporary_model; use RDF::Trine::Parser; my $parser = RDF::Trine::Parser->new( 'turtle' ); $parser->parse_into_model( 'http://example.org/', '</foo> a </Bar> .', $model ); use RDF::RDFa::Generator; { ok(my $document = RDF::RDFa::Generator->new->create_document($model), 'Assignment OK'); isa_ok($document, 'XML::LibXML::Document'); my $string = $document->toString; unlike($string, qr|xmlns:http://www.w3.org/1999/02/22-rdf-syntax-ns#="rdf"|, 'RDF namespace shouldnt be reversed'); like($string, qr|xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"|, 'Correct RDF namespace declaration'); } done_testing();�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������uninit_lang_warning.t�������������������������������������������������������������������������������000644��001750��001750�� 1411�13217160350� 21317� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.106/t���������������������������������������������������������������������������������������������������������������������������������������������use strict; use warnings; use Test::More; use Test::Output; use RDF::Trine qw(blank iri literal); use RDF::RDFa::Generator; my $t = RDF::Trine::Statement::Quad->new( blank('x'), iri('http://example.org/p'), literal(3), iri('http://example.org/graph1'), ); my $model = RDF::Trine::Model->new(); $model->add_statement($t); my $pretty = RDF::RDFa::Generator::HTML::Pretty->new(); stderr_unlike sub { print $pretty->create_document($model); }, qr/Use of uninitialized value in subroutine entry/, 'pretty - no uninitalized value warning ok'; my $head = RDF::RDFa::Generator::HTML::Head->new(); stderr_unlike sub { print $head->create_document($model); }, qr/Use of uninitialized value in subroutine entry/, 'head - no uninitalized value warning ok'; done_testing(); �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Generator.pm����������������������������������������������������������������������������������������000644��001750��001750�� 13467�13217160350� 21112� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.106/lib/RDF/RDFa����������������������������������������������������������������������������������������������������������������������������������=head1 NAME RDF::RDFa::Generator - Generate data for RDFa serialization =cut package RDF::RDFa::Generator; use 5.008; use strict; our $VERSION = '0.106'; use RDF::RDFa::Generator::HTML::Head; use RDF::RDFa::Generator::HTML::Hidden; use RDF::RDFa::Generator::HTML::Pretty; use RDF::Trine; BEGIN { $RDF::Trine::Serializer::serializer_names{ 'rdfa' } = __PACKAGE__; foreach my $type (qw(application/xhtml+xml text/html)) { $RDF::Trine::Serializer::media_types{ $type } = __PACKAGE__; } } =head1 DESCRIPTION =head2 Constructor =over 4 =item C<< $gen = RDF::RDFa::Generator->new(style => $style, %options) >> Creates a new generator object. $style is one of the following case-sensitive strings: 'HTML::Head' (the default), 'HTML::Hidden' or 'HTML::Pretty'. You can also construct an object like this: $gen = RDF::RDFa::Generator::HTML::Head->new(%options); Options include: =over 4 =item * B<base> - the base URL where the output data will be published. This allows in some cases for the generated RDFa to include relative URIs. =item * B<data_context> - if non-null, a URI (string) which indicates the context (named graph) containing the data to generate RDFa for. =item * B<namespaces> - a {prefix=>uri} hashref of preferred CURIE prefixes. =item * B<ns> - a {uri=>prefix} hashref of preferred CURIE prefixes. DEPRECATED - use B<namespaces> instead. =item * B<prefix_attr> - use the @prefix attribute for CURIE prefixes (RDFa 1.1 only). Boolean, defaults to false. =item * B<safe_xml_literals> - prevents XML literals from injecting arbitrary XHTML into the output. Boolean, B<defaults to FALSE>. =item * B<title> - assign a <title> element for generated XHTML documents. =item * B<version> - set generated RDFa version. Valid values are '1.0' (the default) or '1.1'. =back =back =cut sub new { my ($class, %opts) = @_; my $implementation = sprintf('%s::%s', __PACKAGE__, $opts{'style'} || 'HTML::Head'); return $implementation->new(%opts); } =head2 Public Methods =over 4 =item C<< $gen->create_document($model) >> Creates a new RDFa file containing triples. $model is an RDF::Trine::Model object providing the triples. Returns an XML::LibXML::Document object suitable for serialising using its C<toString> method. If you're planning on serving the RDFa with the text/html media type, then it is recommended that you use HTML::HTML5::Writer to serialise the document rather than C<toString>. Can also be called as a class method: $document = RDF::RDFa::Generator->create_document($model) # Same as: # $document = RDF::RDFa::Generator->new->create_document($model) =cut sub create_document { my $proto = shift; my $self = (ref $proto) ? $proto : $proto->new; return $self->create_document(@_); } =item C<< $gen->inject_document($document, $model) >> 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 C<toString> method. See C<create_document> for information about serving the RDFa with the text/html media type. Can also be called as a class method. See C<create_document> for details. =cut sub inject_document { my $proto = shift; my $self = (ref $proto) ? $proto : $proto->new; return $self->inject_document(@_); } =item C<< $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 C<create_document> for details. The HTML::Pretty generator can be passed a couple of additional options: $gen->nodes($model, notes_heading=>'Additional Info', notes=>\@notes); 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. =cut sub nodes { my $proto = shift; my $self = (ref $proto) ? $proto : $proto->new; return $self->nodes(@_); } =back Additionally the methods C<serialize_model_to_file>, C<serialize_model_to_string>, C<serialize_iterator_to_file> and C<serialize_iterator_to_string> are provided for compatibility with the L<RDF::Trine::Serializer> interface. =cut sub serialize_model_to_string { my ($proto, $model) = @_; return $proto->create_document($model)->toString; } sub serialize_model_to_file { my ($proto, $fh, $model) = @_; print {$fh} $proto->create_document($model)->toString; } sub serialize_iterator_to_string { my ($proto, $iter) = @_; my $model = RDF::Trine::Model->temporary_model; while (my $st = $iter->next) { $model->add_statement($st); } return $proto->serialize_model_to_string($model); } sub serialize_iterator_to_file { my ($proto, $fh, $iter) = @_; my $model = RDF::Trine::Model->temporary_model; while (my $st = $iter->next) { $model->add_statement($st); } return $proto->serialize_model_to_file($fh, $model); } 1; __END__ =head1 BUGS Please report any bugs to L<https://github.com/kjetilk/p5-rdf-rdfa-generator/issues>. =head1 SEE ALSO L<HTML::HTML5::Writer>, L<XML::LibXML>, L<RDF::RDFa::Parser>, L<RDF::Trine>, L<RDF::Prefixes>. L<http://www.perlrdf.org/>. =head1 AUTHOR Toby Inkster E<lt>tobyink@cpan.orgE<gt>. Kjetil Kjernsmo E<lt>kjetilk@cpan.orgE<gt>. =head1 COPYRIGHT AND LICENCE Copyright (C) 2010 by Toby Inkster, 2017 Kjetil Kjernsmo 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. =head2 Icons RDF::RDFa::Generator::HTML::Pretty uses the FamFamFam Silk icons; see L<http://famfamfam.com/lab/icons/silk/>. =cut ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Head.pm���������������������������������������������������������������������������������������������000644��001750��001750�� 15061�13217160350� 22507� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.106/lib/RDF/RDFa/Generator/HTML�������������������������������������������������������������������������������������������������������������������package RDF::RDFa::Generator::HTML::Head; use 5.008; use base qw'RDF::RDFa::Generator'; use strict; use Encode qw'encode_utf8'; use RDF::Prefixes; use XML::LibXML qw':all'; our $VERSION = '0.106'; sub new { my ($class, %opts) = @_; if (!defined $opts{namespaces}) { $opts{namespaces} = {}; while (<DATA>) { chomp; my ($p, $u) = split /\s+/; $opts{namespaces}->{$p} ||= $u; } } # handle deprecated {ns}. while (my ($u,$p) = each %{ $opts{ns} }) { $opts{namespaces}->{$p} ||= $u; } delete $opts{ns}; bless \%opts, $class; } sub injection_site { return '//xhtml:head'; } sub inject_document { my ($proto, $html, $model, %opts) = @_; my $dom = $proto->_get_dom($html); my @nodes = $proto->nodes($model, %opts); my $xc = XML::LibXML::XPathContext->new($dom); $xc->registerNs('xhtml', 'http://www.w3.org/1999/xhtml'); my @sites = $xc->findnodes($proto->injection_site); die "No suitable place to inject this document." unless @sites; $sites[0]->appendChild($_) foreach @nodes; return $dom; } sub create_document { my ($proto, $model, %opts) = @_; my $self = (ref $proto) ? $proto : $proto->new; my $html = sprintf(<<HTML, ($self->{'version'}||'1.0'), ($self->{'title'} || 'RDFa Document'), ref $self); <html xmlns="http://www.w3.org/1999/xhtml" version="XHTML+RDFa %1\$s"> <head profile="http://www.w3.org/1999/xhtml/vocab"> <title>%2\$s HTML return $proto->inject_document($html, $model, %opts); } sub _get_dom { my ($proto, $html) = @_; return $html if UNIVERSAL::isa($html, 'XML::LibXML::Document'); my $p = XML::LibXML->new; return $p->parse_string($html); } sub nodes { my ($proto, $model) = @_; my $self = (ref $proto) ? $proto : $proto->new; my $stream = $self->_get_stream($model); my @nodes; while (my $st = $stream->next) { my $node = $st->object->is_literal ? XML::LibXML::Element->new('meta') : XML::LibXML::Element->new('link'); $node->setNamespace('http://www.w3.org/1999/xhtml', undef, 1); my $prefixes = RDF::Prefixes->new($self->{namespaces}); $self->_process_subject($st, $node, $prefixes) ->_process_predicate($st, $node, $prefixes) ->_process_object($st, $node, $prefixes); use Data::Dumper; Dumper($prefixes); if ($self->{'version'} == 1.1 and $self->{'prefix_attr'}) { $node->setAttribute('prefix', $prefixes->rdfa) if %$prefixes; } else { while (my ($u,$p) = each(%$prefixes)) { $node->setNamespace($p, $u, 0); } } push @nodes, $node; } return @nodes if wantarray; my $nodelist = XML::LibXML::NodeList->new; $nodelist->push(@nodes); return $nodelist; } sub _get_stream { my ($self, $model) = @_; my $data_context = undef; if (defined $self->{'data_context'}) { $data_context = ( $self->{'data_context'} =~ /^_:(.*)$/ ) ? RDF::Trine::Node::Blank->new($1) : RDF::Trine::Node::Resource->new($self->{'data_context'}); } return $model->get_statements(undef, undef, undef, $data_context); } sub _process_subject { my ($self, $st, $node, $prefixes) = @_; if (defined $self->{'base'} and $st->subject->is_resource and $st->subject->uri eq $self->{'base'}) { return $self; } if ($st->subject->is_resource) { $node->setAttribute('about', $st->subject->uri); } else { $node->setAttribute('about', '[_:'.$st->subject->blank_identifier.']'); } return $self; } sub _process_predicate { my ($self, $st, $node, $prefixes) = @_; my $attr = $st->object->is_literal ? 'property' : 'rel'; if ($attr eq 'rel' and $st->predicate->uri =~ m'^http://www\.w3\.org/1999/xhtml/vocab\# (alternate|appendix|bookmark|cite| chapter|contents|copyright|first|glossary|help|icon| index|last|license|meta|next|p3pv1|prev|role|section| stylesheet|subsection|start|top|up)$'x) { $node->setAttribute($attr, $1); return $self; } elsif ($attr eq 'rel' and $st->predicate->uri =~ m'^http://www\.w3\.org/1999/xhtml/vocab#(.*)$') { $node->setAttribute($attr, ':'.$1); return $self; } elsif ($self->{'version'} == 1.1) { $node->setAttribute($attr, $st->predicate->uri); return $self; } $node->setAttribute($attr, $self->_make_curie($st->predicate->uri, $prefixes)); return $self; } sub _process_object { my ($self, $st, $node, $prefixes) = @_; if (defined $self->{'base'} and $st->subject->is_resource and $st->subject->uri eq $self->{'base'} and $st->object->is_resource) { $node->setAttribute('href', $st->object->uri); return $self; } elsif (defined $self->{'base'} and $st->object->is_resource and $st->object->uri eq $self->{'base'}) { $node->setAttribute('resource', ''); return $self; } elsif ($st->object->is_resource) { $node->setAttribute('resource', $st->object->uri); return $self; } elsif ($st->object->is_blank) { $node->setAttribute('resource', '[_:'.$st->object->blank_identifier.']'); return $self; } $node->setAttribute('content', encode_utf8($st->object->literal_value)); if (defined $st->object->literal_datatype) { $node->setAttribute('datatype', $self->_make_curie($st->object->literal_datatype, $prefixes)); } else { $node->setAttribute('xml:lang', ''.$st->object->literal_value_language); } return $self; } sub _make_curie { my ($self, $uri, $prefixes) = @_; use Data::Dumper; Dumper($prefixes); # this shouldn't do anything, but it fixes a bug!! return $prefixes->get_qname($uri); } 1; __DATA__ bibo http://purl.org/ontology/bibo/ cc http://creativecommons.org/ns# ctag http://commontag.org/ns# dbp http://dbpedia.org/property/ dc http://purl.org/dc/terms/ doap http://usefulinc.com/ns/doap# fb http://developers.facebook.com/schema/ foaf http://xmlns.com/foaf/0.1/ geo http://www.w3.org/2003/01/geo/wgs84_pos# gr http://purl.org/goodrelations/v1# ical http://www.w3.org/2002/12/cal/ical# og http://opengraphprotocol.org/schema/ owl http://www.w3.org/2002/07/owl# rdf http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfa http://www.w3.org/ns/rdfa# rdfs http://www.w3.org/2000/01/rdf-schema# rel http://purl.org/vocab/relationship/ rev http://purl.org/stuff/rev# rss http://purl.org/rss/1.0/ sioc http://rdfs.org/sioc/ns# skos http://www.w3.org/2004/02/skos/core# tag http://www.holygoat.co.uk/owl/redwood/0.1/tags/ v http://rdf.data-vocabulary.org/# vann http://purl.org/vocab/vann/ vcard http://www.w3.org/2006/vcard/ns# void http://rdfs.org/ns/void# xfn http://vocab.sindice.com/xfn# xhv http://www.w3.org/1999/xhtml/vocab# xsd http://www.w3.org/2001/XMLSchema# Hidden.pm000644001750001750 400213217160350 23012 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.106/lib/RDF/RDFa/Generator/HTMLpackage RDF::RDFa::Generator::HTML::Hidden; use 5.008; use base qw'RDF::RDFa::Generator::HTML::Head'; use strict; use RDF::Prefixes; use XML::LibXML qw':all'; our $VERSION = '0.106'; sub injection_site { return '//xhtml:body'; } sub nodes { my ($proto, $model) = @_; my $self = (ref $proto) ? $proto : $proto->new; my $stream = $self->_get_stream($model); my @nodes; my $rootnode = XML::LibXML::Element->new('i'); $rootnode->setNamespace('http://www.w3.org/1999/xhtml', undef, 1); $rootnode->setAttribute('style','display:none'); my $prefixes = RDF::Prefixes->new($self->{namespaces}); my $subjects = {}; while (my $st = $stream->next) { my $s = $st->subject->is_resource ? $st->subject->uri : ('_:'.$st->subject->blank_identifier); push @{ $subjects->{$s} }, $st; } foreach my $s (keys %$subjects) { my $node = $rootnode->addNewChild('http://www.w3.org/1999/xhtml', 'i'); $self->_process_subject($subjects->{$s}->[0], $node, $prefixes); foreach my $st (@{ $subjects->{$s} }) { my $node2 = $node->addNewChild('http://www.w3.org/1999/xhtml', 'i'); $self->_process_predicate($st, $node2, $prefixes) ->_process_object($st, $node2, $prefixes); } } use Data::Dumper; Dumper($prefixes); if ($self->{'version'} == 1.1 and $self->{'prefix_attr'}) { $rootnode->setAttribute('prefix', $prefixes->rdfa) if %$prefixes; } else { while (my ($u,$p) = each(%$prefixes)) { $rootnode->setNamespace($p, $u, 0); } } push @nodes, $rootnode; return @nodes if wantarray; my $nodelist = XML::LibXML::NodeList->new; $nodelist->push(@nodes); return $nodelist; } sub _process_subject { my ($self, $st, $node, $prefixes) = @_; if (defined $self->{'base'} and $st->subject->is_resource and $st->subject->uri eq $self->{'base'}) { $node->setAttribute('about', ''); } elsif ($st->subject->is_resource) { $node->setAttribute('about', $st->subject->uri); } else { $node->setAttribute('about', '[_:'.$st->subject->blank_identifier.']'); } return $self; } 1; Pretty.pm000644001750001750 4007213217160350 23135 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.106/lib/RDF/RDFa/Generator/HTMLpackage RDF::RDFa::Generator::HTML::Pretty; use 5.008; use base qw'RDF::RDFa::Generator::HTML::Hidden'; use strict; use constant XHTML_NS => 'http://www.w3.org/1999/xhtml'; use Encode qw'encode_utf8'; use Icon::FamFamFam::Silk; use RDF::RDFa::Generator::HTML::Pretty::Note; use XML::LibXML qw':all'; our $VERSION = '0.106'; sub create_document { my ($proto, $model, %opts) = @_; my $self = (ref $proto) ? $proto : $proto->new; my $html = sprintf(<{'version'}||'1.0'), ($self->{'title'} || 'RDFa Document'), ref $self); %2\$s

%2\$s

Generated by %3\$s.

HTML return $proto->inject_document($html, $model, %opts); } sub nodes { my ($proto, $model, %opts) = @_; my $self = (ref $proto) ? $proto : $proto->new; my $stream = $self->_get_stream($model); my @nodes; my $root_node = XML::LibXML::Element->new('div'); $root_node->setNamespace(XHTML_NS, undef, 1); my $prefixes = RDF::Prefixes->new($self->{namespaces}); my $subjects = {}; while (my $st = $stream->next) { next if $st->subject->is_literal; # ??? my $s = $st->subject->is_resource ? $st->subject->uri : ('_:'.$st->subject->blank_identifier); push @{ $subjects->{$s} }, $st; } foreach my $s (sort keys %$subjects) { my $subject_node = $root_node->addNewChild(XHTML_NS, 'div'); my $id = _make_id($s, $opts{'id_prefix'}); $subject_node->setAttribute('id', $id) if defined $id; $self->_process_subject($subjects->{$s}->[0], $subject_node, $prefixes); $self->_resource_heading($subjects->{$s}->[0]->subject, $subject_node, $subjects->{$s}, $prefixes); $self->_resource_classes($subjects->{$s}->[0]->subject, $subject_node, $subjects->{$s}, $prefixes); $self->_resource_statements($subjects->{$s}->[0]->subject, $subject_node, $subjects->{$s}, $prefixes, $opts{'interlink'}||0, $opts{'id_prefix'}, $model); $self->_resource_notes($subjects->{$s}->[0]->subject, $subject_node, $model, $opts{'notes_heading'}||'Notes', $opts{'notes'}) if defined $opts{'notes'}; } use Data::Dumper; Dumper($prefixes); if ($self->{'version'} == 1.1 and $self->{'prefix_attr'}) { $root_node->setAttribute('prefix', $prefixes->rdfa) if %$prefixes; } else { while (my ($p,$u) = each(%{$prefixes->to_hashref})) { $root_node->setNamespace($u, $p, 0); } } push @nodes, $root_node; return @nodes if wantarray; my $nodelist = XML::LibXML::NodeList->new; $nodelist->push(@nodes); return $nodelist; } sub _make_id { my ($ident, $prefix) = @_; if ($prefix =~ /^[A-Za-z][A-Za-z0-9\_\:\.\-]*$/) { $ident =~ s/([^A-Za-z0-9\_\:\.])/sprintf('-%x-',ord($1))/ge; return $prefix . $ident; } return undef; } sub _resource_heading { my ($self, $subject, $node, $statements, $prefixes) = @_; my $heading = $node->addNewChild(XHTML_NS, 'h3'); $heading->appendTextNode( $subject->is_resource ? $subject->uri : ('_:'.$subject->blank_identifier) ); $heading->setAttribute('class', $subject->is_resource ? 'resource' : 'blank' ); return $self; } sub _resource_classes { my ($self, $subject, $node, $statements, $prefixes) = @_; my @statements = sort { $a->predicate->uri cmp $b->predicate->uri or $a->object->uri cmp $b->object->uri } grep { $_->predicate->uri eq 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type' and $_->object->is_resource } @$statements; return unless @statements; my $SPAN = $node->addNewChild(XHTML_NS, 'span'); $SPAN->setAttribute('class', 'rdf-type'); $SPAN->setAttribute('rel', $self->_make_curie('http://www.w3.org/1999/02/22-rdf-syntax-ns#type', $prefixes)); foreach my $st (@statements) { my $IMG = $SPAN->addNewChild(XHTML_NS, 'img'); $IMG->setAttribute('about', $st->object->uri); $IMG->setAttribute('alt', $st->object->uri); $IMG->setAttribute('src', $self->_img($st->object->uri)); $IMG->setAttribute('title', $st->object->uri); } return $self; } sub _resource_statements { my ($self, $subject, $node, $statements, $prefixes, $interlink, $id_prefix, $model) = @_; my @statements = sort { $a->predicate->uri cmp $b->predicate->uri or $a->object->as_ntriples cmp $b->object->as_ntriples } grep { $_->predicate->uri ne 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type' or !$_->object->is_resource } @$statements; return unless @statements; my $DL = $node->addNewChild(XHTML_NS, 'dl'); my $current_property = undef; foreach my $st (@statements) { unless ($st->predicate->uri eq $current_property) { my $DT = $DL->addNewChild(XHTML_NS, 'dt'); $DT->setAttribute('title', $st->predicate->uri); $DT->appendTextNode($self->_make_curie($st->predicate->uri, $prefixes)); } $current_property = $st->predicate->uri; my $DD = $DL->addNewChild(XHTML_NS, 'dd'); if ($st->object->is_resource && $st->object->uri =~ /^javascript:/i) { $DD->setAttribute('class', 'resource'); my $A = $DD->addNewChild(XHTML_NS, 'span'); $A->setAttribute('rel', $self->_make_curie($st->predicate->uri, $prefixes)); $A->setAttribute('resource', $st->object->uri); $A->appendTextNode($st->object->uri); } elsif ($st->object->is_resource) { $DD->setAttribute('class', 'resource'); my $A = $DD->addNewChild(XHTML_NS, 'a'); $A->setAttribute('rel', $self->_make_curie($st->predicate->uri, $prefixes)); $A->setAttribute('href', $st->object->uri); $A->appendTextNode($st->object->uri); } elsif ($st->object->is_blank) { $DD->setAttribute('class', 'blank'); my $A = $DD->addNewChild(XHTML_NS, 'span'); $A->setAttribute('rel', $self->_make_curie($st->predicate->uri, $prefixes)); $A->setAttribute('resource', '[_:'.$st->object->blank_identifier.']'); $A->appendTextNode('_:'.$st->object->blank_identifier); } elsif ($st->object->is_literal && !$st->object->has_datatype) { $DD->setAttribute('property', $self->_make_curie($st->predicate->uri, $prefixes)); $DD->setAttribute('class', 'plain-literal'); $DD->setAttribute('xml:lang', ''.$st->object->literal_value_language); $DD->appendTextNode(encode_utf8($st->object->literal_value)); } elsif ($self->{'safe_xml_literals'} && $st->object->is_literal && $st->object->has_datatype && $st->object->literal_datatype eq 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral') { $DD->setAttribute('property', $self->_make_curie($st->predicate->uri, $prefixes)); $DD->setAttribute('class', 'typed-literal datatype-xmlliteral'); $DD->setAttribute('datatype', $self->_make_curie($st->object->literal_datatype, $prefixes)); $DD->setAttribute('content', encode_utf8($st->object->literal_value)); $DD->addNewChild(XHTML_NS, 'pre')->addNewChild(XHTML_NS, 'code')->appendTextNode(encode_utf8($st->object->literal_value)); } elsif ($st->object->is_literal && $st->object->has_datatype && $st->object->literal_datatype eq 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral') { $DD->setAttribute('property', $self->_make_curie($st->predicate->uri, $prefixes)); $DD->setAttribute('class', 'typed-literal datatype-xmlliteral'); $DD->setAttribute('datatype', $self->_make_curie($st->object->literal_datatype, $prefixes)); $DD->appendWellBalancedChunk(encode_utf8($st->object->literal_value)); } elsif ($st->object->is_literal && $st->object->has_datatype) { $DD->setAttribute('property', $self->_make_curie($st->predicate->uri, $prefixes)); $DD->setAttribute('class', 'typed-literal'); $DD->setAttribute('datatype', $self->_make_curie($st->object->literal_datatype, $prefixes)); $DD->appendTextNode(encode_utf8($st->object->literal_value)); } if ($interlink && !$st->object->is_literal) { if ($model->count_statements($st->object, undef, undef)) { $DD->appendTextNode(' '); my $seealso = $DD->addNewChild(XHTML_NS, 'a'); $seealso->setAttribute('about', $st->object->is_resource ? $st->object->uri : '[_:'.$st->object->blank_identifier.']'); $seealso->setAttribute('rel', 'seeAlso'); $seealso->setAttribute('href', '#'._make_id($st->object->is_resource ? $st->object->uri : '_:'.$st->object->blank_identifier, $id_prefix)); $seealso->appendTextNode($interlink); } } } if ($interlink) { my $iter = $model->get_statements(undef, undef, $subject); if ($iter->peek) { my $seealsoDT = $DL->addNewChild(XHTML_NS, 'dt'); $seealsoDT->setAttribute('class', 'seeAlso'); $seealsoDT->appendTextNode($interlink); my $sadata = {}; while (my $sast = $iter->next) { my $sas = $sast->subject->is_resource ? $sast->subject->uri : '_:'.$sast->subject->blank_identifier; my $p = $self->_make_curie($sast->predicate->uri, $prefixes); $sadata->{$sas}->{$p} = $sast->predicate->uri; } my $seealso = $DL->addNewChild(XHTML_NS, 'dd'); $seealso->setAttribute('class', 'seeAlso'); my @keys = sort keys %$sadata; foreach my $sas (@keys) { my $span = $seealso->addNewChild(XHTML_NS, 'span'); $span->appendTextNode('is '); my @pkeys = sort keys %{$sadata->{$sas}}; foreach my $curie (@pkeys) { my $i = $span->addNewChild(XHTML_NS, 'i'); $i->appendTextNode($curie); $i->setAttribute(title => $sadata->{$sas}->{$curie}); $span->appendTextNode( $curie eq $pkeys[-1] ? '' : ', ' ); } $span->appendTextNode(' of '); my $a = $span->addNewChild(XHTML_NS, 'a'); $a->setAttribute('about', $sas !~ /^_:/ ? $sas : '[_:'.$sas.']'); $a->setAttribute('rel', 'seeAlso'); $a->setAttribute('href', '#'._make_id($sas, $id_prefix)); $a->appendTextNode($sas); $seealso->appendTextNode( $sas eq $keys[-1] ? '.' : '; ' ); } } } return $self; } sub _resource_notes { my ($self, $subject, $node, $model, $notes_heading, $notes) = @_; my @relevant; foreach my $note (@$notes) { push @relevant, $note if $note->is_relevant_to($subject); } if (@relevant) { my $heading = $node->addNewChild(XHTML_NS, 'h4'); $heading->appendTextNode($notes_heading || 'Notes'); my $list = $node->addNewChild(XHTML_NS, 'ul'); foreach my $note (@relevant) { $list->appendChild( $note->node(XHTML_NS, 'li') ); } } return $self; } sub _img { my ($self, $type) = @_; if ($type eq 'urn:x-rdf-rdfa-linter:internals:OpenGraphProtocolNode') { return 'data:image/png;charset=binary;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oFEBYGBzcdoOEAAALhSURBVCjPJdLfb4trHADw7/d53nbr2661X9ZV29mE/VLMYplwchwnmCziR7iSEHbpQnAj7lxJJBIhJELcSBAh50iErAcJ2wnLRrJstQXdL7Sbtmpv173P3vd9nq8Ln7/hg3/t6BJCAEB9Q/2Na1d8Xt1YmsuaSVsKn7u6Sl/lZjoAIiIAEJG2aJpSyi2dnceOH87I4UfD12fyw7aJ0mIu3fHqZbHa7s4VxwLuECJDRA0Bund3vXz1cmWCjMyzz33uz31e4zsCANcg2Kimtz8Ya32xv+VC1N/BkPM//tzW03MEArN3b/1X6vJ8G+VKYmWUwjEyC8A0TPa7hVjMlsUbKjf7S2r4m//7YVl6sHB56q1uzGJkPYkC1HdQrEulxrAiAkgwMaC5y5ac6kRrdbfm83kfj9yYGtK4BvUdKhFnjENmEhbnubQwEcdwTK3rVh96S0KxkanIG61o56fyQzNDnrU7VfPf0jQwO4luDy1kcVmI5mehba8Mr6Ovw2wuoY83xrW8mHEslf+KP9P4/l+emUQ9QBURUJJsAVzDj694bpqQQW6GZcykJpUgQMeC+TQgQ2GAcjA1BqBAOuDYkE+hJcAyQdoglaWVuYPIHV8l1bVTzRo18pRbJoRalFVEZJCbxtadMhyj3kuat1L5Sqo1f0ltuR6qaTRSH7C2BQpZNGbBsTgiWSYW81j8gQs5MjK44YAT9W9iHF0bQwcbti6kEqzvJrcFlAagrl1tOSq95RQI0qd+9uKqFmpWVVG+KXyIAWBb8FBT0+rYHpGbZv7l5KugQgYKGSzmMdhITduULUDSUlfzmYf34khERJQujj4YPTk+mB154jHm0OUh7oKlAgKDtr2yPCpe34YTPacGBt4hEf1umBMTzycvJr68zk2UZpPMsdBbTsEWq2pF6a7m02ay7uy587Zto1Lqd10AcJSVLo6OZ3u/L35ylPC5qiL+9rbQvn8ePr9z9346lXKk/AUjmnS/afx+BwAAAABJRU5ErkJggg=='; } my $icons = { 'http://bblfish.net/work/atom-owl/2006-06-06/#Entry' => 'page_white_link', 'http://bblfish.net/work/atom-owl/2006-06-06/#Feed' => 'feed', 'http://commontag.org/ns#AuthorTag' => 'tag_green', 'http://commontag.org/ns#AutoTag' => 'tag_red', 'http://commontag.org/ns#ReaderTag' => 'tag_yellow', 'http://commontag.org/ns#Tag' => 'tag_blue', 'http://ontologi.es/doap-bugs#Bug' => 'bug', 'http://purl.org/goodrelations/v1#PriceSpecification' => 'money', 'http://purl.org/NET/book/vocab#Book' => 'book', 'http://purl.org/NET/c4dm/event.owl#Event' => 'date', 'http://purl.org/ontology/bibo/Book' => 'book', 'http://purl.org/rss/1.0/channel' => 'feed', 'http://purl.org/rss/1.0/item' => 'page_white_link' , 'http://purl.org/stuff/rev#Review' => 'award_star_gold_1', 'http://rdf.data-vocabulary.org/#Organization' => 'chart_organisation', 'http://rdf.data-vocabulary.org/#Person' => 'user', 'http://rdf.data-vocabulary.org/#Review-aggregate' => 'award_star_add', 'http://rdf.data-vocabulary.org/#Review' => 'award_star_gold_1', 'http://schema.org/Person' => 'user_orange', 'http://schema.org/Event' => 'date', 'http://schema.org/FinancialService' => 'money', 'http://schema.org/TennisComplex' => 'sport_tennis', 'http://schema.org/Bakery' => 'cake', 'http://schema.org/Map' => 'world', 'http://schema.org/GolfClub' => 'sport_golf', 'http://schema.org/CafeOrCoffeeShop' => 'cup', 'http://schema.org/ProfilePage' => 'page_green', 'http://usefulinc.com/ns/doap#Project' => 'application_double', 'http://usefulinc.com/ns/doap#Version' => 'application_lightning', 'http://www.holygoat.co.uk/owl/redwood/0.1/tags/Tagging' => 'tag_blue_add', 'http://www.holygoat.co.uk/owl/redwood/0.1/tags/Tag' => 'tag_blue', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#Property' => 'arrow_right', 'http://www.w3.org/2000/01/rdf-schema#Class' => 'cog', 'http://www.w3.org/2002/12/cal/ical#Vcalendar' => 'calendar', 'http://www.w3.org/2002/12/cal/ical#Vevent' => 'date', 'http://www.w3.org/2002/07/owl#AnnotationProperty' => 'arrow_right', 'http://www.w3.org/2002/07/owl#AsymmetricProperty' => 'arrow_right', 'http://www.w3.org/2002/07/owl#Class' => 'cog', 'http://www.w3.org/2002/07/owl#DatatypeProperty' => 'arrow_right', 'http://www.w3.org/2002/07/owl#DeprecatedProperty' => 'arrow_right', 'http://www.w3.org/2002/07/owl#FunctionalProperty' => 'arrow_right', 'http://www.w3.org/2002/07/owl#InverseFunctionalProperty' => 'arrow_right', 'http://www.w3.org/2002/07/owl#IrreflexiveProperty' => 'arrow_right', 'http://www.w3.org/2002/07/owl#ObjectProperty' => 'arrow_right', 'http://www.w3.org/2002/07/owl#OntologyProperty' => 'arrow_right', 'http://www.w3.org/2002/07/owl#ReflexiveProperty' => 'arrow_right', 'http://www.w3.org/2002/07/owl#SymmetricProperty' => 'arrow_right', 'http://www.w3.org/2002/07/owl#TransitiveProperty' => 'arrow_right', 'http://www.w3.org/2003/01/geo/wgs84_pos#Point' => 'world', 'http://www.w3.org/2003/01/geo/wgs84_pos#SpatialThing' => 'world', 'http://www.w3.org/2004/02/skos/core#Concept' => 'brick', 'http://www.w3.org/2004/02/skos/core#ConceptScheme' => 'bricks', 'http://www.w3.org/2006/vcard/ns#Address' => 'house', 'http://www.w3.org/2006/vcard/ns#Location' => 'world', 'http://www.w3.org/2006/vcard/ns#Vcard' => 'vcard', 'http://www.w3.org/ns/auth/rsa#RSAPublicKey' => 'key', 'http://xmlns.com/foaf/0.1/Agent' => 'user_gray', 'http://xmlns.com/foaf/0.1/Document' => 'page_white_text', 'http://xmlns.com/foaf/0.1/Group' => 'group', 'http://xmlns.com/foaf/0.1/Image' => 'image', 'http://xmlns.com/foaf/0.1/OnlineAccount' => 'status_online', 'http://xmlns.com/foaf/0.1/Organization' => 'chart_organisation', 'http://xmlns.com/foaf/0.1/Person' => 'user_green', 'http://xmlns.com/foaf/0.1/PersonalProfileDocument' => 'page_green', }; return Icon::FamFamFam::Silk->new($icons->{$type}||'asterisk_yellow')->uri; } 1; Note.pm000644001750001750 430113217160350 24015 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.106/lib/RDF/RDFa/Generator/HTML/Pretty=head1 NAME RDF::RDFa::Generator::HTML::Pretty::Note - a note about something =cut package RDF::RDFa::Generator::HTML::Pretty::Note; use 5.008; use strict; use constant XHTML_NS => 'http://www.w3.org/1999/xhtml'; use XML::LibXML qw':all'; our $VERSION = '0.106'; =head1 DESCRIPTION Often you'll want to create your own subclass of this as the basic notes are pretty limited (plain text only). =head2 Constructor =over 4 =item C<< $note = RDF::RDFa::Generator::HTML::Pretty::Note->new($subject, $text) >> $subject is an RDF::Trine::Node (though probably not a Literal!) indicating the subject of the note. $text is the plain text content of the note. =back =cut sub new { my ($class, $subject, $text) = @_; return bless { 'subject' => $subject, 'text' => $text, }, $class; } =head2 Public Methods =over 4 =item C<< $note->is_relevent_to($node) >> $node is an RDF::Trine::Node. Checks if the subject of $note is $node. Alias: is_relelvant_to. =cut sub is_relevant_to { my ($self, $something) = @_; return $self->{'subject'}->equal($something); } *is_relevent_to = \&is_relevant_to; =item C<< $note->node($namespace, $tagname) >> Gets an XML::LibXML::Element representing the note. $namespace and $tagname are used to create the new element. If an unexpected namespace or tagname is supplied, may die. Expected namespace is 'http://www.w3.org/1999/xhtml'. Expected tagname is any XHTML tag that can contain text nodes. =back =cut sub node { my ($self, $namespace, $element) = @_; die "unknown namespace" unless $namespace eq XHTML_NS; my $node = XML::LibXML::Element->new($element); $node->setNamespace($namespace, undef, 1); $node->appendTextNode($self->{'text'}); return $node; } 1; __END__ =head1 BUGS Please report any bugs to L. =head1 SEE ALSO L, L. L. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 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. =cut