1. Using XSLT

The Urchin::OutputFeed::XSLT module uses the Perl XML::XSLT module to execute the transformation.

Your XSL file should be expecting to transform an RSS 1.0 XML file. In addition to the RSS item, link and description elements, the following additional elements may be present:

Dublin Core metadata

xmlns:dc="http://purl.org/dc/elements/1.1/"

At the item level:

dc:creator – present if a dc:creator element was given in the input RSS feed for this item
dc:date – the item's publication date (in W3CDTF)

At the channel level:

dc:date – the time (in W3CDTF) that the output was generated

Aggregation metadata

xmlns:ag="http://purl.org/rss/modules/aggregation/"

At the item level:

ag:source – the title of the channel from which the item was drawn
ag:timestamp – the time (in W3CDTF) that the item's parent channel was last refreshed by Urchin
ag:sourceURL – the link of the channel from which the item was drawn

Urchin metadata

xmlns:urchin="http://nurture.nature.com/2003/03/urchin#"

At the item level:

urchin:sourceResource – the URL of the RSS feed from which this item was extracted
urchin:channel_id – the internal Urchin channel ID for this item's parent channel
urchin:item_id – the internal Urchin item ID for this item. An urchin:channel_id and urchin:item_id together uniquely identify an item
urchin:current_ind – has the value 'true' if this item was in its parent feed the last time that channel was updated by Urchin. Otherwise has the value 'false'.
urchin:new_ind – has the value 'true' if this item was new in its parent feed the last time that channel was updated by Urchin. Otherwise has the value 'false'.
urchin:inserted_on – date that this item was inserted into the Urchin database.

At the channel level:

urchin:database – the Urchin database that is being queried.
urchin:query – the search string used to generate this output feed.
urchin:query_prefix – possible prefix to the search string which can be set programmatically.
urchin:query_suffix – possible suffix to the search string which can be set programmatically.
urchin:query_type – denotes the kind of query that is performed - possible values are 'Urchin' for native Urchin search syntax, 'RCQL' for RDF Core Query Language search syntax, and 'SQL' for SQL search syntax

See simple.xsl for an example XSL file.

2. Using HTML::Template

Currently, the following variables are available to an HTML::Template template file:

The values correspond to those that would be present in an equivalent RSS output from Urchin. For example, channel_title would have a value like "Urchin Query: foo NEW".

channel_title
channel_link
channel_description
items - a list of the items in the output
item_title
item_link
item_description

See simple.tmpl for an example file.