{rss2html:rss_url:number:format}

Description

Fetches a remote RSS feed over HTTP and renders its items as HTML. The first parameter is the feed URL; because a colon is the AA parameter separator, write the scheme with a hashed colon - http#:// or https#:// - so the URL is not split. The optional second parameter caps how many items are shown, counted from the top of the feed; 0, empty, or a non-numeric value shows all items. The optional third parameter is an XSLT per-item template applied to each feed item: inside it use an attribute-value template like href="..." for attribute values and an xsl value-of element for text, where the RSS item children - title, link, description, pubDate, ... - are the available fields. With no template the feed is rendered as an unordered list of links: each item becomes a list element wrapping an anchor whose text is the item title and whose href is the item link. The feed is loaded with DomDocument and transformed by an XSLT processor (libxml/xsl, enabled by default on the supported PHP). An empty URL, an unreachable feed, or a transform that yields no output returns an empty string and logs a warning rather than raising an error. The feed is fetched on every render, so the output depends on the live remote source and the network; wrap the result in convert to change its encoding.

Parameters

rss_url required

Remote RSS feed URL to fetch and render. A colon is the AA parameter separator, so escape the scheme colon as http#:// or https#://. An empty URL returns an empty string and logs a warning.

number optional default empty (shows all items)

Maximum number of feed items to show, counted from the top of the feed. 0, empty, or a non-numeric value shows all items.

format optional default empty (default unordered list of title links)

XSLT per-item template applied to each feed item. Use an attribute-value template such as href="..." inside attribute values and an xsl value-of element for text content; the RSS item children (title, link, description, pubDate, ...) are the available fields. Empty renders the default unordered list of title links.

Examples

virtual{rss2html:https#://sourceforge.net/p/apc-aa/svn/feed:5:{-<div><a href="{link}"><xsl:value-of select="title"/></a></div>}}
The third parameter is an XSLT template applied to each feed item, replacing the default list. Inside it, href="{link}" is an attribute-value template that drops in the items link and xsl value-of prints the title. IMPORTANT: the template contains curly braces, which AA would try to expand as its own commands and corrupt the stylesheet (this raises a fatal error on some installs). Wrap the whole template in {-...} so AA passes it through literally, exactly as shown.
test[{rss2html:}]
Expected[]
Actual[]
With no feed URL the command logs a warning and returns an empty string - shown here wrapped in brackets so the empty result is visible. This is the only deterministic case; every real feed depends on the live remote source.
virtual{rss2html:https#://sourceforge.net/p/apc-aa/svn/feed}
The single most common mistake: forgetting to escape the colon in the URL. A colon is the AA parameter separator, so https://host/feed would be read as URL=https, number=//host/feed - and the feed never loads. Always write the scheme as http#:// or https#://; AA strips the hash before fetching. The feed above loads correctly precisely because of the hashed colon.
virtual{rss2html:https#://sourceforge.net/p/apc-aa/svn/feed:5}
virtual{convert:{rss2html:https#://sourceforge.net/p/apc-aa/svn/feed:5}:utf-8:windows-1250}
virtual{rss2html:https#://sourceforge.net/p/apc-aa/svn/feed}
The first parameter is the feed URL. Note the hashed colon https#:// - a plain colon would be read as a parameter separator and split the URL. With only a URL the feed renders as an unordered list: each item becomes a list element wrapping an anchor whose text is the item title and href is the item link. The live feed here is the APC-AA source repository, so the output is whatever its latest commits are - which is why this example is illustrative, not a fixed test.