Atom Feeds

Wikipedia : Atom (web standard)

W3C : Introduction to Atom

XSL file – “case-study-feeds/atom.xsl”
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" version="1.0" exclude-result-prefixes="atom">

    <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:include href="../../plugins/tenandtwo-xslt-processor/xsl/date.xsl"/>

    <!-- main -->
    <xsl:template match="/">
        <xsl:apply-templates select="atom:feed"/>
    </xsl:template>

    <!-- feed -->
    <xsl:template match="atom:feed">
        <!-- header -->
        <h3><xsl:value-of select="atom:title"/></h3>
        <h5><xsl:value-of select="atom:subtitle"/></h5>

        <!-- body -->
        <xsl:apply-templates select="atom:entry"/>

        <!-- footer -->
        <hr size="1"/>
        <div>
            <xsl:text>Updated : </xsl:text>
            <time>
                <xsl:attribute name="datetime"><xsl:value-of select="atom:updated"/></xsl:attribute>
                <xsl:call-template name="date-format">
                    <xsl:with-param name="value" select="atom:updated"/>
                    <xsl:with-param name="format" select="'Y-m-d h:i A'"/>
                </xsl:call-template>
            </time>

            <xsl:for-each select="atom:author/*">  <!-- name, email, uri -->
                <br/>
                <xsl:text>Author : </xsl:text>
                <xsl:value-of select="text()"/>
            </xsl:for-each>

            <xsl:if test="string-length(atom:link[@rel='alternate']/@href) &gt; 0">
                <br/>
                <a target="_blank">
                    <xsl:attribute name="href"><xsl:value-of select="atom:link[@rel='alternate']/@href"/></xsl:attribute>
                    <xsl:text>Visit Website →</xsl:text>
                </a>
            </xsl:if>
        </div>
    </xsl:template>

    <!-- entry -->
    <xsl:template match="atom:entry">
        <hr size="1"/>
        <h5>
            <time>
                <xsl:attribute name="datetime"><xsl:value-of select="atom:updated"/></xsl:attribute>
                <xsl:call-template name="date-format">
                    <xsl:with-param name="value" select="atom:updated"/>
                    <xsl:with-param name="format" select="'Y-m-d h:i A'"/>
                </xsl:call-template>
            </time>
        </h5>
        <h4>
            <a target="_blank">
                <xsl:attribute name="href">
                    <xsl:choose>
                        <xsl:when test="string-length(atom:link[@rel='alternate']/@href) &gt; 0">
                            <xsl:value-of select="atom:link[@rel='alternate']/@href"/>
                        </xsl:when>
                        <xsl:when test="string-length(atom:link/@href) &gt; 0">
                            <xsl:value-of select="atom:link/@href"/>
                        </xsl:when>
                        <xsl:otherwise><xsl:value-of select="atom:id"/></xsl:otherwise>
                    </xsl:choose>
                </xsl:attribute>
                <xsl:value-of disable-output-escaping="yes" select="atom:title"/>
            </a>
        </h4>
        <div>
            <xsl:choose>
                <xsl:when test="string-length(.//atom:content) &gt; 0">
                    <xsl:value-of disable-output-escaping="yes" select=".//atom:content"/>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of disable-output-escaping="yes" select=".//atom:summary"/>
                </xsl:otherwise>
            </xsl:choose>
        </div>
    </xsl:template>

</xsl:stylesheet><!-- end atom.xsl -->
<!--
<feed 
xmlns="http://www.w3.org/2005/Atom" 
xmlns:cap="urn:oasis:names:tc:emergency:cap:1.2"
>
    <id>https://api.weather.gov/alerts.atom?area%5B0%5D=OR&amp;active=1</id>
    <generator>NWS CAP Server</generator>
    <updated>2026-10-16T22:25:44+00:00</updated>
    <author>
        <name>w-nws.webmaster@noaa.gov</name>
    </author>
    <title>Current watches, warnings, and advisories for Oregon</title>
    <link rel="self" href="https://api.weather.gov/alerts.atom?area%5B0%5D=OR&amp;active=1">
    <entry>
        <id>https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.16f35b10efa34c7e48c0e6783f04b7991761b3f4.001.1</id>
        <link rel="alternate" href="https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.16f35b10efa34c7e48c0e6783f04b7991761b3f4.001.1.cap">
        <updated>2026-10-16T12:54:00-07:00</updated>
        <published>2026-10-16T12:54:00-07:00</published>
        <author>
            <name>NWS</name>
        </author>
        <title>Special Weather Statement issued October 16 at 12:54PM PDT by NWS Pendleton OR</title>
        <summary>Breezy to locally windy conditions will bring patchy to localized
