<?xml version="1.0" encoding="utf-8"?>
<feed
  xmlns="http://www.w3.org/2005/Atom"
  xmlns:georss="http://www.georss.org/georss"
  xmlns:gml="http://www.opengis.net/gml"  
  xmlns:tal="http://xml.zope.org/namespaces/tal"
  tal:define="furl context/absolute_url;
              maxitems python:int(request.form.get('maxitems', -1));
              item_iterator nocall:context/@@geo/forRSS"
  >
  <tal:b 
    condition="python:request.RESPONSE.setHeader(
		'Content-Type', 'application/atom+xml; charset=utf-8')" 
    />

  <title tal:content="context/title_or_id">TITLE</title>
  <link rel="self" tal:attributes="href furl"/>
  <updated/>
  <author/>
  <id tal:content="furl">ID</id>

  <entry 
    tal:repeat="item python:item_iterator(maxitems)"
    >
    <title tal:content="item/properties/title">TITLE</title>
    <link 
      rel="alternate"
      tal:attributes="href item/properties/link"
      tal:content="item/properties/link"
      >URL
    </link>
    <id tal:content="item/properties/link">ID</id>
    <updated/>
    <summary
      tal:content="python:item['properties']['description'] or 'None.'"
      >ABOUT
    </summary>
    
    <tal:b condition="item/hasPoint">
    <georss:where>
      <gml:Point>
        <gml:pos tal:content="item/coords_georss">COORDS</gml:pos>
      </gml:Point>
    </georss:where>
    </tal:b>
    <tal:b condition="item/hasLineString">
    <georss:where>
      <gml:LineString>
        <gml:posList tal:content="item/coords_georss">COORDS</gml:posList>
      </gml:LineString>
    </georss:where>
    </tal:b>
    <tal:b condition="item/hasPolygon">
    <georss:where>
      <gml:Polygon>
        <gml:exterior>
          <gml:LinearRing>
            <gml:posList tal:content="item/coords_georss">COORDS</gml:posList>
          </gml:LinearRing>
        </gml:exterior>
      </gml:Polygon> 
    </georss:where>
    </tal:b>
  </entry>
</feed>

