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 -->

National Weather Service Alerts for OR

[xslt_transform_xml xsl="case-study-feeds/atom.xsl" xml="https://alerts.weather.gov/cap/or.php?x=0" /]
Output

Current watches, warnings, and advisories for Oregon


High Surf Advisory issued December 21 at 2:15PM PST until December 22 at 10:00PM PST by NWS Medford OR

* WHAT…For the High Surf Advisory, large breaking waves of 21 to 26 feet. For the High Surf Warning, dangerously large breaking waves of 25 to 33 feet. * WHERE…The beaches and shorelines of Curry, Coos, and Douglas counties. * WHEN…For the High Surf Advisory, through 10 PM PST Sunday. For the High Surf Warning, from 10 PM Sunday to 10 PM PST Monday. * IMPACTS…Extremely large breaking waves will create very hazardous conditions along beaches and area shorelines. Waves will inundate beaches and surge into normally dry areas. Infrastructure damage and significant beach erosion can be expected. * ADDITIONAL DETAILS…The surf will remain hazardous but slightly improve tonight. Conditions will worsen again late Sunday night through Monday evening due to a strong, building, long period swell. The highest surf is expected Monday morning into Monday afternoon. Conditions are expected to slowly improve on Tuesday. * View the hazard area in detail at https://www.wrh.noaa.gov/map/?wfo=mfr

High Surf Warning issued December 21 at 2:15PM PST until December 23 at 10:00PM PST by NWS Medford OR

* WHAT…For the High Surf Advisory, large breaking waves of 21 to 26 feet. For the High Surf Warning, dangerously large breaking waves of 25 to 33 feet. * WHERE…The beaches and shorelines of Curry, Coos, and Douglas counties. * WHEN…For the High Surf Advisory, through 10 PM PST Sunday. For the High Surf Warning, from 10 PM Sunday to 10 PM PST Monday. * IMPACTS…Extremely large breaking waves will create very hazardous conditions along beaches and area shorelines. Waves will inundate beaches and surge into normally dry areas. Infrastructure damage and significant beach erosion can be expected. * ADDITIONAL DETAILS…The surf will remain hazardous but slightly improve tonight. Conditions will worsen again late Sunday night through Monday evening due to a strong, building, long period swell. The highest surf is expected Monday morning into Monday afternoon. Conditions are expected to slowly improve on Tuesday. * View the hazard area in detail at https://www.wrh.noaa.gov/map/?wfo=mfr

High Surf Advisory issued December 21 at 2:06PM PST until December 23 at 10:00PM PST by NWS Portland OR

* WHAT…Large waves and hazardous surf conditions. Breakers up to 25 to 30 feet. * WHERE…North and Central Coast of Oregon, and South Washington Coast. * WHEN…Until 10 PM PST Monday. * IMPACTS…Destructive waves may wash over beaches, jetties, and other structures unexpectedly. People can be swept off rocks and jetties and drown while observing high surf. Minor beach erosion may damage coastal properties and buildings. Higher than normal water run-up is expected on beaches and low- lying shoreline. Enhanced possibility for sneaker waves.

Wind Advisory issued December 21 at 1:13PM PST until December 22 at 5:00PM PST by NWS Medford OR

* WHAT…Southeast winds 20 to 30 mph with gusts up to 45 mph expected. * WHERE…Southern Rogue Valley, including the city of Ashland. * WHEN…From 10 AM to 5 PM PST Sunday. * IMPACTS…Gusty winds will blow around unsecured objects. Tree limbs could be blown down and a few power outages may result.

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