areas of blowing dust across the Grande Ronde Valley through this
evening. Prepare for sudden changes in visibility along roadways
and on interstate 84.</summary>
        <cap:event>Special Weather Statement</cap:event>
        <cap:sent>2026-10-16T12:54:00-07:00</cap:sent>
        <cap:effective>2026-10-16T12:54:00-07:00</cap:effective>
        <cap:onset>2026-10-16T12:54:00-07:00</cap:onset>
        <cap:expires>2026-10-16T19:00:00-07:00</cap:expires>
        <cap:status>Actual</cap:status>
        <cap:msgtype>Alert</cap:msgtype>
        <cap:category>Met</cap:category>
        <cap:urgency>Expected</cap:urgency>
        <cap:severity>Moderate</cap:severity>
        <cap:certainty>Observed</cap:certainty>
        <cap:areadesc>Grande Ronde Valley</cap:areadesc>
        <cap:polygon>
        <cap:geocode>
            <valuename>SAME</valuename>
            <value>041061</value>
        </cap:geocode>
        <cap:geocode>
            <valuename>UGC</valuename>
            <value>ORZ049</value>
        </cap:geocode>
        <cap:parameter>
            <valuename>AWIPSidentifier</valuename>
            <value>SPSPDT</value>
        </cap:parameter>
        <cap:parameter>
            <valuename>WMOidentifier</valuename>
            <value>WWUS86 KPDT 161954</value>
        </cap:parameter>
        <cap:parameter>
            <valuename>BLOCKCHANNEL</valuename>
            <value>EAS</value>
        </cap:parameter>
        <cap:parameter>
            <valuename>BLOCKCHANNEL</valuename>
            <value>NWEM</value>
        </cap:parameter>
        <cap:parameter>
            <valuename>BLOCKCHANNEL</valuename>
            <value>CMAS</value>
        </cap:parameter>
        <cap:parameter>
            <valuename>EAS-ORG</valuename>
            <value>WXR</value>
        </cap:parameter>
        <cap:scope>Public</cap:scope>
        <cap:code>IPAWSv1.0</cap:code>
        <cap:language>en-US</cap:language>
        <cap:web>http://www.weather.gov</cap:web>
        <cap:eventcode>
            <valuename>SAME</valuename>
            <value>SPS</value>
        </cap:eventcode>
        <cap:eventcode>
            <valuename>NationalWeatherService</valuename>
            <value>SPS</value>
        </cap:eventcode>
    </cap:polygon></entry>
</feed>
-->

National Weather Service Alerts for OR

[xslt_transform_xml xsl="case-study-feeds/atom.xsl" xml="https://api.weather.gov/alerts/active?area=OR" /]
Output

Current watches, warnings, and advisories for Oregon


Winter Weather Advisory issued November 17 at 2:38PM PST until November 18 at 10:00PM PST by NWS Medford OR

* WHAT…Snow expected. Total snow accumulations between 3 and 7 inches. Winds gusting as high as 45 mph. * WHERE…Portions of the southern Oregon Cascades and Siskiyous, including Crater Lake National Park, Sky Lakes Wilderness, and Diamond Lake. This includes portions of highways 138, 230, and 62. * WHEN…From 10 PM this evening to 10 PM PST Wednesday. * IMPACTS…Plan on slippery road conditions. The hazardous conditions will impact the Wednesday morning and evening commutes. Gusty winds could bring down tree branches. Roads, and especially bridges and overpasses, will likely become slick and hazardous.

Wind Advisory issued November 17 at 2:28PM PST until November 18 at 7:00AM PST by NWS Medford OR

* WHAT…Southeast winds 20 to 30 mph with gusts up to 45 mph expected. * WHERE…Southern and central Jackson County, including Ashland, Phoenix, Talent, and Medford. This includes portions of Interstate 5 and highway 140. * WHEN…From 7 PM this evening to 7 AM PST Wednesday. * IMPACTS…Gusty winds will blow around unsecured objects. Tree limbs could be blown down and a few power outages may result. Winds may damage holiday decorations.

Updated :
Author : w-nws.webmaster@noaa.gov