Bonjour,
Voilà j'utilise un petit programme Grouper GPL qui me permet de récupérer les news Google sur un mot clé en particulier (immobilier en l'occurence). Ce programme crée un fichier rss que je transforme avec une feuille de style xsl. Jusqu'à présent, tout fonctionnait. Mais depuis ce matin, j 'ai un problème !
Le fichier RSS est bien généré mais la feuille de style XSL n'arrive pas à lire les éléments channel et item. Je n'arrive à savoir d'où vient le problème.
Voici mon fichier RSS :
Et voici le fichier XSL qui est censé traiter tout cela :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="../rss.xsl" ?> <rss version="2.0"> <channel> <title>Google News</title> <link>http://news.google.com/news?hl=fr&num=20&edition=us&ie=ISO-8859-1&sa=G&q=Immobilier</link> <description>Google News search by Grouper</description> <pubDate>Sat, 26 Jun 2004 17:32:30 +0200</pubDate> <generator>Grouper/1.3.1GPL</generator> <item> <link>http://radio-canada.ca/regions/manitoba/nouvelles/200406/26/001-place-catherine.shtml</link> <title>Le projet immobilier Place Catherine ne verra pas le jour</title> <author>RC Manitoba&nbsp;-</author> <date>&nbsp;Publi&eacute; depuis 19 minutes</date> <description>Selon le promoteur immobilier, Serge Bibeau, le projet de construction d&#39;un &eacute;difice &agrave; logements &agrave; Saint-Boniface, n&#39;est pas viable. ... </description> </item> <item> <link>http://www.cnw.ca/fr/releases/archive/June2004/25/c8678.html</link> <title>Al&#39;attention des r&eacute;dacteurs des chroniques affaires, immobilier ... </title> <author>CNW Telbec (Communiqu&eacute;s de presse)&nbsp;-</author> <date>&nbsp;Publi&eacute; depuis 16 heures</date> <description> ... se sont entendus sur la vente de la participation de cette derni&egrave;re dans The Trump International Hotel &amp; Tower, un projet immobilier en coentreprise. ... </description> </item> </channel> </rss>
Merci de votre aide. Ce pourrait-il que cela vienne d'Easy-PHP ???
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96 <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" encoding="iso-8859-1" indent="yes"/> <xsl:template match="/rss"> <html xml:lang="fr"> <head> <title>MonSite.com</title> <meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=ISO-8859-1"/> <link rel="stylesheet" type="text/css" href="/styles.css"/> </head> <body> <form action="test.php" method="post"> <xsl:for-each select="channel"> <table width="770" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#666699"> <tr bordercolor="#666699"> <td width="58" align="right" valign="middle"><div align="left"><img src="/images_admin/lapinot.jpg" width="58" height="73" border="0"/></div></td> <td align="right" valign="middle" bgcolor="#666699"> <div align="left"> <font color="#CCCCFF"> <img src="/images_votre_immobilier/0.gif" width="15" height="5"/> <strong> <font size="2">Admin Votre-immobilier.com ></font> <font color="#CCCCFF"> <strong> <font size="2">News > Ajouter</font> </strong> </font> </strong> </font> </div> </td> </tr> <tr valign="middle" bordercolor="#FFFFFF"> <td height="25" align="right"/> <td height="25" align="right"> <div align="left"/> </td> </tr> <xsl:for-each select="item"> <tr valign="middle" bordercolor="#FFFFFF"> <td height="26" align="right"/> <td height="26" align="left" class="form"> <div align="left"> <input type="checkbox" name="article[]" value="{title}-|-{author}-|-{date}-|-{description}-|-{link}"> <img src="/images_admin/fleche_immobilier_violet.gif" width="7" height="9"/> <img src="/images_votre_immobilier/0.gif" width="5" height="5"/> <a> <xsl:attribute name="href"> <xsl:value-of select="link" disable-output-escaping="yes"/> </xsl:attribute> <xsl:value-of select="title" disable-output-escaping="yes"/> </a> <br/> <xsl:value-of select="author" disable-output-escaping="yes"/> <xsl:value-of select="date" disable-output-escaping="yes"/> <br/> <xsl:value-of select="description" disable-output-escaping="yes"/> <br/> </input> </div> </td> </tr> </xsl:for-each> <tr valign="middle" bordercolor="#FFFFFF"> <td height="44" align="right"> <div align="left"/> </td> <td height="44" align="right"> <div align="left"> Date de la revue (Format dd/mm/YY) : <input name="date_revue" type="text" value="" size="50" maxlength="55"/> </div> </td> </tr> <tr valign="middle" bordercolor="#FFFFFF"> <td height="44" align="right"/> <td height="44" align="right"> <div align="left"> <input type="submit" name="Submit" value="Envoyer"/> </div> </td> </tr> <tr valign="middle" bordercolor="#FFFFFF"> <td height="44" align="right"/> <td height="44" align="right"/> <td height="44" align="right"> <div align="left"/> </td> </tr> </table> </xsl:for-each> </form> </body> </html> </xsl:template> </xsl:stylesheet>
Yann
Partager