GeoRSS Simple to W3C Basic Geo XSLT

Contributed by kevotheclone

This XSLT transformation converts GeoRSS <georss:point> elements found in your feeds into W3C Basic Geo <geo:lat> and <geo:long> elements where they will be further processed by Awasu's Metadata module.

Note that "converts" is a bit of a misnomer, as this XSLT transformation adds new <geo:lat> and <geo:long> elements to the feed and leaves the <georss:point> element unchanged.

You must have MSXML installed for XSL processing to work.

Creating the XSLT file

Copy the text below and paste it into a new text file named georss-simple_to_w3c-basic-geo.xsl. Save it in your XSLT/ sub-directory under your Awasu installation directory.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl=""
  <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

"Default" template.
Matches everything and copies it to the output.
  <xsl:template match="node()|@*">
      <xsl:apply-templates select="@*"/>

Matches the "georss:point" element and adds the <geo:lat /> and the <geo:long />
elements with the parsed latitude and longitude values.
  <xsl:template match="georss:point">
      <xsl:element name="geo:lat">
        <xsl:value-of select="substring-before(., ' ')"></xsl:value-of>
      <xsl:element name="geo:long">
        <xsl:value-of select="substring-after(., ' ')"></xsl:value-of>

To attach the XSLT file to a Channel

  • Click the Processing button in the Details page of channel's Properties dialog.
  • Click the green plus sign + and the ... button to browse to the georss-simple_to_w3c-basic-geo.xsl file, select it.
  • "Ok" your way out of dialog... and you're done.

Any new feed items after you attach the georss-simple_to_w3c-basic-geo.xsl XSLT file to an Awasu Channel will now have the W3C Basic Geo elements <geo:lat> and <geo:long>.

Additional information about using XSLT files with Awasu can be found here.

Here are a couple of sample feeds that contain GeoRSS-Simple elements:

For other ways to extend Awasu with GeoRSS support, click here.