Tableau comparatif entre les différents formats de flux xml générés à partir des éléments standards définis dans la classe rss_write
| type | max (*) | rss 0.91 | rss 1.0 | rss 2.0 | atom 0.3 | atom 1.0 | |
| entete | <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE rss PUBLIC "http://my.netscape.com/publish/formats/rss-0.91.dtd"> <rss version="0.91"> |
<?xml version="1.0" encoding="ISO-8859-1"?> <rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/"> |
<?xml version="1.0" encoding="ISO-8859-1" ?> <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"> |
<?xml version="1.0" encoding="ISO-8859-1"?> <feed version="0.3" xmlns="http://purl.org/atom/ns#" xml:lang="fr"> |
<?xml version="1.0" encoding="ISO-8859-1"?> <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr"> |
||
| channel | o | <channel> | <channel rdf:about="url_site"> | <channel> | |||
| title | o | 100 | <title>titre du channel</title> | <title>titre du channel</title> | <title>titre du channel</title> | <title>titre du channel</title> | <title>titre du channel</title> |
| link | o | 500 | <link>url_site</link> | <link>url_site</link> | <link>url_site</link> | <link rel="alternate" type="text/html" href="url_site" title="titre_channel" /> | <link rel="alternate" type="text/html" href="url_site" /> <id>url_site</id> |
| description | o | 500 | <description>description</description> | <description>description</description> | <description>description</description> | <tagline>description<tagline> | <subtitle>description<subtitle> |
| language | o | 5 | <language>fr</language> | <dc:language>fr</dc:language> | <language>fr</language> | ||
| url_flux | <link rel="self" type="application/atom+xml" href="url_flux" /> | ||||||
| copyright | 100 | <copyright>copyright</copyright> | <dc:rights>copyright</dc:rights> | <copyright>copyright</copyright> | <copyright>copyright</copyright> | <rights>copyright</rights> | |
| webmaster | 100 | <webMaster>webmaster</webMaster> | <dc:creator>webmaster</dc:creator> | <dc:creator>webmaster</dc:creator> | <author> <name>webmaster</name> <uri>http://example.com/</uri> </author> |
<author> <name>webmaster</name> <uri>http://example.com</uri> </author> |
|
| pubdate | <pubDate>date au format 1</pubDate> | <dc:date>date au format 2</dc:date> | <pubDate>date au format 1</pubDate> | <modified>date au format 2</modified> | <updated>date au format 2</updated> | ||
| generator | <generator>le logiciel de génération</generator> | <dc:source>le logiciel de génération</dc:source> | <generator>le logiciel de génération</generator> | <generator>le logiciel de génération</generator> | <generator>le logiciel de génération</generator> | ||
| <image rdf:resource="image_url'" /><items> <rdf:Seq> <rdf:li rdf:resource="url_item" /> .... </rdf:Seq> </items> </channel> |
|||||||
| image | <image> | <image rdf:about="url_image"> | <image> | <logo>url_image</logo> | |||
| title | o | 100 | <title>titre image</title> | <title>titre image</title> | <title>titre image</title> | ||
| url | o | 500 | <url>url_image</url> | <url>url_image</url> | <url>url_image</url> | ||
| link | o | 500 | <link>url_site</link> | <link>url_site</link> | <link>url_site</link> | ||
| description | 500 | <description>description</description> | <dc:description>description</dc:description> | <description>description</description> | |||
| width | 144 | <width>largeur</width> | <dc:format>width="largeur" height="hauteur"</dc:format> | <width>largeur</width> | |||
| height | 400 | <height>hauteur</height> | <height>hauteur</height> | ||||
| </image> | </image> | </image> | |||||
| item | <item> | <item rdf:about="url_item"> | <item> | <entry> | <entry xml:lang="fr"> | ||
| title | o | 100 | <title>titre item</title> | <title>titre item</title> | <title>titre item</title> | <title>titre item</title> | <title>titre item</title> |
| link | o | 500 | <link>url_item</link> | <link>url_item</link> | <link>url_item</link> | <link rel="alternate" type="text/html" href="url_item" /> <id>url_item</id> |
<link rel="alternate" type="text/html" href="url_item" /> <id>url_item</id> |
| description | 500 | <description>description</description> | <description>description</description> | <description>description</description> | <summary type="html">description</summary> | <summary type="html">description</summary> | |
| pubdate | <pubDate>date au format 1</pubDate> | <dc:date>date au format 2</dc:date> | <pubDate>date au format 1</pubDate> | <issued>date au format 2</issued> | <published>date au format 2</published> | ||
| modified | <modified>date au format 2</modified> | <updated>date au format 2</updated> | |||||
| category | <dc:subject>categorie</dc:subject> | <category>categorie</category> | <category label="categorie"/> | ||||
| author | <author>auteur</author> | <dc:creator>auteur</dc:creator> | <dc:creator>auteur</dc:creator> | <author> <name>auteur</name> </author> |
<author> <name>auteur</name> </author> |
||
| </item> | </item> | </item> | </entry> | </entry> | |||
| </channel> </rss> |
</rdf:RDF> | </channel> </rss> |
</feed> | </feed> |
Format des dates :
date au format 1 = norme RFC 822 : exemple : Sun, 26 Jun 2005 12:16:26 +0200 ou équivalent Sun, 26 Jun 2005 10:16:26 GMT
date au format 2 = norme ISO 8601 : exemple : 2005-07-26T12:16:26+02:00 ou équivalent 2005-07-26T10:16:26Z
C'est la première forme qui est générée par rss_write.
(*) max = nombre maximun de caractères admis (cas rss 0.91 et 2.0 seulement)