OPML

From IndieWeb

OPML stands for Outline Processor Markup Language, an XML-based format and defacto standard used for feed lists interchange.

Silo Examples

Examples of silos that allow importing and exporting OPML files.

YouTube

YouTube allows people to export their subscriptions as an OPML file, which can then be used to subscribe any news reader to the channels they are subscribed to.

Feed Readers

Many silo-based feed readers support OPML import/export as well as OPML subscription.

IndieWeb Examples

If you want to show to the world who you follow, you can share an opml file on your website.

Tools

XSL (making an OPML file look like HTML)

XSL is an XML extension that allows on the fly transformation of an XML document. It can be used to present an XML file - on this case, an OPML file - it a human readable, HTML-looking format.

Example:

<?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:template match="/opml">
            <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
                <head>
                    <title><xsl:value-of select="head/title"/></title>
                    <style type="text/css">
                    </style>
                </head>
                <body>
                    <h1><xsl:value-of select="head/title"/></h1>
                    <p><time><xsl:value-of select="head/dateCreated"/></time></p>
                    <xsl:apply-templates select="body/outline"/>
                </body>
            </html>
        </xsl:template>
        <xsl:template match="outline" xmlns="http://www.w3.org/1999/xhtml">
            <xsl:choose>
                <xsl:when test="@type">
                    <xsl:choose>
                        <xsl:when test="@xmlUrl">
                            <li>
                                <a href="{@htmlUrl}"><xsl:value-of select="@text"/></a>
                            </li>
                        </xsl:when>
                        <xsl:otherwise>
                            <li>
                                <a href="{@url}"><xsl:value-of select="@text"/></a>
                            </li>
                        </xsl:otherwise>
                    </xsl:choose>
                </xsl:when>
                <xsl:otherwise>
                    <details open="open">
                        <summary>
                            <xsl:value-of select="@text"/>
                        </summary>
                        <ul>
                            <xsl:apply-templates select="outline"/>
                        </ul>
                    </details>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:template>
    </xsl:stylesheet>

It needs to be inserted in the OPML as:

   <?xml-stylesheet type="text/xsl" href="https://example.com/following.xsl"?>

following the `<?xml` definition, and can be styles with ordinary CSS within the `<style></style>` block.

Brainstorming

In the context of IndieWeb, the idea of OPML could be interesting as a representation of whom you follow. Since it is supported by a variety of sources, It could be a good candidate to solve the "how do you discover people" question.

The advantage of using OPML is its support, however, like RSS, the standard has some limitations.

Some feed readers also support OPML subscriptions which allow users to subscribe to hosted copies of OPML files. Any changes to the OPML file are synced with the reader as new sources are added. (Compare this with importing a static OPML file that will never change.) Examples:

Alternative: publish a visible blogroll on the home page or somewhere on your site and mark it up with XFN.

See Also