COPYRIGHT000644001750001750 304214565664017 16147 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.204Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: RDF-RDFa-Generator Upstream-Contact: Kjetil Kjernsmo (KJETILK) and Toby Inkster (TOBYINK) Source: https://metacpan.org/release/RDF-RDFa-Generator Files: Changes META.json META.yml dist.ini doap.ttl lib/RDF/RDFa/Generator/HTML/Head.pm lib/RDF/RDFa/Generator/HTML/Hidden.pm lib/RDF/RDFa/Generator/HTML/Pretty.pm t/01basic.t t/02_kk_namespaces.t t/03_kk_attean.t t/uninit_lang_warning.t Copyright: Copyright 2024 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: Makefile.PL Copyright: Copyright 2020 Toby Inkster. License: GPL-1.0+ or Artistic-1.0 License: Artistic-1.0 This software is Copyright (c) 2024 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) 2024 by the copyright holder(s). This is free software, licensed under: The GNU General Public License, Version 1, February 1989 CREDITS000644001750001750 21714565664017 15655 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.204Maintainer: - Kjetil Kjernsmo (KJETILK) - Toby Inkster (TOBYINK) Contributor: - ZORAN Changes000644001750001750 524214565664017 16153 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.204RDF-RDFa-Generator ================== Created: 2010-05-05 Home page: Bug tracker: Maintainer: Toby Inkster (TOBYINK) Maintainer: Kjetil Kjernsmo (KJETILK) 0.204 2024-02-22 Minor updates and transition to Github Actions for CI. - Added: Use Github actions for CI. - Improve documentation. - Removed: Remove Travis for CI. - Some minor changes. 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 173314565664017 15712 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.204 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 4374414565664017 15716 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.204This software is copyright (c) 2024 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) 2024 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) 2024 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 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End MANIFEST000644001750001750 71214565664017 15766 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.204COPYRIGHT 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 617714565664017 16311 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.204{ "abstract" : "Generate data for RDFa serialization", "author" : [ "Toby Inkster (TOBYINK) ", "Kjetil Kjernsmo (KJETILK) " ], "dynamic_config" : 0, "generated_by" : "Dist::Inkt::Profile::KJETILK version 0.101, CPAN::Meta::Converter version 2.150010", "keywords" : [ "Semantic Web" ], "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.204" }, "RDF::RDFa::Generator::HTML::Head" : { "file" : "lib/RDF/RDFa/Generator/HTML/Head.pm", "version" : "0.201_01" }, "RDF::RDFa::Generator::HTML::Hidden" : { "file" : "lib/RDF/RDFa/Generator/HTML/Hidden.pm", "version" : "0.201_01" }, "RDF::RDFa::Generator::HTML::Pretty" : { "file" : "lib/RDF/RDFa/Generator/HTML/Pretty.pm", "version" : "0.201_01" }, "RDF::RDFa::Generator::HTML::Pretty::Note" : { "file" : "lib/RDF/RDFa/Generator/HTML/Pretty/Note.pm", "version" : "0.201_01" } }, "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.204", "x_contributors" : [ "ZORAN " ], "x_serialization_backend" : "JSON::PP version 4.07", "x_static_install" : 1 } META.yml000644001750001750 363014565664017 16130 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.204--- 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::KJETILK version 0.101, CPAN::Meta::Converter version 2.150010' keywords: - 'Semantic Web' 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.204' RDF::RDFa::Generator::HTML::Head: file: lib/RDF/RDFa/Generator/HTML/Head.pm version: 0.201_01 RDF::RDFa::Generator::HTML::Hidden: file: lib/RDF/RDFa/Generator/HTML/Hidden.pm version: 0.201_01 RDF::RDFa::Generator::HTML::Pretty: file: lib/RDF/RDFa/Generator/HTML/Pretty.pm version: 0.201_01 RDF::RDFa::Generator::HTML::Pretty::Note: file: lib/RDF/RDFa/Generator/HTML/Pretty/Note.pm version: 0.201_01 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.204' x_contributors: - 'ZORAN ' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' x_static_install: 1 Makefile.PL000644001750001750 1617114565664017 16655 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.204use 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::KJETILK version 0.101, CPAN::Meta::Converter version 2.150010", "keywords" => ["Semantic Web"], "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.204 }, "RDF::RDFa::Generator::HTML::Head" => { file => "lib/RDF/RDFa/Generator/HTML/Head.pm", version => "0.201_01", }, "RDF::RDFa::Generator::HTML::Hidden" => { file => "lib/RDF/RDFa/Generator/HTML/Hidden.pm", version => "0.201_01", }, "RDF::RDFa::Generator::HTML::Pretty" => { file => "lib/RDF/RDFa/Generator/HTML/Pretty.pm", version => "0.201_01", }, "RDF::RDFa::Generator::HTML::Pretty::Note" => { file => "lib/RDF/RDFa/Generator/HTML/Pretty/Note.pm", version => "0.201_01", }, }, "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.204, "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; } } my $mm = WriteMakefile(%WriteMakefileArgs); exit(0); README000644001750001750 1544714565664017 15570 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.204NAME 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 Attean::QuadModel (where the graph name is not used) 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 Attean::QuadModel (where the graph name is not used) 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 Attean::QuadModel (where the graph name is not used) 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�� 17416�14565664017� 16347� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.204�����������������������������������������������������������������������������������������������������������������������������������������������=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.204'; 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 L<Attean::QuadModel> (where the graph name is not used) object providing the triples. Returns an L<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 L<XML::LibXML::Document> to inject, or a well-formed XML string. $model is an L<Attean::QuadModel> (where the graph name is not used) object providing the triples. Returns an L<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 L<XML::LibXML::Elements> to be added to a document. $model is an L<Attean::QuadModel> (where the graph name is not used) object providing the triples. If called in list context, returns a list of L<XML::LibXML::Element> objects which can be added to a document; otherwise returns an L<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 L<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�� 7154�14565664017� 16150� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.204�����������������������������������������������������������������������������������������������������������������������������������������������This file contains message digests of all files listed in MANIFEST, signed via the Module::Signature module, version 0.88. 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: RIPEMD160 SHA256 70b332734e128317bf833e25343f9f8fad635580e785a865b61dafe242b61350 COPYRIGHT SHA256 60e1f753aed7ab5b26f84972554478e3a3625c39bae6bd70b72fa512e103c0bd CREDITS SHA256 809a83434df4b222ceb24b2ae38cd3b47fd7a4de21db207d8dc406e2f40847f5 Changes SHA256 d309874bf3d89a9bf6e9df2306f038de7adffc1ae5bdf308700461d538c0b63f INSTALL SHA256 1b908af427d6061a92c449b81c28c55e5b4bc2673accf428055cc06de8705d1e LICENSE SHA256 f1448b8b8a150bd086f6f9e22c7c565ab1e18e803c6b8ed7375795b331044809 MANIFEST SHA256 792bdf5477ea105ec086bc53e2375b4f73190d1c08d23981a6346da4c4793044 META.json SHA256 6f4880f4c9894ba16d2a36391a491a7383f529ad20d8cceb3cad583a75b050f9 META.yml SHA256 d22d5b9b6ce2e0f429f7388d1d5754cf45d1af23598d186258df1ee1864491fa Makefile.PL SHA256 79357322173cc01b0a124347302d55e88af84f4659a880cc94012a6dbd62033f README SHA256 82b6b8636dee8ccca514aa12e40a3a99c83dc7b372224a66c8a51388afd9d883 README.pod SHA256 082dc69b21a55125ab75ced8921fe331bd396f040285b5f6ef9896fa60440f54 TODO SHA256 818a08c74bda7ce7cba8b94d452fbb5f5d924248b08f5b4e608234eb6ed70f99 dist.ini SHA256 bcfad3aefd5de4b3d4ed98f723a0db3b6a4118ef4511579a25044b28f6b019f9 doap.ttl SHA256 62b1f14c12a55dd9250cffd6f73616f1771684444758f4c35bc1845d6059f9b6 examples/example1-out.html SHA256 ffc1f118b83748c676528a677b0d6bc1df201ad04f83c0ac939258339e473778 examples/example1.css SHA256 af45445d8d4f03c12218a1ec23a15f152f6d62caa6412fccda729e044175e99e examples/example1.pl SHA256 82b6b8636dee8ccca514aa12e40a3a99c83dc7b372224a66c8a51388afd9d883 lib/RDF/RDFa/Generator.pm SHA256 f247f53696591ded0a1a97c456756996a8b98827c790957e0abb475a5d2f8265 lib/RDF/RDFa/Generator/HTML/Head.pm SHA256 244505a85ea0fdb422503a64be60ae82495a17f7b91a4865ba84f3919ec74845 lib/RDF/RDFa/Generator/HTML/Hidden.pm SHA256 88b3540a6e09a004526d2f2d8f57502af4645d3f7131f29e5d2bba790c2e1109 lib/RDF/RDFa/Generator/HTML/Pretty.pm SHA256 d8df6905b151c39cc9d330901187f44701ab4bc5b25a387d294e0d34c6f4f8b8 lib/RDF/RDFa/Generator/HTML/Pretty/Note.pm SHA256 997a2db7f7813ba0e12e9b57a7bb1ce7f92e3e6831a700157ece0b206ebfabf4 t/01basic.t SHA256 27f29515101d039ffa6b8fa761b368a786c7c2fe6e0d2c39314f5b44e9e432ec t/02_kk_namespaces.t SHA256 8a4500a30bc3be7f269388a7d8b6df81b876d11b766fe80c85e82e24d9586a19 t/03_kk_attean.t SHA256 41213a8cf98adf3f542626466488250c90ff5c166a69d4b83c1688c797781b9a t/uninit_lang_warning.t -----BEGIN PGP SIGNATURE----- iQIzBAEBAwAdFiEEDsyLxtCi6bk7pBcmf77o3zqeSqUFAmXXaA4ACgkQf77o3zqe SqU1eA//YaMNjuLJ/v1TOo1jMmYV+DnavmqmLSL4sp+C+MEIkRWjdcKPizo7w96T yfR+kBaYosjX3CX7ASA0Mcs6vRWAXeYXyZCtBb9Tbp6ztD1FLdDyOIWIBC3NAIfA UA7f0qKEeIMmkd6LsR9Hl90EDcr1QgzV3YtibvI70SPX+RD2gQLp2077s52n+1KR 1D8cB/dVeV2qYoNeltIJvun3ARhugNOWPAdzKL5HLyg9NEOq1eKVEJ1FDWFywiQJ ZhTf24jGpEBYiMjawGGS7RYyi1Aia5sm0MZaEv/LHmJXyax661qUYIR96Vil2oij 9/HCZ6Lb7XOvUA5H6IckHOlFUlvQesR+HSBKWVqh85W6DB3c6gdV/DMe8xO70tlk WGcnRTqULjq7f1vbEF/kxevLj0V9rIb3BR8UEKqds1a44QksCtwUqyY+jQBphdT1 03y5FsyRK0ndXhtJGhsKDq3lhyL1KMiLXo/LC/0CZrdm4o7xpHbAgY0cThDclalc 8I+kKUEfkDmdY6qoXgvDyCnDA4KPchhMGKSSepjewEiYKvo3OqOR4v5i5TFeieiO 8FqQI5xmtndWWunG8chZw1pB1lmDJsm/4WSxsCEaKQ0CG4C8RxmT5HsOPeU+yHpJ y9A6/VJXlgvXcLKHF3FVLVYFVpLH740sZfqgcbS+zN200b9cYXw= =+Eqz -----END PGP SIGNATURE----- ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������TODO������������������������������������������������������������������������������������������������000644��001750��001750�� 161�14565664017� 15323� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.204�����������������������������������������������������������������������������������������������������������������������������������������������* Add an Atom (DataRSS) generator. * More icons for HTML::Pretty. * Add links between resources in HTML::Pretty. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������dist.ini��������������������������������������������������������������������������������������������000644��001750��001750�� 104�14565664017� 16274� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.204�����������������������������������������������������������������������������������������������������������������������������������������������;;class='Dist::Inkt::Profile::KJETILK' ;;name='RDF-RDFa-Generator' ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doap.ttl��������������������������������������������������������������������������������������������000644��001750��001750�� 40673�14565664017� 16357� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.204�����������������������������������������������������������������������������������������������������������������������������������������������@prefix dc: <http://purl.org/dc/terms/> . @prefix doap: <http://usefulinc.com/ns/doap#> . @prefix doap-bugs: <http://ontologi.es/doap-bugs#> . @prefix doap-changeset: <http://ontologi.es/doap-changeset#> . @prefix doap-deps: <http://ontologi.es/doap-deps#> . @prefix foaf: <http://xmlns.com/foaf/0.1/> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix prov: <http://www.w3.org/ns/prov#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix types: <http://rdfs.org/sioc/types#> . @prefix wot: <http://xmlns.com/wot/0.1/> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <http://dbpedia.org/resource/Category:Semantic_Web> rdfs:label "Semantic Web"@en; dc:description "The Semantic Web is an extension of the current World Wide Web to enable wide data access and integration."@en. <http://dev.perl.org/licenses/> dc:title "the same terms as the perl 5 programming language system itself"; rdfs:comment "the same terms as the Perl 5 programming language system itself"@en. <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/project> a doap:Project; dc:contributor <http://purl.org/NET/cpan-uri/person/kjetilk>, <http://purl.org/NET/cpan-uri/person/tobyink>; doap-deps:develop-recommendation [ doap-deps:on "Dist::Inkt 0.001"^^doap-deps:CpanId ]; doap-deps:runtime-recommendation [ doap-deps:on "RDF::Prefixes"^^doap-deps:CpanId ], [ doap-deps:on "RDF::NS"^^doap-deps:CpanId ], [ doap-deps:on "Attean 0.019"^^doap-deps:CpanId ]; doap-deps:runtime-requirement [ doap-deps:on "RDF::NS::Curated 0.100"^^doap-deps:CpanId; ], [ doap-deps:on "perl 5.008"^^doap-deps:CpanId ], [ doap-deps:on "Data::Dumper"^^doap-deps:CpanId ], [ doap-deps:on "Icon::FamFamFam::Silk"^^doap-deps:CpanId; ], [ doap-deps:on "XML::LibXML 1.60"^^doap-deps:CpanId ], [ doap-deps:on "URI::NamespaceMap 1.06"^^doap-deps:CpanId; ]; doap-deps:runtime-suggestion [ doap-deps:on "RDF::Trine 0.112"^^doap-deps:CpanId ]; doap-deps:test-requirement [ doap-deps:on "Test::More 0.96"^^doap-deps:CpanId ], [ doap-deps:on "Test::Output"^^doap-deps:CpanId ], [ doap-deps:on "Test::Modern"^^doap-deps:CpanId ], [ doap-deps:on "Attean 0.019"^^doap-deps:CpanId ], [ doap-deps:on "RDF::Prefixes"^^doap-deps:CpanId ]; doap:bug-database <https://github.com/kjetilk/p5-rdf-rdfa-generator/issues>; doap:category <http://dbpedia.org/resource/Category:Semantic_Web>; doap:created "2010-05-05"^^xsd:date; doap:developer <http://purl.org/NET/cpan-uri/person/kjetilk>, <http://purl.org/NET/cpan-uri/person/tobyink>; doap:documenter <http://purl.org/NET/cpan-uri/person/tobyink>; doap:download-page <https://metacpan.org/release/RDF-RDFa-Generator>; doap:homepage <https://metacpan.org/release/RDF-RDFa-Generator>; doap:license <http://dev.perl.org/licenses/>; doap:maintainer <http://purl.org/NET/cpan-uri/person/kjetilk>, <http://purl.org/NET/cpan-uri/person/tobyink>; doap:name "RDF-RDFa-Generator"; doap:programming-language "Perl"; 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://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-204>; doap:repository [ a doap:GitRepository; doap:browse <https://github.com/kjetilk/p5-rdf-rdfa-generator>; prov:has_provenance <http://git2prov.org/git2prov?giturl=https://github.com/kjetilk/p5-rdf-rdfa-generator&serialization=PROV-O#>; ]; doap:security-contact <http://purl.org/NET/cpan-uri/person/kjetilk>; doap:shortdesc "Generate data for RDFa serialization"@en; doap:support-forum <irc://irc.perl.org/#perlrdf>; doap:tester <http://purl.org/NET/cpan-uri/person/tobyink>. <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-01> a doap:Version; rdfs:label "Original version"@en; dc:identifier "RDF-RDFa-Generator-0.01"^^xsd:string; dc:issued "2010-05-09"^^xsd:date; doap-changeset:released-by <http://purl.org/NET/cpan-uri/person/tobyink>; doap:file-release <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.01.tar.gz>; doap:revision "0.01"^^xsd:string. <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-02> a doap:Version; dc:identifier "RDF-RDFa-Generator-0.02"^^xsd:string; dc:issued "2010-05-18"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ rdfs:label "Using FamFamFam Silk icons."@en ], [ a doap-changeset:Addition; rdfs:label "HTML::Pretty can now include additional textual notes in the output. This functionality added for RDF::RDFa::Linter."@en; ]; ]; doap-changeset:released-by <http://purl.org/NET/cpan-uri/person/tobyink>; doap:file-release <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.02.tar.gz>; doap:revision "0.02"^^xsd:string. <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-03> a doap:Version; dc:identifier "RDF-RDFa-Generator-0.03"^^xsd:string; dc:issued "2010-05-19"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Bugfix; rdfs:label "HTML::Pretty Fallback to sorting by object now works."@en; ], [ a doap-changeset:Addition; rdfs:label "HTML::Pretty can now force safe HTML (prevents injection attacks)."@en; ]; ]; doap-changeset:released-by <http://purl.org/NET/cpan-uri/person/tobyink>; doap:file-release <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.03.tar.gz>; doap:revision "0.03"^^xsd:string. <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-04> a doap:Version; dc:identifier "RDF-RDFa-Generator-0.04"^^xsd:string; dc:issued "2010-05-21"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ rdfs:label "HTML::Hidden and HTML::Pretty now use @about instead of @src to set the subject URI."@en; ], [ rdfs:label "HTML::Pretty no longer makes 'javascript:' URLs into links."@en; ]; ]; doap-changeset:released-by <http://purl.org/NET/cpan-uri/person/tobyink>; doap:file-release <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.04.tar.gz>; doap:revision "0.04"^^xsd:string. <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-05> a doap:Version; dc:identifier "RDF-RDFa-Generator-0.05"^^xsd:string; dc:issued "2010-05-27"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Bugfix; rdfs:label "UTF-8 fixes."@en; ]; ]; doap-changeset:released-by <http://purl.org/NET/cpan-uri/person/tobyink>; doap:file-release <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.05.tar.gz>; doap:revision "0.05"^^xsd:string. <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-100> a doap:Version; dc:identifier "RDF-RDFa-Generator-0.100"^^xsd:string; dc:issued "2010-07-25"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Addition; rdfs:label "HTML::Pretty now includes cross-links to other resources."@en; ]; ]; doap-changeset:released-by <http://purl.org/NET/cpan-uri/person/tobyink>; doap:file-release <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.100.tar.gz>; doap:revision "0.100"^^xsd:string. <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-101> a doap:Version; dc:identifier "RDF-RDFa-Generator-0.101"^^xsd:string; dc:issued "2010-09-06"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Addition; rdfs:label "use RDF::Prefixes."@en; ], [ a doap-changeset:Addition; rdfs:label "Support 'namespaces' option for the constructor, for compatibility with other Trine serialisers."@en; ], [ a doap-changeset:Addition; rdfs:label "Icons for a few extra classes."@en; ]; ]; doap-changeset:released-by <http://purl.org/NET/cpan-uri/person/tobyink>; doap:file-release <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.101.tar.gz>; doap:revision "0.101"^^xsd:string. <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-102> a doap:Version; dc:identifier "RDF-RDFa-Generator-0.102"^^xsd:string; dc:issued "2011-07-06"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Bugfix; rdfs:label "<meta> element should name @name, not @nane."@en; doap-changeset:fixes [ doap-bugs:reporter <http://purl.org/NET/cpan-uri/person/kjetilk>; ]; ], [ a doap-changeset:Bugfix; rdfs:label "Namespaces in HTML::Head and HTML::Hidden."@en; doap-changeset:fixes [ doap-bugs:reporter <http://purl.org/NET/cpan-uri/person/kjetilk>; ]; ]; ]; doap-changeset:released-by <http://purl.org/NET/cpan-uri/person/tobyink>; doap:file-release <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.102.tar.gz>; doap:revision "0.102"^^xsd:string. <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-103> a doap:Version; dc:identifier "RDF-RDFa-Generator-0.103"^^xsd:string; dc:issued "2012-12-12"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Packaging; rdfs:label "Upgrade distribution build system."@en; ], [ a doap-changeset:Bugfix; rdfs:label "Fix strange buglet that affected RDF::RDFa::Linter."@en; ], [ rdfs:label "Drop common::sense and parent.pm deps."@en; ]; ]; doap-changeset:released-by <http://purl.org/NET/cpan-uri/person/tobyink>; doap:file-release <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/RDF-RDFa-Generator-0.103.tar.gz>; doap:revision "0.103"^^xsd:string. <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-106> a doap:Version; dc:identifier "RDF-RDFa-Generator-0.106"^^xsd:string; dc:issued "2017-12-22"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Packaging; rdfs:label "Upgrade distribution build system to Dist::Inkt."@en; ], [ a doap-changeset:Bugfix; rdfs:label "Prevent XML::LibXML::Element::setAttribute complaining about uninitialized value."@en; doap-changeset:blame <http://purl.org/NET/cpan-uri/person/zoran>; ], [ a doap-changeset:Packaging; rdfs:label "Many minor improvements in packaging."@en; ]; ]; doap-changeset:released-by <http://purl.org/NET/cpan-uri/person/kjetilk>; doap:file-release <http://backpan.cpan.org/authors/id/K/KJ/KJETILK/RDF-RDFa-Generator-0.106.tar.gz>; doap:revision "0.106"^^xsd:string. <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-192> a doap:Version; dc:identifier "RDF-RDFa-Generator-0.192"^^xsd:string; dc:issued "2017-12-22"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Addition; rdfs:label "Support Attean."@en; ], [ a doap-changeset:Addition; rdfs:label "More tests."@en; ], [ a doap-changeset:Change; rdfs:label "Many minor improvements."@en; ]; ]; doap-changeset:released-by <http://purl.org/NET/cpan-uri/person/kjetilk>; doap:file-release <http://backpan.cpan.org/authors/id/K/KJ/KJETILK/RDF-RDFa-Generator-0.192.tar.gz>; doap:revision "0.192"^^xsd:string. <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-200> a doap:Version; rdfs:label "Extensive changes to support both Attean and Trine. Backwards incompatible changes."@en; dc:identifier "RDF-RDFa-Generator-0.200"^^xsd:string; dc:issued "2018-02-11"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Removal; rdfs:label "Stop using the Trine API."@en; ], [ a doap-changeset:Addition; rdfs:label "Use the Attean API."@en; ], [ a doap-changeset:Removal; rdfs:label "Trine serialization methods are deprecated and will croak."@en; ], [ a doap-changeset:Change; rdfs:label "data_context takes an object as input."@en; ], [ a doap-changeset:Change; rdfs:label "Use URI::NamespaceMap for managing prefixes, RDF::Prefixes can be used through it."@en; ], [ a doap-changeset:Removal; rdfs:label "Remove serialization of plain literals as they don't exist in RDF 1.1."@en; ], [ a doap-changeset:Change; rdfs:label "Improve CURIE generation."@en; ], [ a doap-changeset:Addition; rdfs:label "Use RDF::NS::Curated for the canonical list of namespaces."@en; ], [ a doap-changeset:Change; rdfs:label "Improve the HTML of Pretty a bit."@en; ], [ a doap-changeset:Addition; rdfs:label "Many more tests."@en; ], [ a doap-changeset:Change; rdfs:label "Many minor improvements."@en; ]; ]; doap-changeset:released-by <http://purl.org/NET/cpan-uri/person/kjetilk>; doap:file-release <http://backpan.cpan.org/authors/id/K/KJ/KJETILK/RDF-RDFa-Generator-0.200.tar.gz>; doap:revision "0.200"^^xsd:string. <http://purl.org/NET/cpan-uri/dist/RDF-RDFa-Generator/v_0-204> a doap:Version; rdfs:label "Minor updates and transition to Github Actions for CI."@en; dc:identifier "RDF-RDFa-Generator-0.204"^^xsd:string; dc:issued "2024-02-22"^^xsd:date; doap-changeset:changeset [ doap-changeset:item [ a doap-changeset:Addition; rdfs:label "Use Github actions for CI."@en; ], [ a doap-changeset:Removal; rdfs:label "Remove Travis for CI."@en; ], [ a doap-changeset:Change; rdfs:label "Improve documentation."@en; ], [ a doap-changeset:Changes; rdfs:label "Some minor changes."@en; ]; ]; doap-changeset:released-by <http://purl.org/NET/cpan-uri/person/kjetilk>; doap:file-release <http://backpan.cpan.org/authors/id/K/KJ/KJETILK/RDF-RDFa-Generator-0.204.tar.gz>; doap:revision "0.204"^^xsd:string. <http://purl.org/NET/cpan-uri/person/kjetilk> a foaf:Person; foaf:mbox <mailto:kjetilk@cpan.org>; foaf:name "Kjetil Kjernsmo"; foaf:nick "KJETILK", "KjetilK", "kjetilk"; foaf:page <https://metacpan.org/author/KJETILK>; 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>, <https://solid.kjernsmo.net/profile/card#me>; rdfs:seeAlso <http://www.kjetil.kjernsmo.net/foaf>; wot:hasKey _:B1. <http://purl.org/NET/cpan-uri/person/tobyink> a foaf:Person; doap:mbox <mailto:tobyink@cpan.org>; doap:name "Toby Inkster"; doap:page <https://metacpan.org/author/TOBYINK>; foaf:mbox <mailto:tobyink@cpan.org>; foaf:name "Toby Inkster"; foaf:nick "TOBYINK"; foaf:page <https://metacpan.org/author/TOBYINK>; owl:sameAs <http://git2prov.org/git2prov?giturl=https://github.com/kjetilk/p5-rdf-rdfa-generator&serialization=PROV-O#user-Toby-Inkster>. <http://purl.org/NET/cpan-uri/person/zoran> a foaf:Person; foaf:nick "ZORAN"; foaf:page <https://metacpan.org/author/ZORAN>. <http://www.kjetil.kjernsmo.net/foaf#me> a foaf:Person; foaf:homepage <http://kjetil.kjernsmo.net/>; foaf:mbox <mailto:kjetilk@cpan.org>; foaf:name "Kjetil Kjernsmo"; foaf:nick "KjetilK"; owl:sameAs <http://purl.org/NET/cpan-uri/person/kjetilk>, <https://solid.kjernsmo.net/profile/card#me>; rdfs:seeAlso <http://www.kjetil.kjernsmo.net/foaf>, <https://solid.kjernsmo.net/profile/card>; wot:hasKey _:B1. <irc://irc.perl.org/#perlrdf> a types:ChatChannel; dc:title "The Perl and RDF IRC channel"@en. _:B1 a wot:PubKey; wot:fingerprint "0ECC8BC6D0A2E9B93BA417267FBEE8DF3A9E4AA5". ���������������������������������������������������������������������example1-out.html�����������������������������������������������������������������������������������000644��001750��001750�� 7456�14565664017� 21716� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.204/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�14565664017� 20717� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.204/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�14565664017� 20541� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.204/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�� 233�14565664017� 16505� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.204/t���������������������������������������������������������������������������������������������������������������������������������������������use Test::More tests => 1; BEGIN { use_ok('RDF::RDFa::Generator') }; diag( "Testing RDF::RDFa::Generator $RDF::RDFa::Generator::VERSION, Perl $], $^X" ); ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������02_kk_namespaces.t����������������������������������������������������������������������������������000644��001750��001750�� 12577�14565664017� 20446� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.204/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�14565664017� 17555� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.204/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�14565664017� 21340� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.204/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�� 17416�14565664017� 21127� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.204/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.204'; 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 L<Attean::QuadModel> (where the graph name is not used) object providing the triples. Returns an L<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 L<XML::LibXML::Document> to inject, or a well-formed XML string. $model is an L<Attean::QuadModel> (where the graph name is not used) object providing the triples. Returns an L<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 L<XML::LibXML::Elements> to be added to a document. $model is an L<Attean::QuadModel> (where the graph name is not used) object providing the triples. If called in list context, returns a list of L<XML::LibXML::Element> objects which can be added to a document; otherwise returns an L<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 L<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�� 14246�14565664017� 22532� 0����������������������������������������������������������������������������������������������������ustar�00kjetil��������������������������kjetil��������������������������000000��000000��RDF-RDFa-Generator-0.204/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.201_01'; 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 374514565664017 23046 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.204/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.201_01'; 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 3733314565664017 23162 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.204/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.201_01'; 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 424114565664017 24037 0ustar00kjetilkjetil000000000000RDF-RDFa-Generator-0.204/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.201_01'; =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