views_rss_dc.module in Views RSS 7.2
Same filename and directory in other branches
Provides Dublin Core namespace and <item> elements for Views RSS module.
File
modules/views_rss_dc/views_rss_dc.moduleView source
<?php
/**
* @file
* Provides Dublin Core namespace and <item> elements for Views RSS module.
*/
/**
* Implements hook_views_rss_namespaces().
*/
function views_rss_dc_views_rss_namespaces() {
$namespaces['dc'] = array(
'prefix' => 'xmlns',
'uri' => 'http://purl.org/dc/elements/1.1/',
);
return $namespaces;
}
/**
* Implements hook_views_rss_item_elements().
*/
function views_rss_dc_views_rss_item_elements() {
$elements['dc:title'] = array(
'description' => t('A name given to the resource. Typically, a Title will be a name by which the resource is formally known.'),
'help' => 'http://dublincore.org/documents/1999/07/02/dces/#title',
);
$elements['dc:creator'] = array(
'description' => t('An entity primarily responsible for making the content of the resource. Examples of a Creator include a person, an organisation, or a service. Typically, the name of a Creator should be used to indicate the entity.'),
'help' => 'http://dublincore.org/documents/1999/07/02/dces/#creator',
);
$elements['dc:subject'] = array(
'description' => t('The topic of the content of the resource. Typically, a Subject will be expressed as keywords, key phrases or classification codes that describe a topic of the resource. Recommended best practice is to select a value from a controlled vocabulary or formal classification scheme.'),
'help' => 'http://dublincore.org/documents/1999/07/02/dces/#subject',
);
$elements['dc:description'] = array(
'description' => t('An account of the content of the resource. Description may include but is not limited to: an abstract, table of contents, reference to a graphical representation of content or a free-text account of the content.'),
'preprocess functions' => array(
'views_rss_rewrite_relative_paths',
),
'help' => 'http://dublincore.org/documents/1999/07/02/dces/#description',
);
$elements['dc:publisher'] = array(
'description' => t('An entity responsible for making the resource available. Examples of a Publisher include a person, an organisation, or a service. Typically, the name of a Publisher should be used to indicate the entity.'),
'help' => 'http://dublincore.org/documents/1999/07/02/dces/#publisher',
);
$elements['dc:contributor'] = array(
'description' => t('An entity responsible for making contributions to the content of the resource. Examples of a Contributor include a person, an organisation, or a service. Typically, the name of a Contributor should be used to indicate the entity.'),
'help' => 'http://dublincore.org/documents/1999/07/02/dces/#contributor',
);
$elements['dc:date'] = array(
'description' => t('A date associated with an event in the life cycle of the resource. Typically, Date will be associated with the creation or availability of the resource. Recommended best practice for encoding the date value is defined in a profile of <a href="@formats_url">ISO 8601</a> and follows the YYYY-MM-DD format.', array(
'@formats_url' => url('http://www.w3.org/TR/NOTE-datetime'),
)),
'help' => 'http://dublincore.org/documents/1999/07/02/dces/#date',
);
$elements['dc:type'] = array(
'description' => t('The nature or genre of the content of the resource. Type includes terms describing general categories, functions, genres, or aggregation levels for content. Recommended best practice is to select a value from a controlled vocabulary (for example, the working draft list of <a href="@core_types_url">Dublin Core Types</a>). To describe the physical or digital manifestation of the resource, use the FORMAT element.', array(
'@core_types_url' => url('http://dublincore.org/documents/dcmi-type-vocabulary/'),
)),
'help' => 'http://dublincore.org/documents/1999/07/02/dces/#type',
);
$elements['dc:format'] = array(
'description' => t('The physical or digital manifestation of the resource. Typically, Format may include the media-type or dimensions of the resource. Format may be used to determine the software, hardware or other equipment needed to display or operate the resource. Examples of dimensions include size and duration. Recommended best practice is to select a value from a controlled vocabulary (for example, the list of <a href="@types_url">Internet Media Types</a> defining computer media formats).', array(
'@types_url' => url('http://www.isi.edu/in-notes/iana/assignments/media-types/media-types'),
)),
'help' => 'http://dublincore.org/documents/1999/07/02/dces/#format',
);
$elements['dc:identifier'] = array(
'description' => t('An unambiguous reference to the resource within a given context. Recommended best practice is to identify the resource by means of a string or number conforming to a formal identification system. Example formal identification systems include the Uniform Resource Identifier (URI) (including the Uniform Resource Locator (URL)), the Digital Object Identifier (DOI) and the International Standard Book Number (ISBN).'),
'help' => 'http://dublincore.org/documents/1999/07/02/dces/#identifier',
);
$elements['dc:source'] = array(
'description' => t('A Reference to a resource from which the present resource is derived. The present resource may be derived from the Source resource in whole or in part. Recommended best practice is to reference the resource by means of a string or number conforming to a formal identification system.'),
'help' => 'http://dublincore.org/documents/1999/07/02/dces/#source',
);
$elements['dc:language'] = array(
'description' => t("A language of the intellectual content of the resource. Recommended best practice for the values of the Language element is defined by <a href='@RFC1766_url'>RFC 1766</a> which includes a two-letter Language Code (taken from the <a href='@ISO639_url'>ISO 639 standard</a>), followed optionally, by a two-letter Country Code (taken from the <a href='@ISO3166_url'>ISO 3166 standard</a>). For example, 'en' for English, 'fr' for French, or 'en-uk' for English used in the United Kingdom.", array(
'@RFC1766_url' => url('http://www.ietf.org/rfc/rfc1766.txt'),
'@ISO639_url' => url('http://www.oasis-open.org/cover/iso639a.html'),
'@ISO3166_url' => url('http://www.oasis-open.org/cover/iso639a.html'),
)),
'help' => 'http://dublincore.org/documents/1999/07/02/dces/#language',
);
$elements['dc:relation'] = array(
'description' => t('A reference to a related resource. Recommended best practice is to reference the resource by means of a string or number conforming to a formal identification system.'),
'help' => 'http://dublincore.org/documents/1999/07/02/dces/#relation',
);
$elements['dc:coverage'] = array(
'description' => t('The extent or scope of the content of the resource. Coverage will typically include spatial location (a place name or geographic coordinates), temporal period (a period label, date, or date range) or jurisdiction (such as a named administrative entity). Recommended best practice is to select a value from a controlled vocabulary (for example, the Thesaurus of Geographic Names) and that, where appropriate, named places or time periods be used in preference to numeric identifiers such as sets of coordinates or date ranges.'),
'help' => 'http://dublincore.org/documents/1999/07/02/dces/#coverage',
);
$elements['dc:rights'] = array(
'description' => t('Information about rights held in and over the resource. Typically, a Rights element will contain a rights management statement for the resource, or reference a service providing such information. Rights information often encompasses Intellectual Property Rights (IPR), Copyright, and various Property Rights. If the Rights element is absent, no assumptions can be made about the status of these and other rights with respect to the resource.'),
'help' => 'http://dublincore.org/documents/1999/07/02/dces/#rights',
);
return $elements;
}
Functions
Name | Description |
---|---|
views_rss_dc_views_rss_item_elements | Implements hook_views_rss_item_elements(). |
views_rss_dc_views_rss_namespaces | Implements hook_views_rss_namespaces(). |