I’ve been trying to adjust the display of a SEEK.COM.AU RSS feed within SharePoint 2007. FYI – SEEK is one of the top job search sites in Australia.
I’ve found that while SEEK’s RSS feed for a job search “complies” with the RSS standard: ie it passes the Markup Validation Service at http://validator.w3.org, it will produce HTML markup that is non-compliant with the HTML standard when your XSLT displays more than one record at a time.
1: <item>
2: <title>Network & Desktop Support</title>
3: <description><![CDATA[
4: <html>
5: <head>
6: <title>Latest jobs from www.seek.com.au. Australia's #1 job site</title>
7: </head>
8: <body>
9: <div id="rssFeed" style="margin-top:15px; margin-bottom:8px">
10: <div id="rssListedDate"><strong>Date & time listed: </strong>10/03/2009 5:22:30 PM</div>
11: <div id="rssJobSummary" style="margin-top:10px">
12: <div id="rssDes"><strong>Job ad summary: </strong><br>The Association of Professional Engineers, Scientists and Managers, Australia is seeking a suitably experienced person to work as part of a small team</div>
13: <div id="rssSalary" style="margin-top:10px">
14:
15: </div>
16: <div id="rssNewFeedLink" style="margin-top:18px">
17: <a href="http://www.seek.com.au/rss/index.ascx?catlocation=1002&catindustry=1215&Keywords=Sharepoint&RM=it&RMO=model-main&RUS=SEEKMAIN_USR&RID=1fb856cd-dbe0-4cdc-8530-d1e5300fa83a#RSSReader">Create a new feed with different search criteria</a>
18: </div>
19: <div id="rssFeedBack"><a href="http://www.seek.com.au/if.asp?loc=rsscontact">Send us feedback about these feeds.</a></div>
20: </div>
21: </div>
22: </body>
23: </html>]]>
24: </description>
25: <link>http://www.seek.com.au/users/viewdetails.asp?Action=jobsearch&JobListAction=ViewOneAd&JobSearch=true&AdID=15075376&SearchType=5</link>
26: <author>ETM Search & Selection</author>
27: <category>Help Desk~Support|I.T. & T</category>
28: <pubDate>Tue, 10 Mar 2009 06:22:30 GMT </pubDate>
29: <guid isPermaLink="false">15075376</guid>
30: </item>
Note within the <description> tags that the DIV elements have ID attributes! As these IDs are the same for each <item> in the RSS file, the HTML that is output will have multiple DIVS with identical ID attributes when displayed with the SharePoint RSS Viewer (multiple results are visible per page). This is not valid markup (see: http://www.w3.org/TR/REC-html40/struct/global.html#adef-id)
I really want to get rid of a couple of these DIVs, so that only the Title, Summary and Salary are listed and am trying to use jQuery to hide the DIVs I don’t want (lines 16 to 19). Initially, I tried to hide DIVs with the relevant IDs. I discovered that Firefox happily parsed the whole document and hid all the DIVs with the correct ID. Internet Explorer, on the other hand, quite correctly found the first instance of the ID and left the others alone.
So thanks to a poor design, we’re left with something unpalatable – trying to locate and hide strings instead. Yuck.