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) > 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) > 0">
<xsl:value-of select="atom:link[@rel='alternate']/@href"/>
</xsl:when>
<xsl:when test="string-length(atom:link/@href) > 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) > 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
Beach Hazards Statement issued November 3 at 5:08AM PST until November 3 at 1:00PM PST by NWS Portland OR
* WHAT…Sneaker waves possible.
* WHERE…Central Coast of Oregon.
* WHEN…Until 1 PM PST this afternoon.
* IMPACTS…Waves can run up significantly farther on a beach than
normal, including over rocks and jetties. Sneaker waves can
suddenly knock people off of their feet and quickly pull them
into the frigid ocean which may lead to serious injury or
drowning.
* ADDITIONAL DETAILS…A Beach Hazards Statement is issued when
sneaker waves create potentially life-threatening conditions in
the surf zone. Caution should be used when in or near the water.
Always keep an eye on the waves, and be especially watchful of
children. Those participating in razor clam digs should exercise
caution.
Beach Hazards Statement issued November 3 at 5:08AM PST until November 3 at 1:00PM PST by NWS Portland OR
* WHAT…For the Beach Hazards Statement, Sneaker waves
possible. For the Coastal Flood Advisory, tidal overflow
flooding expected.
* WHERE…Clatsop and Tillamook Coast, and South Washington
Coast.
* WHEN…For the Beach Hazards Statement, until 1 PM PST this
afternoon. For the Coastal Flood Advisory, from 10 AM to 2 PM
PST Wednesday.
* IMPACTS…Minor flooding, up to 1 foot above ground level,
during high tides is expected in the low lying areas near bays,
sloughs, and the lower reaches of the coastal rivers. Expect
flooding along portions of Highway 101, including near Raymond,
Seaside, and Fraser Road in Tillamook County.
Coastal Flood Advisory issued November 3 at 5:08AM PST until November 5 at 2:00PM PST by NWS Portland OR
* WHAT…For the Beach Hazards Statement, Sneaker waves
possible. For the Coastal Flood Advisory, tidal overflow
flooding expected.
* WHERE…Clatsop and Tillamook Coast, and South Washington
Coast.
* WHEN…For the Beach Hazards Statement, until 1 PM PST this
afternoon. For the Coastal Flood Advisory, from 10 AM to 2 PM
PST Wednesday.
* IMPACTS…Minor flooding, up to 1 foot above ground level,
during high tides is expected in the low lying areas near bays,
sloughs, and the lower reaches of the coastal rivers. Expect
flooding along portions of Highway 101, including near Raymond,
Seaside, and Fraser Road in Tillamook County.
High Wind Warning issued November 3 at 3:50AM PST until November 3 at 10:00PM PST by NWS Medford OR
* WHAT…South winds 35 to 45 mph with gusts up to 60 mph expected
along capes, headlands, and exposed areas.
* WHERE…Capes, Headlands, and exposed areas of Coos and Curry
counties, including Cape Blanco, Cape Arago, Humbug Mountain,
Bandon Head, Pistol River, and exposed portions of Highway 101.
* WHEN…From 1 PM this afternoon to 10 PM PST this evening.
* IMPACTS…High winds may move loose debris, damage property and
cause power outages. Travel could be difficult, especially for
high profile vehicles.
Updated :
Author : w-nws.webmaster@noaa.gov
Author : w-nws.webmaster@noaa.gov