Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Microsummaries: Definitions

1 view
Skip to first unread message

Myk Melez

unread,
Apr 3, 2006, 5:09:58 PM4/3/06
to
[part of the Microsummaries proposal; posted here for discussion]

Microsummary Definitions

Microsummaries can either be extracted from an RSS/Atom feed or
generated by processing an XSLT stylesheet against the page being
summarized. In the latter case, the XSLT stylesheet and the pages to
which it applies are provided by a microsummary definition.

A microsummary definition is a set of instructions for generating
microsummaries. Definitions are expressed via an XML dialect with the
namespace http://www.mozilla.org/microsummaries/0.1. A definition
consists of a <definition> tag containing the following attributes and
child elements:

* an "id" attribute that uniquely identifies the definition.
The recommended format for the attribute is
@[author]/[site]/[name], where [author] identifies the developer
of the definition, [site] identifies the site to which the
definition applies, and [name] describes the definition,
for example: @mozilla.org/bbc.co.uk/latest-headline;

* a "name" attribute that identifies the definition to users,
f.e. Latest BBC Headline;

* a <pages> child element with one or more <include>/<exclude>
child elements containing regular expressions that identify
the URIs to which the definition applies. URIs are excluded
by default and must be explicitly included to apply.

* a <template> element containing an XSLT stylesheet which generates
a microsummary from a page. The stylesheet can generate not only
text but also HTML, graphics, and other rich content.

[Should a definition also contain an update interval or timeout
specifying how often to update microsummaries or when to update them
next? How should this interval/timeout be specified? Is it worth
enabling complex specifications like "update every five minutes from
9:30am-4pm EST and not at all otherwise" for an NYSE stock quote?]

Here is an example microsummary definition:

<definition xmlns="http://www.mozilla.org/microsummaries/0.1"
id="@mozilla.org/bbc.co.uk/latest-headline;1"
name="Latest BBC Headline">

<pages>

<include>^http://(www\.)?bbc\.co\.uk/$</include>

</pages>

<template>

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

<xsl:output method="text"/>

<xsl:template match="/">
<xsl:text>BBC: </xsl:text>
<xsl:value-of
select="normalize-space(id('rightColTable')/div/table[1]/tbody/tr/td[2]/table[2]/tbody/tr/td[3]/div[1]/a)"/>
</xsl:template>

</xsl:transform>

</template>

</definition>

0 new messages