RssTransform is a Google Search Appliance Stylesheet to transform GSA results on standar RSS format
RSS is a standar XML-formed file used to syndicate content through the web. More info: http://en.wikipedia.org/wiki/RSS_(file_format)
Just easy as creating a new interface for the GSA and upload the RSS transform to serve results on RSS format
No. RSSTransform dont provide user interface for normal query on GSA, it just provides RSS formatted GSA Results. Then it means that we can't use it as direct stylsheet but we can use it over default GSA stylesheet or XHTML stylesheet from OpenSource.
Right, we have the main part done :) You can be able of see the output by querying the GSA with URL's like http:://mycorp.com/GSASEARCH/search? q=mysearch&proxystylesheet=MYRSSINTERFACENAME&site=default_collection&output=xml_no_dtd As we said, this is not a user friendly format to present results. With the RSSTransform package comes 2 more XSLT files, XHTML Stylesheet and default HTML Google Stylesheet modified and predetermined to exploit the functionallity of RSSTransform interface. Create a new interface with one of 2 the two stylesheets and change the parameter seetings on the xsl:variables like:
<!-- Added For Feed Generation-->
<!-- show_rss = 0 for not generate Feed links, show_rss=! 0 otherwise -->
<xsl:variable name="show_rss">1</xsl:variable>
<!-- Num_Rss_Docs determine the number of results on the feed: 10,20,30,50,100
20 or 30 Results are recommended -->
<xsl:variable name="Num_Rss_Docs">20</xsl:variable>
<!-- show_rss_image = 0 for not add rss image, show_rss_image=! 0 otherwise -->
<xsl:variable name="show_rss_image">1</xsl:variable>
<!-- Determines the path for the feed image-->
<xsl:variable name="RSS_image_path">./image/feed-icon-24x24.jpg</xsl:variable>
<!-- RssStyleSheetName is the name for the GSA frontend with the RSS Transformation -->
<xsl:variable name="RssStylesheetName">MyRssStylesheetName</xsl:variable>
<!-- FeedSort determines the sort mode for date(0) or relevance(1)-->
<xsl:variable name="FeedSort">0</xsl:variable>
<xsl:variable name="StringSort">
<xsl:choose>
<xsl:when test="$FeedSort=0">date:D:S:d1</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- *** Feed_url *** For generating the feed link -->
<xsl:variable name="feed_url">
<xsl:text>search?</xsl:text><xsl:for-each select="/GSP/PARAM[((@name != 'start') and (@name != 'ip') and (@name!='proxystylesheet') and (@name!='sort') and(@name!='filter') )]">
<xsl:value-of select="@name"/><xsl:text>=</xsl:text>
<xsl:value-of select="@original_value"/>
<xsl:if test="position() != last()">
<xsl:text disable-output-escaping="yes">&</xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:text>&proxystylesheet=</xsl:text><xsl:value-of select="$RssStylesheetName"/>
<xsl:text>&sort=</xsl:text><xsl:value-of select="$StringSort"/>
<xsl:text>&filter=0</xsl:text>
</xsl:variable>
<!-- End addition -->
To add RSS feed functionality to your GSA:
RSSTransform.xslt file into your new Front End's XSLT Stylesheet Editor/image/feed-icon-24x24.jpg onto a web server accessible to your GSAgsa-xhtml.en.xslt file as follows:
gsa-xhtml.en.xslt into your chosen Front End's XSLT Stylesheet Editor
See <!-- Added For Feed Generation--> code section above
<xsl:if test="$show_rss != '0'">
<link rel="alternate" type="application/rss+xml" title="Sindicate to this Search" href="{$feed_url}" />
</xsl:if>
<xsl:if test="$show_rss!='0' and $show_rss_image!='0'"><br/><span class="rss" style="float:right">
<xsl:call-template name="ShowRssImage"></xsl:call-template>
</span>
</xsl:if>
<!-- **********************************************************************
Feed Image Template
**********************************************************************-->
<xsl:template name="ShowRssImage">
<a href="{$feed_url}" title="Sindicate to this search"><img src="{$RSS_image_path}" alt="Sindicate to {/GSP/Q} search results"/></a>
</xsl:template>
gsa-xhtml.en.xslt) in step (2) you can use a version that corresponds to the default stylesheet given with the GSA. To do this substitute in the given Default-GSA-HTML.xslt in place of gsa-xhtml.en.xslt in step (2) above.
Both XSLT GSA stylesheets have been modified for adding all the feed control. Basically its a added a <ink rel="altertate" that notifies automatically to browser that exists a live bookmark on this site. And i've added a standard rss icon under Sort By options.That's all :)
I've you have any questions about RSSTransformation email me at valvarez AT sitesa DOT com