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