<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF 
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/elements/1.1/" 
  xmlns:silvanews="http://infrae.com/namespaces/silvanews"
  xmlns:rss="http://purl.org/rss/1.0/"
  xmlns:tal="http://xml.zope.org/namespaces/tal"
  tal:define="data view/get_data">
  <rss:channel tal:attributes="rdf:about data/url">
    <rss:title tal:content="data/title" />
    <rss:link tal:content="string:${data/url}/rss" />
    <rss:description tal:content="data/description" />
    <dc:creator tal:repeat="author data/authors" tal:content="author" />
    <tal:block condition="data/date_updated">
      <dc:date tal:content="python: data['date_updated'].HTML4()" />
    </tal:block>
    <rss:items>
      <rdf:Seq> 
        <rdf:li 
          tal:repeat="item data/entries" 
          tal:attributes="rdf:resource item/url" />
      </rdf:Seq>
    </rss:items>
  </rss:channel>
  <tal:block repeat="item data/entries">
    <rss:item tal:attributes="rdf:about item/url">
      <rss:title tal:content="item/title"/>
      <rss:link tal:content="item/url" />
      <rss:description tal:content="item/description" />
      <dc:subject tal:condition="item/subject" tal:content="item/subject" />
      <dc:creator tal:repeat="author item/authors" tal:content="author" />
      <tal:block condition="item/date_published">
      <dc:date tal:content="python: item.date_published().HTML4()"/>
      <silvanews:location tal:condition="item/location|nothing" tal:content="item/location" />
      <silvanews:start_datetime tal:condition="item/start_datetime|nothing" 
                 tal:content="item/start_datetime" />
      <silvanews:end_datetime tal:condition="item/end_datetime|nothing" 
                 tal:content="item/end_datetime" />
      </tal:block>
    </rss:item>
  </tal:block>
</rdf:RDF>
