Project

General

Profile

Create a VALIDATED Feed » History » Version 1

Version 1/2 - Next » - Current version
Anonymous, 26/05/2015 17:28


Create a VALIDATED Feed

Sitools2 (v2) on his own is not able to generate "validated" RSS feeds. To create it, the user should edit manually the corresponding *.xml file in data/feeds folder.

To have a feed compatible both with Sitools2 and any RSS validator, the following rules should be followed:

  1. Do not provide both publishedDate and updatedDate . If only publishedDate is left, however, the feed will be valid but the validator will still give a warning message;
  2. No icon/thumbnails are allowed for a validated feed! The validator requires the 'length' parameter being specified as attribute of the <enclosure> element, but this would imply a drastic change in the RSS format.
  3. <link> should be declared only in the first feed, if more than one are declared. Alternatively, one can disable <link> of all the feeds, and declare the URL directly in the description;
  4. Put email and name both in author's <name> and <email> fields;

In the following is an example of how the xml of a "validated" Sitools2 feed should look like1:

<FeedModel>
  <id>63c48e66-68ca-4217-8a02-b05f3a8332ad</id>
  <name>PlanckSZ_news</name>
  <feedType>rss_2.0</feedType>
  <title>Planck SZ Database</title>
  <description>Planck SZ Database RSS feed</description>
  <link>http://szcluster-db-test.ias.u-psud.fr/</link>
  <entries>
    <FeedEntryModel>
      <link>http://szcluster-db-test.ias.u-psud.fr/plnck_project/clientFeeds/PlanckSZ_news</link>
<!--      <updatedDate>2014-04-04 10:41:00.0 CEST</updatedDate> -->
<!--      ERROR:  A channel should not include both pubDate and dc:date -->
      <publishedDate>2014-04-04 10:41:00.0 CEST</publishedDate>
      <title>Valid Feed example</title>
      <description>Example of feed description where the link is provided directly in the body.&lt;br/&gt;Link: &lt;a style=&quot;color:blue;&quot; href=&quot;http://szcluster-db.ias.u-psud.fr/&quot;&gt;h$
      <author>
        <name>szcluster-db@ias.u-psud.fr (IAS IT department)</name>
        <email>szcluster-db@ias.u-psud.fr (IAS IT department)</email>
<!--     <name>IAS IT department</name> -->
<!-- ERROR:  Invalid email address -->
<!--     <email>szcluster-db@ias.u-psud.fr</email>-->
<!-- ERROR: Email address is missing real name -->
      </author>
<!--      <image>
        <type>image/gif</type>
        <url>http://szcluster-db-test.ias.u-psud.fr/sitools/upload/Planck.png</url>
      </image>-->
<!-- ERROR: Missing enclosure attribute: length -->
    </FeedEntryModel>
<!-- <link>http://szcluster-db-test.ias.u-psud.fr/plnck_project/clientFeeds/PlanckSZ_news</link> -->
<!-- Actually, if only one feed is in the RSS flux, the link can be enabled here. However, with more than one feed
     the link should be explicitly declared ONLY FOR THE FIRST ONE, and disabled for the others.
     Alternatively, the admin can disable the <link> item for all the feeds, and declare the URL directly in the body
     of the description, like in the provided example. -->
  </entries>
  <parent>8e8830be-e7cd-4ecf-8d2c-7a2cfde6d33a</parent>
  <author>
    <name>szcluster-db@ias.u-psud.fr (IAS IT department)</name>
    <email>szcluster-db@ias.u-psud.fr</email>
<!--     <name>IAS IT department</name> -->
<!-- ERROR:  Invalid email address -->
<!--     <email>szcluster-db@ias.u-psud.fr</email>-->
<!-- ERROR: Email address is missing real name -->
  </author>
  <visible>true</visible>
  <feedSource>CLASSIC</feedSource>
  <externalUrl></externalUrl>
</FeedModel>

The feeds will finally look like:

1 The lines automatically generated by Sitools2, but in conflict with the feed validator, are commented, together with the corresponding error they would generate.