-
1. Re: Rss feed
michaelcourcy Sep 7, 2008 2:31 PM (in response to bashan)If you want some help, show at least the code that generate the rss.
-
2. Re: Rss feed
bashan Sep 7, 2008 2:36 PM (in response to bashan)Sorry, here is my current code:
<?xml version="1.0" encoding="utf-8"?> <rss version='2.0' xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:n="http://www.nikonians.tv/jsf" xmlns:view="http://com.nikonians.ui/view" xmlns:path="http://com.nikonians.ui/path"> <channel> <title>Most Recent</title> <link>#{path:getServerContext(request)}/home.jspx</link> <image> <url>#{path:getServerContext(request)}/img/logo.png</url> <title>Most Recent</title> <link>#{path:getServerContext(request)}/home.jspx</link> </image> <description>Recently added to Nikonians.tv</description> <language>en-us</language> <t:dataList value="#{home.channels}" var="channel"> <t:dataList value="#{home.channelVideos}" var="video"> <item> <title>#{video.name}</title> <link>#{path:getServerContext(request)}/video.show.jspx?vid=#{video.videoPhysicalId}</link> <guid>#{path:getServerContext(request)}/video.show.jspx?vid=#{video.videoPhysicalId}</guid> <author> <name>#{video.user.username}</name> <email>#{video.user.email}</email> </author> <description> <table width="500"> <tr> <td width="5%"> <s:link view="/video.show.xhtml"> <f:param name="vid" value="#{video.videoPhysicalId}" /> <h:graphicImage value="#{path:getVideoThumbMedium(video)}" styleClass="picture"/> </s:link> </td> <td valign="top"> <table width="100%" border="0"> <tr> <td> <s:link view="/video.show.xhtml" propagation="none" value="#{video.name}" styleClass="linkVideo"> <f:param name="vid" value="#{video.videoPhysicalId}" /> </s:link> </td> <td align="right"> #{view:formatDays(video.dateUploaded)} </td> </tr> <tr> <td colspan="2" style="border-top:solid 1px #cccccc"> <table> <tr> <td> <n:ratingShow /> <f:verbatim>&nbsp;|&nbsp;</f:verbatim>#{video.views} Views<f:verbatim>&nbsp;|&nbsp;</f:verbatim>#{home.commentsNum} Comments<f:verbatim>&nbsp;|&nbsp;</f:verbatim>#{view:formatTime(video.duration)} </td> </tr> <tr> <td> #{video.description} </td> </tr> <tr> <td> From<f:verbatim>&nbsp;</f:verbatim><s:link view="/user.home.public.xhtml" value="#{video.user.username}"><f:param name="userId" value="#{video.user.userId}" /></s:link> in #{video.channel.name} </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </description> </item> </t:dataList> </t:dataList> </channel> </rss>
-
3. Re: Rss feed
michaelcourcy Sep 7, 2008 3:35 PM (in response to bashan)The RSS specification is not completly clear on how to embbed html in description.
As you did it seems that enclosing the html inside a CDATA section is the best supported for the feed readers.
<description><![CDATA[{summary}{body}]]></description>
Thus the question is who converts the html tag inside the CDATA in html entities ? Is it Seam or is it your rss reader ?
if you do something like
%> wget http://localhost:8080/mywebapp/myrss.seam
Can you still check in the console output that the html inside the CDATA is converted in html entities ?
By the way are you able to read other feeds containing html with your feed reader ?
-
4. Re: Rss feed
bashan Sep 7, 2008 8:18 PM (in response to bashan)My reader (firefox) is showing all other feeds coming from places like youtube and picasa.
I checked the output with wget and it clearly seems to be coming from the server. It seems like Seam or JSF or facelets is somehow manipulating the data inside a CDATA. This is weird, because it is reasonable to think, that from all places, the data inside a CDATA shouldn't be manipulated...Is there a way to overcome this? What is the cause to this conversion?
Thanks,
Guy. -
5. Re: Rss feed
michaelcourcy Sep 7, 2008 10:14 PM (in response to bashan)
the data inside a CDATA shouldn't be manipulated...I agree
Beside if the rendering (facelet) engine take the decision to convert your html inside the CDATA section, it should then take the decision to not interpret this ...
<h:graphicImage value="#{path:getVideoThumbMedium(video)}" styleClass="picture"/>
But it does interpret it, thus I may misunderstand something, I'm going to investigate this question.
-
6. Re: Rss feed
susnet.susanne.susnet.se Sep 8, 2008 1:25 AM (in response to bashan)Did you have a look at this?
http://seamframework.org/Community/CDATAAndFormattedTextInRSSXML -
7. Re: Rss feed
bashan Sep 8, 2008 1:42 AM (in response to bashan)Thanks,
Yes, I have seen this post. My problem is that I don't have a single property like: blogEntry.content.
I have there a whole block of HTML.Did I miss something in that solution that might help me?