View Full Version : RSS Feed with Simple Pie
Im trying to use the simplepie package to parse the RSS output and it doesn't like the html inside of the <zoom:context> tag. (The span id="highlight" is what is causing the problem. The span tag and content inside it does not get displayed at all.
Is this the proper format to use within rss/xml? Or would standards approach be to either
a) wrap the context inside of <[CDATA[ ..data.. ]]> tags, or
b) use < > instead of < and > for the inner html?
In looking at other rss outputs, one of these 2 approaches appears to be how its handled.
Update: I just re-created the output and added <[CDATA[ ]]> around the content and it works as expected, including the inner html. I believe this to be the standard approach.
Anyway to enforce this?
wrensoft
02-01-2009, 08:29 AM
This was fixed in build 6.0.1006 (http://www.wrensoft.com/zoom/whatsnew.html). The XML output of the CGI was changed to omit highlight tags
was using cdata considered? I would prefer to keep the highliting tags there. And the reason I don't want to do my own highlighting is because I plan to rely heavily on synonyms, so I may know the words they searched for, but not know all the matching synonyms to highlight properly
Another reason I would lobby to keep that functionality: Now, it would appear to be misleading that if I check the box to perform highliting in the Results Page tab, it no longer respects that request - would this not be considered a bug?
If people wish to not include the highlight span tag, they can unselect the highlight checkbox and it won't show up.
Even if there is a setting to include <[CDATA[ specified within the Advanced > XML/RSS section, I think it is worth it to have that functionality to be RSS compliant and still keep the highlighting feature.
Otherwise, the xml output is now missing a feature that the other outputs allow that I don't think it needs to be. I think in this case it is possible to have our cake and eat it too! :)
wrensoft
02-01-2009, 06:42 PM
The problem was that highlighting was never in the V5 XML output (and no one has ever asked for it). And it's somewhat accidental inclusion in V6 resulted in a lot of existing code breaking when people did the V5 to V6 upgrade.
I guess I'm asking/pleading to make that a feature of the xml output, then.
If it were a simple configuration setting to enable and if enabled was wrapped in <[CDATA[ ... ]]>.
Any other CGI/XML users interested in highlighting turned on? I'm surprised others don't want that feature as I find it almost as a must-have for readability on the results page.
wrensoft
06-19-2009, 08:57 PM
Just an update on this highlighting request:
On the Advanced configuration window, click on Configure for the XML output. Then check the box.
"Highlight words in XML results"
This has been available since V6.0 build 1014 I think.
Thank you!!!! - I had already upgraded to 1015 2 weeks ago and didn't realize this was here. I try it out !!
I know beggars can't be choosers.....but...
When using an RSS reader such as I am (simplepie), it strips the xml content inside the content so basically makes this new feature unusable to me.
I believe the right approach would be to include the context inside of [[CDATA ]] wrapper in order for a valid RSS parser to return the full content (including the <zoom:highlight> tags ).
Also - any particular reason why the title doesn't have the highlighting capability?
Powered by vBulletin® Version 4.1.12 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.