Create a VALIDATED Feed » History » Version 2
Anonymous, 26/05/2015 18:28
| 1 | 1 | Anonymous | h1. Create a VALIDATED Feed |
|---|---|---|---|
| 2 | 1 | Anonymous | |
| 3 | 2 | Anonymous | > *NOTE* : This change refers to Sitools2 - v2.4 |
| 4 | 2 | Anonymous | |
| 5 | 1 | Anonymous | 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. |
| 6 | 1 | Anonymous | |
| 7 | 1 | Anonymous | To have a feed compatible _both_ with Sitools2 and any RSS validator, the following rules should be followed: |
| 8 | 1 | Anonymous | |
| 9 | 1 | Anonymous | # 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; |
| 10 | 1 | Anonymous | # 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. |
| 11 | 1 | Anonymous | # _<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; |
| 12 | 1 | Anonymous | # Put email and name both in author's <name> and <email> fields; |
| 13 | 1 | Anonymous | |
| 14 | 1 | Anonymous | In the following is an example of how the _xml_ of a "validated" Sitools2 feed should look like[1]: |
| 15 | 1 | Anonymous | |
| 16 | 1 | Anonymous | <pre><code class="xml"> |
| 17 | 1 | Anonymous | <FeedModel> |
| 18 | 1 | Anonymous | <id>63c48e66-68ca-4217-8a02-b05f3a8332ad</id> |
| 19 | 1 | Anonymous | <name>PlanckSZ_news</name> |
| 20 | 1 | Anonymous | <feedType>rss_2.0</feedType> |
| 21 | 1 | Anonymous | <title>Planck SZ Database</title> |
| 22 | 1 | Anonymous | <description>Planck SZ Database RSS feed</description> |
| 23 | 1 | Anonymous | <link>http://szcluster-db-test.ias.u-psud.fr/</link> |
| 24 | 1 | Anonymous | <entries> |
| 25 | 1 | Anonymous | <FeedEntryModel> |
| 26 | 1 | Anonymous | <link>http://szcluster-db-test.ias.u-psud.fr/plnck_project/clientFeeds/PlanckSZ_news</link> |
| 27 | 1 | Anonymous | <!-- <updatedDate>2014-04-04 10:41:00.0 CEST</updatedDate> --> |
| 28 | 1 | Anonymous | <!-- ERROR: A channel should not include both pubDate and dc:date --> |
| 29 | 1 | Anonymous | <publishedDate>2014-04-04 10:41:00.0 CEST</publishedDate> |
| 30 | 1 | Anonymous | <title>Valid Feed example</title> |
| 31 | 1 | Anonymous | <description>Example of feed description where the link is provided directly in the body.<br/>Link: <a style="color:blue;" href="http://szcluster-db.ias.u-psud.fr/">h$ |
| 32 | 1 | Anonymous | <author> |
| 33 | 1 | Anonymous | <name>szcluster-db@ias.u-psud.fr (IAS IT department)</name> |
| 34 | 1 | Anonymous | <email>szcluster-db@ias.u-psud.fr (IAS IT department)</email> |
| 35 | 1 | Anonymous | <!-- <name>IAS IT department</name> --> |
| 36 | 1 | Anonymous | <!-- ERROR: Invalid email address --> |
| 37 | 1 | Anonymous | <!-- <email>szcluster-db@ias.u-psud.fr</email>--> |
| 38 | 1 | Anonymous | <!-- ERROR: Email address is missing real name --> |
| 39 | 1 | Anonymous | </author> |
| 40 | 1 | Anonymous | <!-- <image> |
| 41 | 1 | Anonymous | <type>image/gif</type> |
| 42 | 1 | Anonymous | <url>http://szcluster-db-test.ias.u-psud.fr/sitools/upload/Planck.png</url> |
| 43 | 1 | Anonymous | </image>--> |
| 44 | 1 | Anonymous | <!-- ERROR: Missing enclosure attribute: length --> |
| 45 | 1 | Anonymous | </FeedEntryModel> |
| 46 | 1 | Anonymous | <!-- <link>http://szcluster-db-test.ias.u-psud.fr/plnck_project/clientFeeds/PlanckSZ_news</link> --> |
| 47 | 1 | Anonymous | <!-- Actually, if only one feed is in the RSS flux, the link can be enabled here. However, with more than one feed |
| 48 | 1 | Anonymous | the link should be explicitly declared ONLY FOR THE FIRST ONE, and disabled for the others. |
| 49 | 1 | Anonymous | Alternatively, the admin can disable the <link> item for all the feeds, and declare the URL directly in the body |
| 50 | 1 | Anonymous | of the description, like in the provided example. --> |
| 51 | 1 | Anonymous | </entries> |
| 52 | 1 | Anonymous | <parent>8e8830be-e7cd-4ecf-8d2c-7a2cfde6d33a</parent> |
| 53 | 1 | Anonymous | <author> |
| 54 | 1 | Anonymous | <name>szcluster-db@ias.u-psud.fr (IAS IT department)</name> |
| 55 | 1 | Anonymous | <email>szcluster-db@ias.u-psud.fr</email> |
| 56 | 1 | Anonymous | <!-- <name>IAS IT department</name> --> |
| 57 | 1 | Anonymous | <!-- ERROR: Invalid email address --> |
| 58 | 1 | Anonymous | <!-- <email>szcluster-db@ias.u-psud.fr</email>--> |
| 59 | 1 | Anonymous | <!-- ERROR: Email address is missing real name --> |
| 60 | 1 | Anonymous | </author> |
| 61 | 1 | Anonymous | <visible>true</visible> |
| 62 | 1 | Anonymous | <feedSource>CLASSIC</feedSource> |
| 63 | 1 | Anonymous | <externalUrl></externalUrl> |
| 64 | 1 | Anonymous | </FeedModel> |
| 65 | 1 | Anonymous | </code></pre> |
| 66 | 1 | Anonymous | |
| 67 | 1 | Anonymous | The feeds will finally look like: |
| 68 | 1 | Anonymous | |
| 69 | 1 | Anonymous | !validFeed_column.png! !validFeed_page.png! |
| 70 | 1 | Anonymous | |
| 71 | 1 | Anonymous | |
| 72 | 1 | Anonymous | fn1. The lines automatically generated by Sitools2, but in conflict with the feed validator, are commented, together with the corresponding error they would generate. |