<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -89,17 +89,19 @@ module Planet
       source = REXML::Element.new('planet:source') unless source
       Planet.source(sub, source) unless source.has_elements?
 
+      # atom:source should not have atom:published as a child. But should
+      # have atom:updated. Some feeds spooge this, so we do the best we can.
+      if source.elements['child::published']
+        if source.updated
+         source.delete_element source.published 
+        else
+          source.published.name = 'updated'
+        end
+      end
+
       feed.root.add source.root
     end
 
-# Let's use an Atom xslt template, instead
-#    # output the Atom feed
-#    File.open(File.join(output_dir,'atom.xml'),'w') do |file|
-#      Planet.log.info 'Producing atom.xml'
-#      formatter = REXML::Formatters::Default.new
-#      formatter.write(feed, file)
-#    end
-
     # apply templates
     TemplatePublisher.new.publish_feed(config['template_files'], feed)
   end</diff>
      <filename>planet/splice.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,18 +14,6 @@
   &lt;!-- strip unknown elements and attributes --&gt;
   &lt;xsl:template match=&quot;unknown:*|@unknown:*&quot;/&gt;
 
-  &lt;!-- strip published elements within atom:source --&gt;
-  &lt;xsl:template match=&quot;atom:source/atom:published&quot;&gt;
-    &lt;xsl:choose&gt;
-      &lt;xsl:when test=&quot;../atom:updated&quot;/&gt;
-      &lt;xsl:otherwise&gt;
-        &lt;xsl:text&gt;&amp;#10;&lt;/xsl:text&gt;
-        &lt;xsl:text&gt;      &lt;/xsl:text&gt;
-        &lt;atom:updated&gt;&lt;xsl:value-of select=&quot;.&quot;/&gt;&lt;/atom:updated&gt;
-      &lt;/xsl:otherwise&gt;
-    &lt;/xsl:choose&gt;
-  &lt;/xsl:template&gt;
-
   &lt;!-- strip blank subtitles --&gt;
   &lt;xsl:template match=&quot;atom:subtitle&quot;&gt;
     &lt;xsl:if test=&quot;./text()&quot;&gt;</diff>
      <filename>themes/common/atom.xml.xslt</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ac24693266d447e52f3a8cb02ebbd2d2ed5a9e0f</id>
    </parent>
  </parents>
  <author>
    <name>Jacques Distler</name>
    <email>distler@golem.ph.utexas.edu</email>
  </author>
  <url>http://github.com/rubys/mars/commit/834a47f902d389a74a9f52e719f464a8747c9af8</url>
  <id>834a47f902d389a74a9f52e719f464a8747c9af8</id>
  <committed-date>2008-09-29T08:07:19-07:00</committed-date>
  <authored-date>2008-09-29T08:07:19-07:00</authored-date>
  <message>A better fix for atom:published in atom:source

Atom:source should not have atom:published as a child.
But it should have atom:updated.
Some feeds spooge this. Previously, we attempted to fix this in
the atom XSLT template. This is better.</message>
  <tree>301363f2dacef72918448f50440685df6e73ec55</tree>
  <committer>
    <name>Jacques Distler</name>
    <email>distler@golem.ph.utexas.edu</email>
  </committer>
</commit>
