<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="portal_syndication/atom_css"?>
<feed 
  xmlns="http://www.w3.org/2005/Atom"
  xmlns:tal="http://xml.zope.org/namespaces/tal"
  xmlns:metal="http://xml.zope.org/namespaces/metal">

<tal:block define="
  iso8601_long string:%Y-%m-%dT%H:%M:%SZ;
  site here/getSite;
  site_title site/title_or_id;
  site_url site/absolute_url;
  site_version site/version|string:1.0;
  site_icon string:${site_url}/${site/icon};
  stool here/portal_syndication;
  context nocall:options/context|site;
  entries options/entries|python:();
  lang options/lang|nothing;
  permalink context/absolute_url;
  atomlink string:${permalink}/index_atom;
  title context/title|context/title_or_id;
  title python:test(site_title == title, site_title, site_title + ' - ' + title);
  subtitle context/description;
  updated context/bobobase_modification_time;
  updated_str python:updated.strftime(iso8601_long);
  context_id python:stool.generateAtomTagId(permalink, updated);
  rights site/rights|string:;
">

  <title type="html" tal:content="title" />
  <subtitle type="html" tal:content="subtitle" tal:condition="subtitle"/>
  <updated tal:content="updated_str" />
  <id tal:content="context_id" />
  <icon tal:content="site_icon" />
  <link rel="alternate" type="text/html" tal:attributes="href permalink" />
  <link rel="self" type="application/atom+xml" tal:attributes="href atomlink" />
  <rights tal:condition="rights" tal:content="rights" />
  <generator tal:attributes="uri site_url; version site_version" tal:content="site_title" />

  <entry tal:repeat="entry entries">
    <tal:block replace="structure python:stool.atom_entry_template(entry=entry, lang=lang)" />
  </entry>

</tal:block>
</feed>
