COPYRIGHT000644001750001750 320713240124305 16122 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.200Format: 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 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/03_kk_attean.t t/uninit_lang_warning.t Copyright: Copyright 2018 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: README README.pod lib/RDF/RDFa/Generator.pm Copyright: Copyright (C) 2010 by Toby Inkster, 2017, 2018 Kjetil Kjernsmo. License: GPL-1.0+ or Artistic-1.0 Files: COPYRIGHT CREDITS SIGNATURE Copyright: None License: public-domain 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: dist.ini Copyright: Copyright 2017 Kjetil Kjernsmo and 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) 2018 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) 2018 by the copyright holder(s). This is free software, licensed under: The GNU General Public License, Version 1, February 1989 CREDITS000644001750001750 21713240124304 15624 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.200Maintainer: - Kjetil Kjernsmo (KJETILK) - Toby Inkster (TOBYINK) Contributor: - ZORAN Changes000644001750001750 474013240124304 16124 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.200RDF-RDFa-Generator ================== Created: 2010-05-05 Home page: Bug tracker: Maintainer: Toby Inkster (TOBYINK) Maintainer: Kjetil Kjernsmo (KJETILK) 0.200 2018-02-11 Extensive changes to support both Attean and Trine. Backwards incompatible changes. - Added: Many more tests. - Added: Use RDF::NS::Curated for the canonical list of namespaces. - Added: Use the Attean API. - Improve CURIE generation. - Improve the HTML of Pretty a bit. - Many minor improvements. - Removed: Remove serialization of plain literals as they don't exist in RDF 1.1. - Removed: Stop using the Trine API. - Removed: Trine serialization methods are deprecated and will croak. - Use URI::NamespaceMap for managing prefixes, RDF::Prefixes can be used through it. - data_context takes an object as input. 0.192 2017-12-22 - Added: More tests. - Added: Support Attean. - Many minor improvements. 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 173313240124304 15661 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.200 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 4375113240124304 15663 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.200This software is copyright (c) 2018 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) 2018 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) 2018 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 71213240124305 15736 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.200COPYRIGHT 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/03_kk_attean.t t/uninit_lang_warning.t META.json000644001750001750 614213240124305 16251 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.200{ "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" } }, "develop" : { "recommends" : { "Dist::Inkt" : "0.001" } }, "runtime" : { "recommends" : { "Attean" : "0.019", "RDF::NS" : "0", "RDF::Prefixes" : "0" }, "requires" : { "Data::Dumper" : "0", "Icon::FamFamFam::Silk" : "0", "RDF::NS::Curated" : "0.100", "URI::NamespaceMap" : "1.06", "XML::LibXML" : "1.60", "perl" : "5.008" }, "suggests" : { "RDF::Trine" : "0.112" } }, "test" : { "requires" : { "Attean" : "0.019", "RDF::Prefixes" : "0", "Test::Modern" : "0", "Test::More" : "0.96", "Test::Output" : "0" } } }, "provides" : { "RDF::RDFa::Generator" : { "file" : "lib/RDF/RDFa/Generator.pm", "version" : "0.200" }, "RDF::RDFa::Generator::HTML::Head" : { "file" : "lib/RDF/RDFa/Generator/HTML/Head.pm", "version" : "0.200" }, "RDF::RDFa::Generator::HTML::Hidden" : { "file" : "lib/RDF/RDFa/Generator/HTML/Hidden.pm", "version" : "0.200" }, "RDF::RDFa::Generator::HTML::Pretty" : { "file" : "lib/RDF/RDFa/Generator/HTML/Pretty.pm", "version" : "0.200" }, "RDF::RDFa::Generator::HTML::Pretty::Note" : { "file" : "lib/RDF/RDFa/Generator/HTML/Pretty/Note.pm", "version" : "0.200" } }, "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.200", "x_contributors" : [ "ZORAN " ], "x_serialization_backend" : "JSON::PP version 2.27300_01", "x_static_install" : 1 } META.yml000644001750001750 360413240124305 16101 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.200--- abstract: 'Generate data for RDFa serialization' author: - 'Toby Inkster (TOBYINK) ' - 'Kjetil Kjernsmo (KJETILK) ' build_requires: Attean: '0.019' RDF::Prefixes: '0' Test::Modern: '0' 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.200' RDF::RDFa::Generator::HTML::Head: file: lib/RDF/RDFa/Generator/HTML/Head.pm version: '0.200' RDF::RDFa::Generator::HTML::Hidden: file: lib/RDF/RDFa/Generator/HTML/Hidden.pm version: '0.200' RDF::RDFa::Generator::HTML::Pretty: file: lib/RDF/RDFa/Generator/HTML/Pretty.pm version: '0.200' RDF::RDFa::Generator::HTML::Pretty::Note: file: lib/RDF/RDFa/Generator/HTML/Pretty/Note.pm version: '0.200' recommends: Attean: '0.019' RDF::NS: '0' RDF::Prefixes: '0' requires: Data::Dumper: '0' Icon::FamFamFam::Silk: '0' RDF::NS::Curated: '0.100' URI::NamespaceMap: '1.06' XML::LibXML: '1.60' perl: '5.008' 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.200' x_contributors: - 'ZORAN ' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' x_static_install: 1 Makefile.PL000644001750001750 1621713240124305 16626 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.200use 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 } }, develop => { recommends => { "Dist::Inkt" => 0.001 } }, runtime => { recommends => { "Attean" => 0.019, "RDF::NS" => 0, "RDF::Prefixes" => 0 }, requires => { "Data::Dumper" => 0, "Icon::FamFamFam::Silk" => 0, "perl" => 5.008, "RDF::NS::Curated" => "0.100", "URI::NamespaceMap" => 1.06, "XML::LibXML" => "1.60", }, suggests => { "RDF::Trine" => 0.112 }, }, test => { requires => { "Attean" => 0.019, "RDF::Prefixes" => 0, "Test::Modern" => 0, "Test::More" => 0.96, "Test::Output" => 0, }, }, }, "provides" => { "RDF::RDFa::Generator" => { file => "lib/RDF/RDFa/Generator.pm", version => "0.200" }, "RDF::RDFa::Generator::HTML::Head" => { file => "lib/RDF/RDFa/Generator/HTML/Head.pm", version => "0.200" }, "RDF::RDFa::Generator::HTML::Hidden" => { file => "lib/RDF/RDFa/Generator/HTML/Hidden.pm", version => "0.200" }, "RDF::RDFa::Generator::HTML::Pretty" => { file => "lib/RDF/RDFa/Generator/HTML/Pretty.pm", version => "0.200" }, "RDF::RDFa::Generator::HTML::Pretty::Note" => { file => "lib/RDF/RDFa/Generator/HTML/Pretty/Note.pm", version => "0.200", }, }, "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.200", "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 1526613240124304 15536 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.200NAME 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, an Attean Blank or IRI object or an RDF::Trine::Node which indicates the context (named graph) containing the data to generate RDFa for. * namespacemap - a URI::NamespaceMap object containing preferred CURIE prefixes. This is the preferred method, see note below. * 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, %opts)` 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 serializing 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 serialize 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) Options can also be passed as a HASH. This is typically used for style-specific options. `$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 serializing 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. UPGRADING TO 0.200 The recommended upgrade path is to migrate your application to use Attean rather than RDF::Trine as your RDF library. If that is not an option, you may continue to use RDF::Trine, by using a compatibility layer. If you are using this module directly, to upgrade from earlier releases, you would simply add use RDF::TrineX::Compatibility::Attean; alongside the import of this module. It is in a separate distribution that needs to be installed. If you use the RDF::Trine::Serializer methods, you should instead use RDF::Trine::Serializer::RDFa. NOTE Version 0.200 introduced a large number of changes to be compatible with both Attean and RDF::Trine. Some of these were backwards-incompatible, some were to support new features, such as the use of URI::NamespaceMap. Backwards-incompatible changes The methods `serialize_model_to_file`, `serialize_model_to_string`, `serialize_iterator_to_file` and `serialize_iterator_to_string` that were provided for compatibility with the RDF::Trine::Serializer interface have been moved to a module RDF::Trine::Serializer::RDFa that has to be installed separately to use this with RDF::Trine. `data_context` previously accepted a plain-text string URI. Now, it requires an appropriate object, as documented. Since RDF 1.1 abandons untyped literals, this module also ceases to emit them. Namespace mappings The way namespace mappings are handled have been rewritten. Now, the preferred method to add them is to pass an URI::NamespaceMap object to `namespacemap`. This will override any other options. The namespace mappings for the following prefixes will always be added: `rdfa`, `rdf`, `rdfs` and `xsd`. If URI::NamespaceMap is not used, but `namespaces` is given as a hashref of prefix-URI pairs, the pairs will be added. If neither are given, all mappings from RDF::NS::Curated, which includes all if RDFa Initial Context will be added. Finally, any pairs from the deprecated `ns` option will be added, but a warning will be emitted. BUGS Please report any bugs to <https://github.com/kjetilk/p5-rdf-rdfa-generator/issues>. SEE ALSO You may want to use the framework-specific frontends: RDF::Trine::Serializer::RDFa or AtteanX::Serializer::RDFa. Other relevant modules: HTML::HTML5::Writer, XML::LibXML, RDF::RDFa::Parser, RDF::Trine, URI::NamespaceMap, Attean. AUTHOR Toby Inkster <tobyink@cpan.org>. Kjetil Kjernsmo <kjetilk@cpan.org>. COPYRIGHT AND LICENCE Copyright (C) 2010 by Toby Inkster, 2017, 2018 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�� 17207�13240124304� 16314� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.200�����������������������������������������������������������������������������������������������������������������������������������������������=head1 NAME RDF::RDFa::Generator - Generate data for RDFa serialization =cut package RDF::RDFa::Generator; use 5.008; use strict; use warnings; our $VERSION = '0.200'; use RDF::RDFa::Generator::HTML::Head; use RDF::RDFa::Generator::HTML::Hidden; use RDF::RDFa::Generator::HTML::Pretty; use Carp; =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, an L<Attean> Blank or IRI object or an L<RDF::Trine::Node> which indicates the context (named graph) containing the data to generate RDFa for. =item * B<namespacemap> - a L<URI::NamespaceMap> object containing preferred CURIE prefixes. This is the preferred method, see note below. =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, %opts) >> 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 serializing 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 serialize 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) Options can also be passed as a HASH. This is typically used for style-specific options. =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 serializing 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 =head1 UPGRADING TO 0.200 The recommended upgrade path is to migrate your application to use L<Attean> rather than L<RDF::Trine> as your RDF library. If that is not an option, you may continue to use L<RDF::Trine>, by using a compatibility layer. If you are using this module directly, to upgrade from earlier releases, you would simply add use RDF::TrineX::Compatibility::Attean; alongside the import of this module. It is in a separate distribution that needs to be installed. If you use the L<RDF::Trine::Serializer> methods, you should instead use L<RDF::Trine::Serializer::RDFa>. =head1 NOTE Version 0.200 introduced a large number of changes to be compatible with both L<Attean> and L<RDF::Trine>. Some of these were backwards-incompatible, some were to support new features, such as the use of L<URI::NamespaceMap>. =head2 Backwards-incompatible changes The methods C<serialize_model_to_file>, C<serialize_model_to_string>, C<serialize_iterator_to_file> and C<serialize_iterator_to_string> that were provided for compatibility with the L<RDF::Trine::Serializer> interface have been moved to a module L<RDF::Trine::Serializer::RDFa> that has to be installed separately to use this with L<RDF::Trine>. C<data_context> previously accepted a plain-text string URI. Now, it requires an appropriate object, as documented. Since RDF 1.1 abandons untyped literals, this module also ceases to emit them. =head2 Namespace mappings The way namespace mappings are handled have been rewritten. Now, the preferred method to add them is to pass an L<URI::NamespaceMap> object to C<namespacemap>. This will override any other options. The namespace mappings for the following prefixes will always be added: C<rdfa>, C<rdf>, C<rdfs> and C<xsd>. If L<URI::NamespaceMap> is not used, but C<namespaces> is given as a hashref of prefix-URI pairs, the pairs will be added. If neither are given, all mappings from L<RDF::NS::Curated>, which includes all if RDFa Initial Context will be added. Finally, any pairs from the deprecated C<ns> option will be added, but a warning will be emitted. =cut sub serialize_model_to_string { croak 'serialize_model_to_string have been to moved RDF::Trine::Serializer::RDFa'; } sub serialize_model_to_file { croak 'serialize_model_to_file have been to moved RDF::Trine::Serializer::RDFa'; } sub serialize_iterator_to_string { croak 'serialize_iterator_to_string have been to moved RDF::Trine::Serializer::RDFa'; } sub serialize_iterator_to_file { croak 'serialize_iterator_to_string have been to moved RDF::Trine::Serializer::RDFa'; } 1; __END__ =head1 BUGS Please report any bugs to L<https://github.com/kjetilk/p5-rdf-rdfa-generator/issues>. =head1 SEE ALSO You may want to use the framework-specific frontends: L<RDF::Trine::Serializer::RDFa> or L<AtteanX::Serializer::RDFa>. Other relevant modules: L<HTML::HTML5::Writer>, L<XML::LibXML>, L<RDF::RDFa::Parser>, L<RDF::Trine>, L<URI::NamespaceMap>, L<Attean>. =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, 2018 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�� 5705�13240124305� 16120� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.200�����������������������������������������������������������������������������������������������������������������������������������������������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 11d75d3527f0b63277faba3f477c96689c978681 COPYRIGHT SHA1 50ff1164ce6a80b19cf718197559e6fec454b9b1 CREDITS SHA1 bc5f36abc54575bf35a27e60e3dfc7a92cc948ac Changes SHA1 4ff8b9c58bb0c75deffb5f515f261e1c89169987 INSTALL SHA1 7e029b2b031bf389c668edf9a113b21da771e85f LICENSE SHA1 19fe1ae9a88c63c0e7e68687ca7ea3bf305493e9 MANIFEST SHA1 9566109c77157fb8e1cea730770bdfd49b875675 META.json SHA1 42a90fe086b5a5b6d26396765d0b9dd261b1de5c META.yml SHA1 0d39efbe7c211d9a4c3b9ae7999ea4d85ceae411 Makefile.PL SHA1 c28fdb7be7e7880fc01126df958853804da92404 README SHA1 18e2cc2459984e9dfbe168f27f20a7861568ce0f README.pod SHA1 7c3202fe551655d70b690f389f10a348b614294a TODO SHA1 08212f2a6e388e70dcc89e35c5a2862a142efd6c dist.ini SHA1 dfd0dd23bdb678e884deafc19123743edfd4625f doap.ttl SHA1 c7aee86ed37f40b6ef6122ad21114e2cdac427f8 examples/example1-out.html SHA1 1e494669f72f4cd350c2aec64901989643320234 examples/example1.css SHA1 49e255ea736380898d62fd73b5f62037b1eb50ff examples/example1.pl SHA1 18e2cc2459984e9dfbe168f27f20a7861568ce0f lib/RDF/RDFa/Generator.pm SHA1 b941d36a29da002e4c61b0552dbf98d5b3a1ace7 lib/RDF/RDFa/Generator/HTML/Head.pm SHA1 b71f40063d58985fdd67380cf78a47ceaa6c9513 lib/RDF/RDFa/Generator/HTML/Hidden.pm SHA1 9dafb2f2a0e8f84a0d3c06dad86fc451d8565ade lib/RDF/RDFa/Generator/HTML/Pretty.pm SHA1 7b1fc9f9f35ca7d9ae2ce31a86f9cdeadd302d81 lib/RDF/RDFa/Generator/HTML/Pretty/Note.pm SHA1 b01bb61e52c0bb2c07305304677e11993daf8a9e t/01basic.t SHA1 c78635be1851fcf2313d167153aa9de7c93eb9e2 t/02_kk_namespaces.t SHA1 f809f2ddf0a780cb0f1d88a4dc352f6f7f4a96bd t/03_kk_attean.t SHA1 5ed2fd0ef412cd7855a2532c77392e14767554d4 t/uninit_lang_warning.t -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEDsyLxtCi6bk7pBcmf77o3zqeSqUFAlqAqMUACgkQf77o3zqe SqUgtQ//dJbGzg/DjBp3TecEPacUHSBqdPL7eE0xPqGz/AB7cjZT6yuq5WMJ0N3Q NDiXIuVGtJwzd87iXBppDpbZYgohXEQJtejx6Jrrm6IfFTdQ8OKb/0+eG++6kHWT suBTi1Rfta1sHLd5A6A4sP1jniM+/K81kRRu0TQAV60zNuoNfniGDCejYZSSQ/mV EFUS0CCv2raG9FOVpWL5X3D6E0AyvZXjSh/vQJRNRc70M3avSbyJ69m8Bf2JECUj Kj7m3Yz5XK+f5oNYLNhKjgOppmo+fqPdI1SWL1EdMErLkVBybsYI7Xus7eFGzrlq t6+PxA2ldeBTDXfy6UPEl8Bk46dKEVFQifuxDYqqwv66Ju680mJxCH+4zOoe+68V /IwJ/CsB6vUQPNDTlIvHlFgVx88SWtuwvtOeXvB8UTxnjCJzZ18iflzITKQjMV+3 fLasP5QmzP//qzvDppBlhT+BEnmL8Hbge/46PNtYU15z1qetwKkP6DxRpH3GhHJ5 xBIfBtb0TwYnQ0H85LfexoRUDN1vAzNZlprC5xYYDgV+ez2RXd11evR631mAxKpQ 5Kh1rhfYb4sL4c4gNymRmqzJiMmELH31P+5xr/0HLDM95hQjSUEs4i+CxJYy5eSL CER8iarbf+CNb5VJwyX1cKuHZ0/mvCDAqR79P3a8/4+jtaONxIo= =sdAW -----END PGP SIGNATURE----- �����������������������������������������������������������TODO������������������������������������������������������������������������������������������������000644��001750��001750�� 161�13240124304� 15272� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.200�����������������������������������������������������������������������������������������������������������������������������������������������* Add an Atom (DataRSS) generator. * More icons for HTML::Pretty. * Add links between resources in HTML::Pretty. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������dist.ini��������������������������������������������������������������������������������������������000644��001750��001750�� 104�13240124304� 16243� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.200�����������������������������������������������������������������������������������������������������������������������������������������������;;class='Dist::Inkt::Profile::TOBYINK' ;;name='RDF-RDFa-Generator' ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doap.ttl��������������������������������������������������������������������������������������������000644��001750��001750�� 53104�13240124305� 16320� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.200�����������������������������������������������������������������������������������������������������������������������������������������������_:rb5e50ce13c3f54d1d9b55ad093b8431cdr0 <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#> . _:rb7cc96b7c68f6472b991665d91d3edc57r0 <http://ontologi.es/doap-deps#on> "Test::More 0.96"^^<http://ontologi.es/doap-deps#CpanId> . _:rb7cc96b7c68f6472b991665d91d3edc57r1 <http://ontologi.es/doap-deps#on> "Test::Output"^^<http://ontologi.es/doap-deps#CpanId> . _:rb7cc96b7c68f6472b991665d91d3edc57r10 <http://ontologi.es/doap-deps#on> "RDF::NS::Curated 0.100"^^<http://ontologi.es/doap-deps#CpanId> . _:rb7cc96b7c68f6472b991665d91d3edc57r11 <http://ontologi.es/doap-deps#on> "perl 5.008"^^<http://ontologi.es/doap-deps#CpanId> . _:rb7cc96b7c68f6472b991665d91d3edc57r12 <http://ontologi.es/doap-deps#on> "Data::Dumper"^^<http://ontologi.es/doap-deps#CpanId> . _:rb7cc96b7c68f6472b991665d91d3edc57r13 <http://ontologi.es/doap-deps#on> "Icon::FamFamFam::Silk"^^<http://ontologi.es/doap-deps#CpanId> . _:rb7cc96b7c68f6472b991665d91d3edc57r14 <http://ontologi.es/doap-deps#on> "XML::LibXML 1.60"^^<http://ontologi.es/doap-deps#CpanId> . _:rb7cc96b7c68f6472b991665d91d3edc57r15 <http://ontologi.es/doap-deps#on> "Dist::Inkt 0.001"^^<http://ontologi.es/doap-deps#CpanId> . _:rb7cc96b7c68f6472b991665d91d3edc57r2 <http://ontologi.es/doap-deps#on> "Test::Modern"^^<http://ontologi.es/doap-deps#CpanId> . _:rb7cc96b7c68f6472b991665d91d3edc57r3 <http://ontologi.es/doap-deps#on> "Attean 0.019"^^<http://ontologi.es/doap-deps#CpanId> . _:rb7cc96b7c68f6472b991665d91d3edc57r4 <http://ontologi.es/doap-deps#on> "RDF::Prefixes"^^<http://ontologi.es/doap-deps#CpanId> . _:rb7cc96b7c68f6472b991665d91d3edc57r5 <http://ontologi.es/doap-deps#on> "RDF::Prefixes"^^<http://ontologi.es/doap-deps#CpanId> . _:rb7cc96b7c68f6472b991665d91d3edc57r6 <http://ontologi.es/doap-deps#on> "RDF::NS"^^<http://ontologi.es/doap-deps#CpanId> . _:rb7cc96b7c68f6472b991665d91d3edc57r7 <http://ontologi.es/doap-deps#on> "Attean 0.019"^^<http://ontologi.es/doap-deps#CpanId> . _:rb7cc96b7c68f6472b991665d91d3edc57r8 <http://ontologi.es/doap-deps#on> "RDF::Trine 0.112"^^<http://ontologi.es/doap-deps#CpanId> . _:rb7cc96b7c68f6472b991665d91d3edc57r9 <http://ontologi.es/doap-deps#on> "URI::NamespaceMap 1.06"^^<http://ontologi.es/doap-deps#CpanId> . _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r0 <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 ] . _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r10 a <http://ontologi.es/doap-changeset#Bugfix> ; <http://www.w3.org/2000/01/rdf-schema#label> "UTF-8 fixes."@en . _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r11 <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 ] . _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r13 <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 ] . _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r17 <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 ] . _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r22 <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 ] . _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r26 <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 ] . _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r3 <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 ] . _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r30 <http://ontologi.es/doap-changeset#item> [ a <http://ontologi.es/doap-changeset#Addition> ; <http://www.w3.org/2000/01/rdf-schema#label> "Support Attean."@en ], [ a <http://ontologi.es/doap-changeset#Addition> ; <http://www.w3.org/2000/01/rdf-schema#label> "More tests."@en ], [ a <http://ontologi.es/doap-changeset#Change> ; <http://www.w3.org/2000/01/rdf-schema#label> "Many minor improvements."@en ] . _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r34 <http://ontologi.es/doap-changeset#item> [ a <http://ontologi.es/doap-changeset#Removal> ; <http://www.w3.org/2000/01/rdf-schema#label> "Stop using the Trine API."@en ], [ a <http://ontologi.es/doap-changeset#Addition> ; <http://www.w3.org/2000/01/rdf-schema#label> "Use the Attean API."@en ], [ a <http://ontologi.es/doap-changeset#Removal> ; <http://www.w3.org/2000/01/rdf-schema#label> "Trine serialization methods are deprecated and will croak."@en ], [ a <http://ontologi.es/doap-changeset#Change> ; <http://www.w3.org/2000/01/rdf-schema#label> "data_context takes an object as input."@en ], [ a <http://ontologi.es/doap-changeset#Change> ; <http://www.w3.org/2000/01/rdf-schema#label> "Use URI::NamespaceMap for managing prefixes, RDF::Prefixes can be used through it."@en ], [ a <http://ontologi.es/doap-changeset#Removal> ; <http://www.w3.org/2000/01/rdf-schema#label> "Remove serialization of plain literals as they don't exist in RDF 1.1."@en ], [ a <http://ontologi.es/doap-changeset#Change> ; <http://www.w3.org/2000/01/rdf-schema#label> "Improve CURIE generation."@en ], [ a <http://ontologi.es/doap-changeset#Addition> ; <http://www.w3.org/2000/01/rdf-schema#label> "Use RDF::NS::Curated for the canonical list of namespaces."@en ], [ a <http://ontologi.es/doap-changeset#Change> ; <http://www.w3.org/2000/01/rdf-schema#label> "Improve the HTML of Pretty a bit."@en ], [ a <http://ontologi.es/doap-changeset#Addition> ; <http://www.w3.org/2000/01/rdf-schema#label> "Many more tests."@en ], [ a <http://ontologi.es/doap-changeset#Change> ; <http://www.w3.org/2000/01/rdf-schema#label> "Many minor improvements."@en ] . _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r6 <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 ] . _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r9 <http://ontologi.es/doap-changeset#item> _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r10 . <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#develop-recommendation> _:rb7cc96b7c68f6472b991665d91d3edc57r15 ; <http://ontologi.es/doap-deps#runtime-recommendation> _:rb7cc96b7c68f6472b991665d91d3edc57r5, _:rb7cc96b7c68f6472b991665d91d3edc57r6, _:rb7cc96b7c68f6472b991665d91d3edc57r7 ; <http://ontologi.es/doap-deps#runtime-requirement> _:rb7cc96b7c68f6472b991665d91d3edc57r10, _:rb7cc96b7c68f6472b991665d91d3edc57r11, _:rb7cc96b7c68f6472b991665d91d3edc57r12, _:rb7cc96b7c68f6472b991665d91d3edc57r13, _:rb7cc96b7c68f6472b991665d91d3edc57r14, _:rb7cc96b7c68f6472b991665d91d3edc57r9 ; <http://ontologi.es/doap-deps#runtime-suggestion> _:rb7cc96b7c68f6472b991665d91d3edc57r8 ; <http://ontologi.es/doap-deps#test-requirement> _:rb7cc96b7c68f6472b991665d91d3edc57r0, _:rb7cc96b7c68f6472b991665d91d3edc57r1, _:rb7cc96b7c68f6472b991665d91d3edc57r2, _:rb7cc96b7c68f6472b991665d91d3edc57r3, _:rb7cc96b7c68f6472b991665d91d3edc57r4 ; <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://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-192>, <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-200> ; <http://usefulinc.com/ns/doap#repository> _:rb5e50ce13c3f54d1d9b55ad093b8431cdr0 ; <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> _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r0 ; <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> _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r3 ; <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> _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r6 ; <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> _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r9 ; <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> _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r11 ; <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> _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r13 ; <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> _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r17 ; <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> _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r22 ; <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> _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r26 ; <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/dist/RDF-RDFa-Generator/v_0-192> <http://ontologi.es/doap-changeset#changeset> _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r30 ; <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.192"^^<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.192.tar.gz> ; <http://usefulinc.com/ns/doap#revision> "0.192"^^<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-200> <http://ontologi.es/doap-changeset#changeset> _:rbbf6a73f600e44e4ca3ce5c2ce61f91d0r34 ; <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.200"^^<http://www.w3.org/2001/XMLSchema#string> ; <http://purl.org/dc/terms/issued> "2018-02-11"^^<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.200.tar.gz> ; <http://usefulinc.com/ns/doap#revision> "0.200"^^<http://www.w3.org/2001/XMLSchema#string> ; a <http://usefulinc.com/ns/doap#Version> ; <http://www.w3.org/2000/01/rdf-schema#label> "Extensive changes to support both Attean and Trine. Backwards incompatible changes."@en . <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�13240124304� 21665� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.200/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�13240124304� 20666� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.200/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�13240124304� 20510� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.200/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�13240124304� 16453� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.200/t���������������������������������������������������������������������������������������������������������������������������������������������use Test::More tests => 1; BEGIN { use_ok('RDF::RDFa::Generator') }; ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������02_kk_namespaces.t����������������������������������������������������������������������������������000644��001750��001750�� 12577�13240124304� 20415� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.200/t���������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env perl # tests from KjetilK use strict; use Test::More; use Attean; use Attean::RDF qw(iri); my $parser = Attean->get_parser( 'turtle' )->new(base=>'http://example.org/'); my $iter = $parser->parse_iter_from_bytes( '</foo> a </Bar> .' ); my $store = Attean->get_store('Memory')->new(); $store->add_iter($iter->as_quads(iri('http://graph.invalid/'))); my $model = Attean::QuadModel->new( store => $store ); use RDF::RDFa::Generator; subtest 'Default generator, old bugfix' => sub { 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'); }; subtest 'Default generator, single given NS' => sub { my $string = tests({ 'ex' => 'http://example.org/ns'}, 'xmlns:ex="http://example.org/ns"'); }; subtest 'Head generator, single given NS' => sub { my $string = tests({ 'ex' => 'http://example.org/ns'}, 'xmlns:ex="http://example.org/ns"', 'HTML::Head'); }; subtest 'Head generator, list of known prefixes' => sub { my $string = tests(['bibo', 'dbo', 'doap'], 'xmlns:bibo="http://purl.org/ontology/bibo/"', 'HTML::Head'); like($string, qr|xmlns:dbo="http://dbpedia.org/ontology/"|, 'Correct dbo namespace declaration'); like($string, qr|xmlns:doap="http://usefulinc.com/ns/doap#"|, 'Correct doap namespace declaration'); }; subtest 'Head generator, list of known uris' => sub { my $string = tests(["http://dbpedia.org/ontology/", "http://usefulinc.com/ns/doap#", "http://purl.org/ontology/bibo/"], 'xmlns:bibo="http://purl.org/ontology/bibo/"', 'HTML::Head'); like($string, qr|xmlns:dbo="http://dbpedia.org/ontology/"|, 'Correct dbo namespace declaration'); like($string, qr|xmlns:doap="http://usefulinc.com/ns/doap#"|, 'Correct doap namespace declaration'); }; subtest 'Head generator, list of unknown uris' => sub { my $string = tests(["http://example.org/ontology/", "http://nothinguseful.com/ns/doad#"], 'xmlns:doad="http://nothinguseful.com/ns/doad#"', 'HTML::Head'); like($string, qr|xmlns:ontology="http://example.org/ontology/"|, 'Correct dbo namespace declaration'); }; subtest 'Pretty generator, single given NS' => sub { my $string = tests({ 'ex' => 'http://example.org/ns'}, 'xmlns:ex="http://example.org/ns"', 'HTML::Pretty'); }; subtest 'Pretty generator, list of known prefixes' => sub { my $string = tests(['bibo', 'dbo', 'doap'], 'xmlns:bibo="http://purl.org/ontology/bibo/"', 'HTML::Pretty'); like($string, qr|xmlns:dbo="http://dbpedia.org/ontology/"|, 'Correct dbo namespace declaration'); like($string, qr|xmlns:doap="http://usefulinc.com/ns/doap#"|, 'Correct doap namespace declaration'); }; subtest 'Pretty generator, list of known uris' => sub { my $string = tests(["http://dbpedia.org/ontology/", "http://usefulinc.com/ns/doap#", "http://purl.org/ontology/bibo/"], 'xmlns:bibo="http://purl.org/ontology/bibo/"', 'HTML::Pretty'); like($string, qr|xmlns:dbo="http://dbpedia.org/ontology/"|, 'Correct dbo namespace declaration'); like($string, qr|xmlns:doap="http://usefulinc.com/ns/doap#"|, 'Correct doap namespace declaration'); }; subtest 'Pretty generator, list of unknown uris' => sub { my $string = tests(["http://example.org/ontology/", "http://nothinguseful.com/ns/doad#"], 'xmlns:doad="http://nothinguseful.com/ns/doad#"', 'HTML::Pretty'); like($string, qr|xmlns:ontology="http://example.org/ontology/"|, 'Correct dbo namespace declaration'); }; subtest 'Hidden generator, single given NS' => sub { my $string = tests({ 'ex' => 'http://example.org/ns'}, 'xmlns:ex="http://example.org/ns"', 'HTML::Hidden'); }; subtest 'Hidden generator, list of known prefixes' => sub { my $string = tests(['bibo', 'dbo', 'doap'], 'xmlns:bibo="http://purl.org/ontology/bibo/"', 'HTML::Hidden'); like($string, qr|xmlns:dbo="http://dbpedia.org/ontology/"|, 'Correct dbo namespace declaration'); like($string, qr|xmlns:doap="http://usefulinc.com/ns/doap#"|, 'Correct doap namespace declaration'); }; subtest 'Hidden generator, list of known uris' => sub { my $string = tests(["http://dbpedia.org/ontology/", "http://usefulinc.com/ns/doap#", "http://purl.org/ontology/bibo/"], 'xmlns:bibo="http://purl.org/ontology/bibo/"', 'HTML::Hidden'); like($string, qr|xmlns:dbo="http://dbpedia.org/ontology/"|, 'Correct dbo namespace declaration'); like($string, qr|xmlns:doap="http://usefulinc.com/ns/doap#"|, 'Correct doap namespace declaration'); }; subtest 'Hidden generator, list of unknown uris' => sub { my $string = tests(["http://example.org/ontology/", "http://nothinguseful.com/ns/doad#"], 'xmlns:doad="http://nothinguseful.com/ns/doad#"', 'HTML::Hidden'); like($string, qr|xmlns:ontology="http://example.org/ontology/"|, 'Correct dbo namespace declaration'); }; sub tests { my ($ns, $expect, $generator) = @_; my %opts = (namespaces => $ns); if ($generator) { $opts{style} = $generator; } else { $generator = 'default'; } ok(my $document = RDF::RDFa::Generator->new(%opts)->create_document($model), "Assignment of $generator generator OK"); isa_ok($document, 'XML::LibXML::Document'); my $string = $document->toString; like($string, qr|$expect|, 'Correct example namespace declaration'); return $string; } done_testing(); ���������������������������������������������������������������������������������������������������������������������������������03_kk_attean.t��������������������������������������������������������������������������������������000644��001750��001750�� 6306�13240124304� 17524� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.200/t���������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env perl # tests from KjetilK use strict; use Test::More; use Test::Modern; BEGIN { use_ok('Attean') or BAIL_OUT "Attean required for tests"; use_ok('RDF::RDFa::Generator'); } use Attean::RDF qw(iri); my $store = Attean->get_store('Memory')->new(); my $parser = Attean->get_parser('Turtle')->new(base=>'http://example.org/'); my $iter = $parser->parse_iter_from_bytes('<http://example.org/foo> a <http://example.org/Bar> ; <http://example.org/title> "Dahut"@fr ; <http://example.org/something> [ <http://example.org/else> "Foo" ; <http://example.org/pi> 3.14 ] .'); $store->add_iter($iter->as_quads(iri('http://graph.invalid/'))); my $model = Attean::QuadModel->new( store => $store ); subtest 'Default generator' => sub { ok(my $document = RDF::RDFa::Generator->new->create_document($model), 'Assignment OK'); my $string = tests($document); like($string, qr|<link|, 'link element just local part'); like($string, qr|resource="http://example.org/Bar"|, 'Object present'); like($string, qr|property="ex:title" content="Dahut"|, 'Literals OK'); }; subtest 'Hidden generator' => sub { ok(my $document = RDF::RDFa::Generator::HTML::Hidden->new->create_document($model), 'Assignment OK'); my $string = tests($document); like($string, qr|<body>\s?<i|, 'i element just local part'); like($string, qr|resource="http://example.org/Bar"|, 'Object present'); like($string, qr|property="ex:title" content="Dahut"|, 'Literals OK'); }; subtest 'Pretty generator' => sub { ok(my $document = RDF::RDFa::Generator::HTML::Pretty->new->create_document($model), 'Assignment OK'); my $string = tests($document); like($string, qr|<dd property="ex:title" class="typed-literal" xml:lang="fr" datatype="rdf:langString">Dahut</dd>|, 'Language Literal OK'); like($string, qr|<dd property="ex:else" class="typed-literal" datatype="xsd:string">Foo</dd>|, '"Plain" Literal OK'); }; subtest 'Pretty generator with interlink' => sub { ok(my $document = RDF::RDFa::Generator::HTML::Pretty->new()->create_document($model, interlink => 1, id_prefix => 'test'), 'Assignment OK'); my $string = tests($document); like($string, qr|<main>\s?<div|, 'div element just local part'); like($string, qr|<dd property="ex:title" class="typed-literal" xml:lang="fr" datatype="rdf:langString">Dahut</dd>|, 'Literals OK'); }; subtest 'Pretty generator with Note' => sub { ok(my $note = RDF::RDFa::Generator::HTML::Pretty::Note->new(iri('http://example.org/foo'), 'This is a Note'), 'Note creation OK'); ok(my $document = RDF::RDFa::Generator::HTML::Pretty->new->create_document($model, notes => [$note]), 'Assignment OK'); my $string = tests($document); like($string, qr|<aside>|, 'aside element found'); like($string, qr|This is a Note|, 'Note text found'); }; sub tests { my $document = shift; isa_ok($document, 'XML::LibXML::Document'); my $string = $document->toString; like($string, qr|about="http://example.org/foo"|, 'Subject URI present'); like($string, qr|rel="rdf:type"|, 'Type predicate present'); like($string, qr|property="ex:pi"|, 'pi predicate present'); like($string, qr|3\.14|, 'pi decimal present'); like($string, qr|datatype="xsd:decimal"|, 'pi decimal datatype present'); return $string; } done_testing(); ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������uninit_lang_warning.t�������������������������������������������������������������������������������000644��001750��001750�� 1503�13240124304� 21307� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.200/t���������������������������������������������������������������������������������������������������������������������������������������������use strict; use warnings; use Test::More; use Test::Output; use Attean; use Attean::RDF qw(blank iri literal); use RDF::RDFa::Generator; my $t = Attean::Quad->new( blank('x'), iri('http://example.org/p'), literal(3), iri('http://example.org/graph1'), ); my $store = Attean->get_store('Memory')->new(); $store->add_quad($t); my $model = Attean::QuadModel->new( store => $store ); 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�� 17207�13240124304� 21074� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.200/lib/RDF/RDFa����������������������������������������������������������������������������������������������������������������������������������=head1 NAME RDF::RDFa::Generator - Generate data for RDFa serialization =cut package RDF::RDFa::Generator; use 5.008; use strict; use warnings; our $VERSION = '0.200'; use RDF::RDFa::Generator::HTML::Head; use RDF::RDFa::Generator::HTML::Hidden; use RDF::RDFa::Generator::HTML::Pretty; use Carp; =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, an L<Attean> Blank or IRI object or an L<RDF::Trine::Node> which indicates the context (named graph) containing the data to generate RDFa for. =item * B<namespacemap> - a L<URI::NamespaceMap> object containing preferred CURIE prefixes. This is the preferred method, see note below. =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, %opts) >> 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 serializing 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 serialize 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) Options can also be passed as a HASH. This is typically used for style-specific options. =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 serializing 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 =head1 UPGRADING TO 0.200 The recommended upgrade path is to migrate your application to use L<Attean> rather than L<RDF::Trine> as your RDF library. If that is not an option, you may continue to use L<RDF::Trine>, by using a compatibility layer. If you are using this module directly, to upgrade from earlier releases, you would simply add use RDF::TrineX::Compatibility::Attean; alongside the import of this module. It is in a separate distribution that needs to be installed. If you use the L<RDF::Trine::Serializer> methods, you should instead use L<RDF::Trine::Serializer::RDFa>. =head1 NOTE Version 0.200 introduced a large number of changes to be compatible with both L<Attean> and L<RDF::Trine>. Some of these were backwards-incompatible, some were to support new features, such as the use of L<URI::NamespaceMap>. =head2 Backwards-incompatible changes The methods C<serialize_model_to_file>, C<serialize_model_to_string>, C<serialize_iterator_to_file> and C<serialize_iterator_to_string> that were provided for compatibility with the L<RDF::Trine::Serializer> interface have been moved to a module L<RDF::Trine::Serializer::RDFa> that has to be installed separately to use this with L<RDF::Trine>. C<data_context> previously accepted a plain-text string URI. Now, it requires an appropriate object, as documented. Since RDF 1.1 abandons untyped literals, this module also ceases to emit them. =head2 Namespace mappings The way namespace mappings are handled have been rewritten. Now, the preferred method to add them is to pass an L<URI::NamespaceMap> object to C<namespacemap>. This will override any other options. The namespace mappings for the following prefixes will always be added: C<rdfa>, C<rdf>, C<rdfs> and C<xsd>. If L<URI::NamespaceMap> is not used, but C<namespaces> is given as a hashref of prefix-URI pairs, the pairs will be added. If neither are given, all mappings from L<RDF::NS::Curated>, which includes all if RDFa Initial Context will be added. Finally, any pairs from the deprecated C<ns> option will be added, but a warning will be emitted. =cut sub serialize_model_to_string { croak 'serialize_model_to_string have been to moved RDF::Trine::Serializer::RDFa'; } sub serialize_model_to_file { croak 'serialize_model_to_file have been to moved RDF::Trine::Serializer::RDFa'; } sub serialize_iterator_to_string { croak 'serialize_iterator_to_string have been to moved RDF::Trine::Serializer::RDFa'; } sub serialize_iterator_to_file { croak 'serialize_iterator_to_string have been to moved RDF::Trine::Serializer::RDFa'; } 1; __END__ =head1 BUGS Please report any bugs to L<https://github.com/kjetilk/p5-rdf-rdfa-generator/issues>. =head1 SEE ALSO You may want to use the framework-specific frontends: L<RDF::Trine::Serializer::RDFa> or L<AtteanX::Serializer::RDFa>. Other relevant modules: L<HTML::HTML5::Writer>, L<XML::LibXML>, L<RDF::RDFa::Parser>, L<RDF::Trine>, L<URI::NamespaceMap>, L<Attean>. =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, 2018 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�� 14243�13240124304� 22476� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.200/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 URI::NamespaceMap 1.05; use RDF::NS::Curated 0.006; use XML::LibXML qw':all'; use Carp; use Scalar::Util qw(blessed); use warnings; use Data::Dumper; our $VERSION = '0.200'; sub new { my ($class, %opts) = @_; unless (blessed($opts{namespacemap}) && $opts{namespacemap}->isa('URI::NamespaceMap')) { if (defined $opts{namespaces}) { $opts{namespacemap} = URI::NamespaceMap->new($opts{namespaces}); } else { my $curated = RDF::NS::Curated->new; $opts{namespacemap} = URI::NamespaceMap->new($curated->all); } # handle deprecated {ns}. if (defined($opts{ns})) { carp "ns option is deprecated by the RDFa serializer"; } while (my ($u,$p) = each %{ $opts{ns} }) { $opts{namespacemap}->add_mapping($p => $u); } delete $opts{ns}; delete $opts{namespaces} } $opts{namespacemap}->guess_and_add('rdfa', 'rdf', 'rdfs', 'xsd'); 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); $self->_process_subject($st, $node) ->_process_predicate($st, $node) ->_process_object($st, $node); if (defined($self->{'version'}) && $self->{'version'} == 1.1 and $self->{'prefix_attr'}) { if (defined($self->{namespacemap}->rdfa)) { $node->setAttribute('prefix', $self->{namespacemap}->rdfa->as_string) } } else { while (my ($prefix, $nsURI) = $self->{namespacemap}->each_map) { $node->setNamespace($nsURI->as_string, $prefix, 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'})) { if (! blessed($self->{'data_context'})) { croak "data_context can't be a string anymore, must be a Attean blank or IRI or an RDF::Trine::Node"; } elsif ($self->{'data_context'}->does('Attean::API::BlankOrIRI') || $self->{'data_context'}->isa('RDF::Trine::Node')) { croak "data_context must be a Attean blank or IRI or an RDF::Trine::Node, not " . ref($self->{'data_context'}); } } return $model->get_quads(undef, undef, undef, $data_context); } sub _process_subject { my ($self, $st, $node) = @_; if (defined $self->{'base'} and $st->subject->is_resource and $st->subject->abs eq $self->{'base'}) { return $self; } if ($st->subject->is_resource) { $node->setAttribute('about', $st->subject->abs); } else { $node->setAttribute('about', '[_:'.$st->subject->value.']'); } return $self; } sub _process_predicate { my ($self, $st, $node) = @_; my $attr = $st->object->is_literal ? 'property' : 'rel'; if ($attr eq 'rel' and $st->predicate->abs =~ 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->abs =~ m'^http://www\.w3\.org/1999/xhtml/vocab#(.*)$') { $node->setAttribute($attr, ':'.$1); return $self; } elsif (defined($self->{'version'}) && $self->{'version'} == 1.1) { $node->setAttribute($attr, $st->predicate->abs); return $self; } $node->setAttribute($attr, $self->_make_curie($st->predicate)); return $self; } sub _process_object { my ($self, $st, $node) = @_; if (defined $self->{'base'} and $st->subject->is_resource and $st->subject->abs eq $self->{'base'} and $st->object->is_resource) { $node->setAttribute('href', $st->object->abs); return $self; } elsif (defined $self->{'base'} and $st->object->is_resource and $st->object->abs eq $self->{'base'}) { $node->setAttribute('resource', ''); return $self; } elsif ($st->object->is_resource) { $node->setAttribute('resource', $st->object->abs); return $self; } elsif ($st->object->is_blank) { $node->setAttribute('resource', '[_:'.$st->object->value.']'); return $self; } $node->setAttribute('content', encode_utf8($st->object->value)); if (defined $st->object->datatype) { $node->setAttribute('datatype', $self->_make_curie($st->object->datatype)); } else { $node->setAttribute('xml:lang', ''.$st->object->language); } return $self; } sub _make_curie { my ($self, $uri) = @_; my $curie = $self->{namespacemap}->abbreviate($uri); unless (defined($curie)) { $uri->value =~ m!(.*)(\#|/)(.*?)$!; my $trim = $1.$2; $self->{namespacemap}->guess_and_add($trim); $curie = $self->{namespacemap}->abbreviate($uri); } unless (defined($curie)) { $curie = $uri->value; } return $curie; } 1; Hidden.pm000644001750001750 374213240124304 23012 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.200/lib/RDF/RDFa/Generator/HTMLpackage RDF::RDFa::Generator::HTML::Hidden; use 5.008; use base qw'RDF::RDFa::Generator::HTML::Head'; use strict; use XML::LibXML qw':all'; use warnings; our $VERSION = '0.200'; 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 $subjects = {}; while (my $st = $stream->next) { my $s = $st->subject->is_resource ? $st->subject->abs : ('_:'.$st->subject->value); 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); foreach my $st (@{ $subjects->{$s} }) { my $node2 = $node->addNewChild('http://www.w3.org/1999/xhtml', 'i'); $self->_process_predicate($st, $node2) ->_process_object($st, $node2); } } if (defined($self->{'version'}) && $self->{'version'} == 1.1 and $self->{'prefix_attr'}) { if (defined($self->{namespacemap}->rdfa)) { $rootnode->setAttribute('prefix', $self->{namespacemap}->rdfa->as_string); } } else { while (my ($prefix, $nsURI) = $self->{namespacemap}->each_map) { $rootnode->setNamespace($nsURI->as_string, $prefix, 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) = @_; if (defined $self->{'base'} and $st->subject->is_resource and $st->subject->abs eq $self->{'base'}) { $node->setAttribute('about', ''); } elsif ($st->subject->is_resource) { $node->setAttribute('about', $st->subject->abs); } else { $node->setAttribute('about', '[_:'.$st->subject->value.']'); } return $self; } 1; Pretty.pm000644001750001750 3733013240124304 23126 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.200/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'; use warnings; our $VERSION = '0.200'; 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 injection_site { return '//xhtml:main'; } 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 $subjects = {}; while (my $st = $stream->next) { next if $st->subject->is_literal; # ??? my $s = $st->subject->is_resource ? $st->subject->abs : ('_:'.$st->subject->value); 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); $self->_resource_heading($subjects->{$s}->[0]->subject, $subject_node, $subjects->{$s}); $self->_resource_classes($subjects->{$s}->[0]->subject, $subject_node, $subjects->{$s}); $self->_resource_statements($subjects->{$s}->[0]->subject, $subject_node, $subjects->{$s}, $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'}; } if (defined($self->{'version'}) && $self->{'version'} == 1.1 and $self->{'prefix_attr'}) { if (defined($self->{namespacemap}->rdfa)) { $root_node->setAttribute('prefix', $self->{namespacemap}->rdfa->as_string) } } else { while (my ($prefix, $nsURI) = $self->{namespacemap}->each_map) { $root_node->setNamespace($nsURI->as_string, $prefix, 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 (defined($prefix) && ($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) = @_; my $heading = $node->addNewChild(XHTML_NS, 'h3'); $heading->appendTextNode( $subject->is_resource ? $subject->abs : ('_:'.$subject->value) ); $heading->setAttribute('class', $subject->is_resource ? 'resource' : 'blank' ); return $self; } sub _resource_classes { my ($self, $subject, $node, $statements) = @_; my @statements = sort { $a->predicate->abs cmp $b->predicate->abs or $a->object->abs cmp $b->object->abs } grep { $_->predicate->abs 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')); foreach my $st (@statements) { my $IMG = $SPAN->addNewChild(XHTML_NS, 'img'); $IMG->setAttribute('about', $st->object->abs); $IMG->setAttribute('alt', $st->object->abs); $IMG->setAttribute('src', $self->_img($st->object->abs)); $IMG->setAttribute('title', $st->object->abs); } return $self; } sub _resource_statements { my ($self, $subject, $node, $statements, $interlink, $id_prefix, $model) = @_; my @statements = sort { $a->predicate->abs cmp $b->predicate->abs or $a->object->ntriples_string cmp $b->object->ntriples_string } grep { $_->predicate->abs 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 (defined($current_property) && ($st->predicate->abs eq $current_property)) { my $DT = $DL->addNewChild(XHTML_NS, 'dt'); $DT->setAttribute('title', $st->predicate->abs); $DT->appendTextNode($self->_make_curie($st->predicate)); } $current_property = $st->predicate->abs; my $DD = $DL->addNewChild(XHTML_NS, 'dd'); if ($st->object->is_resource && $st->object->abs =~ /^javascript:/i) { $DD->setAttribute('class', 'resource'); my $A = $DD->addNewChild(XHTML_NS, 'span'); $A->setAttribute('rel', $self->_make_curie($st->predicate)); $A->setAttribute('resource', $st->object->abs); $A->appendTextNode($st->object->abs); } elsif ($st->object->is_resource) { $DD->setAttribute('class', 'resource'); my $A = $DD->addNewChild(XHTML_NS, 'a'); $A->setAttribute('rel', $self->_make_curie($st->predicate)); $A->setAttribute('href', $st->object->abs); $A->appendTextNode($st->object->abs); } elsif ($st->object->is_blank) { $DD->setAttribute('class', 'blank'); my $A = $DD->addNewChild(XHTML_NS, 'span'); $A->setAttribute('rel', $self->_make_curie($st->predicate)); $A->setAttribute('resource', '[_:'.$st->object->value.']'); $A->appendTextNode('_:'.$st->object->value); } elsif ($self->{'safe_xml_literals'} && $st->object->is_literal && $st->object->datatype->value eq 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral') { $DD->setAttribute('property', $self->_make_curie($st->predicate)); $DD->setAttribute('class', 'typed-literal datatype-xmlliteral'); $DD->setAttribute('datatype', $self->_make_curie($st->object->datatype)); $DD->setAttribute('content', encode_utf8($st->object->value)); $DD->addNewChild(XHTML_NS, 'pre')->addNewChild(XHTML_NS, 'code')->appendTextNode(encode_utf8($st->object->value)); } elsif ($st->object->is_literal && $st->object->datatype->value eq 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral') { $DD->setAttribute('property', $self->_make_curie($st->predicate)); $DD->setAttribute('class', 'typed-literal datatype-xmlliteral'); $DD->setAttribute('datatype', $self->_make_curie($st->object->datatype)); $DD->appendWellBalancedChunk(encode_utf8($st->object->value)); } elsif ($st->object->is_literal) { $DD->setAttribute('property', $self->_make_curie($st->predicate)); $DD->setAttribute('class', 'typed-literal'); if ($st->object->has_language) { $DD->setAttribute('xml:lang', ''.$st->object->language); } $DD->setAttribute('datatype', $self->_make_curie($st->object->datatype)); $DD->appendTextNode(encode_utf8($st->object->value)); } if ($interlink && !$st->object->is_literal) { if ($model->count_quads($st->object, undef, undef, undef)) { $DD->appendTextNode(' '); my $seealso = $DD->addNewChild(XHTML_NS, 'a'); $seealso->setAttribute('about', $st->object->is_resource ? $st->object->abs : '[_:'.$st->object->value.']'); $seealso->setAttribute('rel', $self->_make_curie('http://www.w3.org/2000/01/rdf-schema#seeAlso')); $seealso->setAttribute('href', '#'._make_id($st->object->is_resource ? $st->object->abs : '_:'.$st->object->value, $id_prefix)); $seealso->appendTextNode($interlink); } } } if ($interlink) { my $iter = $model->get_quads(undef, undef, $subject, undef)->materialize; 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->abs : '_:'.$sast->subject->value; my $p = $self->_make_curie($sast->predicate); $sadata->{$sas}->{$p} = $sast->predicate->abs; } 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', $self->_make_curie('http://www.w3.org/2000/01/rdf-schema#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 $wrapper = $node->addNewChild(XHTML_NS, 'aside'); my $heading = $wrapper->addNewChild(XHTML_NS, 'h4'); $heading->appendTextNode($notes_heading || 'Notes'); my $list = $wrapper->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 423613240124304 24012 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.200/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'; use Carp; use warnings; our $VERSION = '0.200'; =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_relevant_to($node) >> $node is an L or L IRI or blank. Checks if the subject of $note is $node. Alias: is_relevent_to. =cut sub is_relevant_to { my ($self, $something) = @_; return $self->{'subject'}->equals($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) = @_; croak "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 SEE ALSO 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