A microsummary generator is an XML document that describes how to pull specific information from a web page to be presented in summary form as a bookmark whose title changes based on the content of the page it targets.
This article provides detailed information about the XML grammar used to build microsummary generators, describing each element and their attributes. For an introduction to how to create a microsummary, read the article Creating a Microsummary.
<generator> element is the root tag for all microsummary generators, and should contain the remainder of the XML code describing the generator.
It has the following attributes:
- A descriptive, human-readable name for the microsummary created by the generator.
- A valid URI uniquely identifying the generator. Only relevant for generators dynamically created by Firefox code and extensions. Generators installed from the web via
nsSidebar::addMicrosummaryGeneratorare identified by the remote URL from which they were downloaded, and Firefox ignores the value of this attribute for them.
<pages> element brackets a list of web page URIs that define pages that should and should not be summarized by the generator. This is done by using
<exclude> elements, contained within the
<exclude> are defined as follows:
The uri may be specified using regular expressions, if you wish. See the article Creating regular expressions for a microsummary generator for an explanation of how to use regular expressions in microsummary generators.
You may include as many
<exclude> elements as you wish in the
<update> element lets the generator specify values describing how often Firefox should check to see if there's a newer version of the generator, as well as where to look for the update. The following attributes are available:
- The time interval, in minutes, that should elapse between looking for an updated version of the generator. The interval must be at least 1 minute. The interval can include a fractional part (such as 5.5 minutes), although that's not necessarily useful.
Microsummaries are checked to see if it's time to refresh them every 15 seconds, so it's possible that the refresh may take place as much as 15 seconds later than the specified interval.
Conditional update intervals
If you wish to provide conditions under which the update interval can vary, you can do so by placing
<condition> tags inside the
<interval> section. These have the following syntax:
<condition> expression="expr" interval="interval"</condition<>>
- An XPath Boolean expression to evaluate. If it evaluates to
true, the given
- The interval to apply if expr evaluates to
<template> element is used to wrap a set of XSLT transform sheets that do the job of translating the document contents into the format to be displayed in the microsummary. It has the following attributes:
- Defines the node of the document to which the transform should be applied.
<template> tag should contain the XSLT transform.