05 Jul 2012 21:32:18 UTC
- Distribution: HTML-Microformats
- Module version: 0.105
- Source (raw)
- Browse (raw)
- How to Contribute
- Clone repository
- Issues (5)
- Testers (556 / 78 / 18)
- KwaliteeBus factor: 1
- % Coverage
- License: perl_5
- Perl: v5.10.0
- Download (145.25KB)
- MetaCPAN Explorer
- Subscribe to distribution
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- This version
- Latest version
- RDF OUTPUT
- SEE ALSO
- COPYRIGHT AND LICENCE
- DISCLAIMER OF WARRANTIES
HTML::Microformats::Format::OpenURL_COinS - the OpenURL COinS poshformat
use HTML::Microformats::DocumentContext; use HTML::Microformats::Format::OpenURL_COinS; use Data::Dumper; my $context = HTML::Microformats::DocumentContext->new($dom, $uri); my @objects = HTML::Microformats::Format::OpenURL_COinS->extract_all( $dom->documentElement, $context); my $object = $objects; print Dumper($object->data);
HTML::Microformats::Format::OpenURL_COinS inherits from HTML::Microformats::Format. See the base class definition for a description of property getter/setter methods, constructors, etc.
OpenURL COinS is not technically a microformat. It was developed outside the microformats community and does not use many of the patterns developed by that community. Nevertheless it's an interesting format, and perhaps a useful one.
HTML::Microformats::Format::OpenURL_COinS supports COinS as described at http://ocoins.info/, with the following addition:
Support for additional elements and attributes
OpenURL COinS is only specified to work on <span> elements. This module allows its use on arbitrary HTML elements. When used with <q> or <blockquote> the 'cite' attribute is consulted in preference to 'title'; when used with <link>, <a> or <area>, 'href' is used in preference to 'title'.
When either of the 'cite' or 'href' attributes is used, any leading string ending with a question mark is removed from the attribute value prior to OpenURL processing. This allows for the attibute values to be published as proper links.
When <q> or <blockquote> is used, the quote is taken to be sourced from the entity described by the context object.
Like how HTML::Microformats::Format::hCard differentiates between the business card and the entity represented by the card, this module differentiates between the OpenURL context object and the book, journal entry or other publication represented by it. The former is essentially a set of search parameters which can be used to find the latter.
The RSS Context module (http://www.openurl.info/registry/fmt/xml/rss10/ctx#) is used to describe the context object. The Bibo ontology (http://purl.org/ontology/bibo/) and Dublin Core (http://purl.org/dc/terms/) are used to describe the work itself, with data being "back-projected" from the context object where not too complicated.
Please report any bugs to http://rt.cpan.org/.
Toby Inkster <firstname.lastname@example.org>.
Copyright 2008-2012 Toby Inkster
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Module Install Instructions
To install HTML::Microformats, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install HTML::Microformats
For more information on module installation, please visit the detailed CPAN module installation guide.
|s||Focus search bar|
|?||Bring up this help dialog|
|g p||Go to pull requests|
|g i||go to github issues (only if github is preferred repository)|
|g a||Go to author|
|g c||Go to changes|
|g i||Go to issues|
|g d||Go to dist|
|g r||Go to repository/SCM|
|g s||Go to source|
|g b||Go to file browse|