Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XSLT Stylesheet - Rewrite multiple URLs

Status
Not open for further replies.

mlow168

MIS
Mar 9, 2006
2
US
I'm a novice at XSLT and working on getting a Google Search Appliance setup at my organization. I'm trying to rewrite a URL so it will be displayed properly on the search results. The following script provided from Google's support performs the task perfectly with a single URL in the XSLT stylesheet. When asked if they had an example of how to rewrite multiple URLs they mentioned that custom XLST development is beyond the scope of their support.

Here is what I'm working with:

<!--
**********************************************************************
A single result (do not customize)


**********************************************************************
--> <xsl:template match="R">


Inside this section, look for the definition of the $stripped_url
variable (line 1788):


<xsl:variable name="stripped_url" select="substring-after(U, '://')"/>


As a basic example of how to perform the URL rewrite functionality
which you requested, you might replace this line with the following
code:


<xsl:variable name="rewrite_from"
select="'<xsl:variable name="rewrite_to"
select="'<xsl:variable name="rewritten_url">
<xsl:choose>
<xsl:when test="(substring-before(U, $rewrite_from) = '')
and contains(U, $rewrite_from)">
<xsl:value-of
select="concat($rewrite_to, substring-after(U,
$rewrite_from))"/>
</xsl:when>
<xsl:eek:therwise>
<xsl:value-of select="U"/>
</xsl:eek:therwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="stripped_url"
select="substring-after($rewritten_url, '://')"/>


Also, you would need to replace this code (lines 1832-1834):


<xsl:text disable-output-escaping='yes'>&lt;a href="</xsl:text>
<xsl:value-of disable-output-escaping='yes' select="U"/> <xsl:text
disable-output-escaping='yes'>"&gt;</xsl:text>


with the following code to use the rewritten URL:


<xsl:text disable-output-escaping='yes'>&lt;a href="</xsl:text>
<xsl:value-of disable-output-escaping='yes' select="$rewritten_url"/>
<xsl:text disable-output-escaping='yes'>"&gt;</xsl:text> "
 
Need more info

Jon

"I don't regret this, but I both rue and lament it.
 
Here's the code (look for Single Search Result):

<!-- *** START OF STYLESHEET *** -->

<!-- **********************************************************************
XSL to format the search output for Google Search Appliance
********************************************************************** -->
<xsl:stylesheet xmlns:xsl=" version="1.0">
<xsl:eek:utput method="html"/>

<!-- **********************************************************************
Logo setup (can be customized)
- whether to show logo: 0 for FALSE, 1 (or non-zero) for TRUE
- logo url
- logo size: '' for default image size
********************************************************************** -->
<xsl:variable name="show_logo">1</xsl:variable>
<xsl:variable name="logo_url"><xsl:variable name="logo_width">137</xsl:variable>
<xsl:variable name="logo_height">100</xsl:variable>

<!-- **********************************************************************
Global Style variables (can be customized): '' for using browser's default
********************************************************************** -->

<xsl:variable name="global_font">arial,sans-serif</xsl:variable>
<xsl:variable name="global_font_size"></xsl:variable>
<xsl:variable name="global_bg_color">#ffffff</xsl:variable>
<xsl:variable name="global_text_color">#000000</xsl:variable>
<xsl:variable name="global_link_color">#0000cc</xsl:variable>
<xsl:variable name="global_vlink_color">#551a8b</xsl:variable>
<xsl:variable name="global_alink_color">#ff0000</xsl:variable>


<!-- **********************************************************************
Result page components (can be customized)
- whether to show a component: 0 for FALSE, non-zero (e.g., 1) for TRUE
- text and style
********************************************************************** -->

<!-- *** choose result page header: '', 'provided', 'mine', or 'both' *** -->
<xsl:variable name="choose_result_page_header">both</xsl:variable>

<!-- *** customize provided result page header *** -->
<xsl:variable name="show_result_page_adv_link">1</xsl:variable>
<xsl:variable name="adv_search_anchor_text">Advanced Search</xsl:variable>
<xsl:variable name="show_result_page_help_link">1</xsl:variable>
<xsl:variable name="search_help_anchor_text">Search Tips</xsl:variable>

<!-- *** search boxes *** -->
<xsl:variable name="show_top_search_box">1</xsl:variable>
<xsl:variable name="show_bottom_search_box">1</xsl:variable>
<xsl:variable name="search_box_size">28</xsl:variable>

<!-- *** choose search button type: 'text' or 'image' *** -->
<xsl:variable name="choose_search_button">text</xsl:variable>
<xsl:variable name="search_button_text">Search</xsl:variable>
<xsl:variable name="search_button_image_url"></xsl:variable>
<xsl:variable name="search_subcollections_xslt"><xsl:choose>
<xsl:when test="PARAM[(@name='restrict') and (@value='ebmud_com')]">
<option value="ebmud_com" selected="selected">ebmud_com</option>
</xsl:when>
<xsl:eek:therwise>
<option value="ebmud_com">ebmud_com</option>
</xsl:eek:therwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="PARAM[(@name='restrict') and (@value='idrive')]">
<option value="idrive" selected="selected">idrive</option>
</xsl:when>
<xsl:eek:therwise>
<option value="idrive">idrive</option>
</xsl:eek:therwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="PARAM[(@name='restrict') and (@value='intranet')]">
<option value="intranet" selected="selected">intranet</option>
</xsl:when>
<xsl:eek:therwise>
<option value="intranet">intranet</option>
</xsl:eek:therwise>
</xsl:choose>
</xsl:variable>

<!-- *** search info bars *** -->
<xsl:variable name="show_search_info">1</xsl:variable>

<!-- *** choose separation bar: 'blue', 'line', 'nothing' *** -->
<xsl:variable name="choose_sep_bar">blue</xsl:variable>

<!-- *** navigation bars: '', 'google', 'link', or 'simple'*** -->
<xsl:variable name="show_top_navigation">1</xsl:variable>
<xsl:variable name="choose_bottom_navigation">google</xsl:variable>
<xsl:variable name="my_nav_align">right</xsl:variable>
<xsl:variable name="my_nav_size">-1</xsl:variable>
<xsl:variable name="my_nav_color">#6f6f6f</xsl:variable>

<!-- *** sort by date/relevance *** -->
<xsl:variable name="show_sort_by">1</xsl:variable>

<!-- *** spelling suggestions *** -->
<xsl:variable name="show_spelling">1</xsl:variable>
<xsl:variable name="spelling_text">Did you mean:</xsl:variable>
<xsl:variable name="spelling_text_color">#cc0000</xsl:variable>

<!-- *** synonyms suggestions *** -->
<xsl:variable name="show_synonyms">1</xsl:variable>
<xsl:variable name="synonyms_text">You could also try:</xsl:variable>
<xsl:variable name="synonyms_text_color">#cc0000</xsl:variable>

<!-- *** keymatch suggestions *** -->
<xsl:variable name="show_keymatch">1</xsl:variable>
<xsl:variable name="keymatch_text">KeyMatch</xsl:variable>
<xsl:variable name="keymatch_text_color">#2255aa</xsl:variable>
<xsl:variable name="keymatch_bg_color">#e8e8ff</xsl:variable>

<!-- **********************************************************************
Result elements (can be customized)
- whether to show an element ('1' for yes, '0' for no)
- font/size/color ('' for using style of the context)
********************************************************************** -->

<!-- *** result title and snippet *** -->
<xsl:variable name="show_res_title">1</xsl:variable>
<xsl:variable name="res_title_color">#0000cc</xsl:variable>
<xsl:variable name="res_title_size"></xsl:variable>
<xsl:variable name="show_res_snippet">1</xsl:variable>
<xsl:variable name="res_snippet_size">80%</xsl:variable>

<!-- *** keyword match (in title or snippet) *** -->
<xsl:variable name="res_keyword_color"></xsl:variable>
<xsl:variable name="res_keyword_size"></xsl:variable>
<xsl:variable name="res_keyword_format">b</xsl:variable> <!-- 'b' for bold -->

<!-- *** link URL *** -->
<xsl:variable name="show_res_url">1</xsl:variable>
<xsl:variable name="res_url_color">#008000</xsl:variable>
<xsl:variable name="res_url_size">-1</xsl:variable>

<!-- *** misc elements *** -->
<xsl:variable name="show_res_description">1</xsl:variable>
<xsl:variable name="show_res_size">1</xsl:variable>
<xsl:variable name="show_res_date">1</xsl:variable>
<xsl:variable name="show_res_cache">0</xsl:variable>

<!-- *** used in result cache link, similar pages link, and description *** -->
<xsl:variable name="faint_color">#6f6f6f</xsl:variable>

<!-- *** show secure results radio button *** -->
<xsl:variable name="show_secure_radio">0</xsl:variable>

<!-- **********************************************************************
Other variables (can be customized)
********************************************************************** -->

<!-- *** page title *** -->
<xsl:variable name="front_page_title">Search Home</xsl:variable>
<xsl:variable name="result_page_title">Search Results</xsl:variable>
<xsl:variable name="adv_page_title">Advanced Search</xsl:variable>
<xsl:variable name="error_page_title">Error</xsl:variable>

<!-- *** choose adv_search page header: '', 'provided', 'mine', or 'both' *** -->
<xsl:variable name="choose_adv_search_page_header">both</xsl:variable>

<!-- *** cached page header text *** -->
<xsl:variable name="cached_page_header_text">This is the cached copy of </xsl:variable>

<!-- *** error message text *** -->
<xsl:variable name="xml_error_msg_text">Unknown XML result type.</xsl:variable>
<xsl:variable name="xml_error_des_text">View page source to see the offending XML.</xsl:variable>

<!-- *** advanced search page panel background color *** -->
<xsl:variable name="adv_search_panel_bgcolor">#cbdced</xsl:variable>


<!-- **********************************************************************
My global page header/footer (can be customized)
********************************************************************** -->
<xsl:template name="my_page_header">
<!-- *** replace the following with your own xhtml code or replace the text
between the xsl:text tags with html escaped html code *** -->
<xsl:text disable-output-escaping="yes"> &lt;!-- Please enter html code below. --&gt;</xsl:text>
</xsl:template>

<xsl:template name="my_page_footer">
<span class="p">
<xsl:text disable-output-escaping="yes"> &lt;!-- Please enter html code below. --&gt;</xsl:text>
</span>
</xsl:template>


<!-- **********************************************************************
Logo template (can be customized)
********************************************************************** -->
<xsl:template name="logo">
<a href="{$home_url}"><img src="{$logo_url}"
width="{$logo_width}" height="{$logo_height}"
alt="Go to Search Home" border="0" /></a>
</xsl:template>


<!-- **********************************************************************
Search result page header (can be customized): logo and search box
********************************************************************** -->
<xsl:template name="result_page_header">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<xsl:if test="$show_logo != '0'">
<td rowspan="3" valign="top">
<xsl:call-template name="logo"/>
<xsl:call-template name="nbsp3"/>
</td>
</xsl:if>
<td nowrap="1">
<font size="-1">
<xsl:if test="$show_result_page_adv_link != '0'">
<a href="{$adv_search_url}">
<xsl:value-of select="$adv_search_anchor_text"/>
</a>
<xsl:call-template name="nbsp4"/>
</xsl:if>
<xsl:if test="$show_result_page_help_link != '0'">
<a href="{$help_url}">
<xsl:value-of select="$search_help_anchor_text"/>
</a>
</xsl:if>
<br/>
</font>
</td>
</tr>
<xsl:if test="$show_top_search_box != '0'">
<tr>
<td valign="middle">
<xsl:call-template name="search_box"/>
</td>
</tr>
</xsl:if>
<xsl:if test="/GSP/CT">
<tr>
<td valign="top">
<br/>
<xsl:call-template name="stopwords"/>
<br/>
</td>
</tr>
</xsl:if>
</table>
</xsl:template>


<!-- **********************************************************************
Separation bar variables (used in advanced search header and result page)
********************************************************************** -->
<xsl:variable name="sep_bar_bg_color">
<xsl:choose>
<xsl:when test="$choose_sep_bar = 'blue'">#3366cc</xsl:when>
<xsl:eek:therwise><xsl:value-of select="$global_bg_color"/></xsl:eek:therwise>
</xsl:choose>
</xsl:variable>

<xsl:variable name="sep_bar_text_color">
<xsl:choose>
<xsl:when test="$choose_sep_bar = 'blue'">#ffffff</xsl:when>
<xsl:eek:therwise><xsl:value-of select="$global_text_color"/></xsl:eek:therwise>
</xsl:choose>
</xsl:variable>


<!-- **********************************************************************
Advanced search page header HTML (can be customized)
********************************************************************** -->
<xsl:template name="advanced_search_header">
<table width="99%" border="0" cellpadding="0" cellspacing="2">
<tr>
<xsl:if test="$show_logo != '0'">
<td rowspan="2" width="1%">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="right" valign="bottom">
<xsl:call-template name="logo"/></td>
</tr>
</table>
</td>
</xsl:if>

<td valign="bottom" align="right"><font size="-1" class="p"></font></td>
</tr>

<tr>
<td valign="middle">
<table cellspacing="2" cellpadding="2" border="0" width="100%">
<tr bgcolor="{$sep_bar_bg_color}">
<td><font face="{$global_font}" color="{$sep_bar_text_color}">
<b><xsl:call-template name="nbsp"/>
<xsl:value-of select="$adv_page_title"/></b>
</font>
</td>
</tr>
</table>
</td>
</tr>
</table>
</xsl:template>


<!-- **********************************************************************
Cached page header (can be customized)
********************************************************************** -->
<xsl:template name="cached_page_header">
<xsl:param name="cached_page_url"/>

<table border="1" width="100%">
<tr>
<td>
<table border="1" width="100%" cellpadding="10" cellspacing="0"
bgcolor="{$global_bg_color}" color="{$global_bg_color}">
<tr>
<td>
<font face="{$global_font}" color="{$global_text_color}" size="-1">
<xsl:value-of select="$cached_page_header_text"/>
<a href="{$cached_page_url}"><font color="{$global_link_color}">
<xsl:value-of select="$cached_page_url"/></font></a>.<br/>
</font>
</td>
</tr>
</table>
</td>
</tr>
</table>
<hr/>
</xsl:template>


<!-- **********************************************************************
"Front door" search input page (can be customized)
********************************************************************** -->
<xsl:template name="front_door">
<html>
<xsl:call-template name="langHeadStart"/>
<title><xsl:value-of select="$front_page_title"/></title>
<xsl:call-template name="style"/>
<xsl:call-template name="langHeadEnd"/>

<body>

<xsl:call-template name="my_page_header"/>
<xsl:call-template name="result_page_header"/>
<hr/>
<xsl:call-template name="copyright"/>
<xsl:call-template name="my_page_footer"/>

</body>
</html>
</xsl:template>


<!-- **********************************************************************
Empty result set (can be customized)
********************************************************************** -->
<xsl:template name="no_RES">
<xsl:param name="query"/>
<span class="p">
<br/>
Your search - <b><xsl:value-of disable-output-escaping="yes"
select="$query"/></b> - did not match any documents.
<br/>
No pages were found containing <b>"<xsl:value-of
disable-output-escaping="yes" select="$query"/>"</b>.
<br/>
<br/>
Suggestions:
<ul>
<li>Make sure all words are spelled correctly.</li>
<li>Try different keywords.</li>
<li>Try more general keywords.</li>
</ul>
</span>
</xsl:template>


<!-- ######################################################################
We do not recommend changes to the following code. Google Technical
Support Personnel currently do not support customization of XSLT under
these Technical Support Services Guidelines. Such services may be
provided on a consulting basis, at Google's then-current consulting
services rates under a separate agreement, if Google personnel are
available. Please ask your Google Account Manager for more details if
you are interested in purchasing consulting services.
###################################################################### -->


<!-- **********************************************************************
Global Style (do not customize)
default font type/size/color, background color, link color
using HTML CSS (Cascading Style Sheets)
********************************************************************** -->
<xsl:template name="style">
<style>
<xsl:comment>
body,.d,.p,.s{background-color:<xsl:value-of select="$global_bg_color"/>}
body,td,div,.p,a,.d,.s{font-family:<xsl:value-of select="$global_font"/>}
body,td,div,.p,a,.d{font-size: <xsl:value-of select="$global_font_size"/>}
body,div,td,.p,.s{color:<xsl:value-of select="$global_text_color"/>}
.s,.f,.f a{font-size: <xsl:value-of select="$res_snippet_size"/>}
.l{font-size: <xsl:value-of select="$res_title_size"/>}
.l{color: <xsl:value-of select="$res_title_color"/>}
a:link,.w,.w a:link{color:<xsl:value-of select="$global_link_color"/>}
a:visited,.f a:visited{color:<xsl:value-of select="$global_vlink_color"/>}
a:active,.f a:active{color:<xsl:value-of select="$global_alink_color"/>}
.t{color:<xsl:value-of select="$sep_bar_text_color"/>}
.t{background-color:<xsl:value-of select="$sep_bar_bg_color"/>}
.z{display:none}
.f,.f:link,.f a:link{color:<xsl:value-of select="$faint_color"/>}
.i,.i:link{color:#a90a08}
.a,.a:link{color:<xsl:value-of select="$res_url_color"/>}
div.n {margin-top: 1ex}
.n a{font-size: 10pt; color:<xsl:value-of select="$global_text_color"/>}
.n .i{font-size: 10pt; font-weight:bold}
.q a:visited,.q a:link,.q a:active,.q {text-decoration: none; color:#0000cc;}
.b,.b a{font-size: 12pt; color:#0000cc; font-weight:bold}
.d{font-family:<xsl:value-of select="$global_font"/>;
margin-right:1em; margin-left:1em;}
</xsl:comment>
</style>
</xsl:template>


<!-- **********************************************************************
URL variables (do not customize)
********************************************************************** -->

<!-- *** help_url: search tip URL (html file) *** -->
<xsl:variable name="help_url">/basics.html</xsl:variable>

<!-- *** base_url: collection info *** -->
<xsl:variable name="base_url"><xsl:for-each
select="/GSP/PARAM[@name = 'client' or
@name = 'site' or
@name = 'num' or
@name = 'output' or
@name = 'proxystylesheet' or
@name = 'sitesearch' or
@name = 'access' or
(@name = 'restrict' and
$search_subcollections_xslt = '') or
@name = 'lr' or
@name = 'ie' or
@name = 'oe']"><xsl:value-of select="@name"
/>=<xsl:value-of select="@original_value"
/><xsl:if test="position() != last()">&amp;</xsl:if></xsl:for-each>
</xsl:variable>

<!-- *** home_url: /search? + collection info + &proxycustom=<HOME/> *** -->
<xsl:variable name="home_url">/search?<xsl:value-of select="$base_url"
/>&amp;proxycustom=&lt;HOME/&gt;</xsl:variable>

<!-- *** nav_url: does not include q, as_, start elements *** -->
<xsl:variable name="nav_url"><xsl:for-each
select="/GSP/PARAM[(@name != 'q') and
not(contains(@name, 'as_')) and
(@name != 'start')]">
<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">&amp;</xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:variable>

<!-- *** synonym_url: does not include q, as_q, and start elements *** -->
<xsl:variable name="synonym_url"><xsl:for-each
select="/GSP/PARAM[(@name != 'q') and
(@name != 'as_q') and
(@name != 'start')]">
<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">&amp;</xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:variable>

<!-- *** search_url: $nav_url + query elements *** -->
<xsl:variable name="search_url"><xsl:for-each
select="/GSP/PARAM[(@name != 'start')]">
<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">&amp;</xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:variable>

<!-- *** filter_url: everything except resetting "filter=" *** -->
<xsl:variable name="filter_url">/search?<xsl:for-each
select="/GSP/PARAM[(@name != 'filter')]">
<xsl:value-of select="@name"/><xsl:text>=</xsl:text>
<xsl:value-of select="@original_value"/>
<xsl:text disable-output-escaping="yes">&amp;</xsl:text>
</xsl:for-each><xsl:text>filter=</xsl:text>
</xsl:variable>

<!-- *** adv_search_url: /search? + $search_url + as_q=$q *** -->
<xsl:variable name="adv_search_url">/search?<xsl:value-of
select="$search_url"/>&amp;proxycustom=&lt;ADVANCED/&gt;</xsl:variable>

<!-- **********************************************************************
Search Parameters (do not customize)
********************************************************************** -->

<!-- *** num_results: actual num_results per page *** -->
<xsl:variable name="num_results">
<xsl:choose>
<xsl:when test="/GSP/PARAM[(@name='num') and (@value!='')]">
<xsl:value-of select="/GSP/PARAM[@name='num']/@value"/>
</xsl:when>
<xsl:eek:therwise>
<xsl:value-of select="10"/>
</xsl:eek:therwise>
</xsl:choose>
</xsl:variable>

<!-- *** form_params: parameters carried by the search input form *** -->
<xsl:template name="form_params">
<xsl:for-each
select="PARAM[@name != 'q' and
not(contains(@name, 'as_')) and
@name != 'btnG' and
@name != 'btnI' and
@name != 'filter' and
@name != 'start' and
@name != 'access' and
@name != 'ip']">
<xsl:if test="@name != 'restrict' or $search_subcollections_xslt = ''">
<input type="hidden" name="{@name}" value="{@value}" />
</xsl:if>
<xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template>

<!-- *** html_escaped_query: q = /GSP/Q *** -->
<xsl:variable name="qval">
<xsl:value-of select="/GSP/Q"/>
</xsl:variable>

<xsl:variable name="html_escaped_query">
<xsl:value-of select="normalize-space($qval)"
disable-output-escaping="yes"/>
</xsl:variable>

<!-- *** stripped_search_query: q, as_q, ... for cache highlight *** -->
<xsl:variable name="stripped_search_query"><xsl:for-each
select="/GSP/PARAM[(@name = 'q') or
(@name = 'as_q') or
(@name = 'as_oq') or
(@name = 'as_epq')]"><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:variable>

<xsl:variable name="access">
<xsl:choose>
<xsl:when test="/GSP/PARAM[(@name='access') and ((@value='s') or (@value='a'))]">
<xsl:value-of select="/GSP/PARAM[@name='access']/@original_value"/>
</xsl:when>
<xsl:eek:therwise>p</xsl:eek:therwise>
</xsl:choose>
</xsl:variable>

<!-- **********************************************************************
Figure out what kind of page this is (do not customize)
********************************************************************** -->
<xsl:template match="GSP">
<xsl:choose>
<xsl:when test="Q">
<xsl:call-template name="search_results"/>
</xsl:when>
<xsl:when test="CACHE">
<xsl:call-template name="cached_page"/>
</xsl:when>
<xsl:when test="CUSTOM/HOME">
<xsl:call-template name="front_door"/>
</xsl:when>
<xsl:when test="CUSTOM/ADVANCED">
<xsl:call-template name="advanced_search"/>
</xsl:when>
<xsl:when test="H1">
<xsl:call-template name="server_error"/>
</xsl:when>
<xsl:eek:therwise>
<xsl:call-template name="error_page">
<xsl:with-param name="errorMessage" select="$xml_error_msg_text"/>
<xsl:with-param name="errorDescription" select="$xml_error_des_text"/>
</xsl:call-template>
</xsl:eek:therwise>
</xsl:choose>
</xsl:template>

<!-- **********************************************************************
Cached page (do not customize)
********************************************************************** -->
<xsl:template name="cached_page">
<xsl:variable name="cached_page_url" select="CACHE/CACHE_URL"/>
<xsl:variable name="cached_page_html" select="CACHE/CACHE_HTML"/>

<!-- *** decide whether to load html page or pdf file *** -->
<xsl:if test="'.pdf' != substring($cached_page_url,
1 + string-length($cached_page_url) - string-length('.pdf'))">
<base href="{$cached_page_url}"/>
</xsl:if>

<!-- *** display cache page header *** -->
<xsl:call-template name="cached_page_header">
<xsl:with-param name="cached_page_url" select="$cached_page_url"/>
</xsl:call-template>

<!-- *** display cached contents *** -->
<xsl:value-of select="$cached_page_html" disable-output-escaping="yes"/>
</xsl:template>

<xsl:template name="escape_quot">
<xsl:param name="string"/>
<xsl:call-template name="replace_string">
<xsl:with-param name="find" select="'&quot;'"/>
<xsl:with-param name="replace" select="'&amp;quot;'"/>
<xsl:with-param name="string" select="$string"/>
</xsl:call-template>
</xsl:template>

<!-- **********************************************************************
Advanced search page (do not customize)
********************************************************************** -->
<xsl:template name="advanced_search">

<xsl:variable name="html_escaped_as_q">
<xsl:call-template name="escape_quot">
<xsl:with-param name="string" select="/GSP/PARAM[@name='q']/@value"/>
</xsl:call-template>
<xsl:call-template name="escape_quot">
<xsl:with-param name="string" select="/GSP/PARAM[@name='as_q']/@value"/>
</xsl:call-template>
</xsl:variable>

<xsl:variable name="html_escaped_as_epq">
<xsl:call-template name="escape_quot">
<xsl:with-param name="string" select="/GSP/PARAM[@name='as_epq']/@value"/>
</xsl:call-template>
</xsl:variable>

<xsl:variable name="html_escaped_as_oq">
<xsl:call-template name="escape_quot">
<xsl:with-param name="string" select="/GSP/PARAM[@name='as_oq']/@value"/>
</xsl:call-template>
</xsl:variable>

<xsl:variable name="html_escaped_as_eq">
<xsl:call-template name="escape_quot">
<xsl:with-param name="string" select="/GSP/PARAM[@name='as_eq']/@value"/>
</xsl:call-template>
</xsl:variable>

<html>
<xsl:call-template name="langHeadStart"/>
<title><xsl:value-of select="$adv_page_title"/></title>
<xsl:call-template name="style"/>

<!-- script type="text/javascript" -->
<script>
<xsl:comment>
function setFocus() {
document.f.as_q.focus(); }
function esc(x){
x = escape(x).replace(/\+/g, "%2b");
if (x.substring(0,2)=="\%u") x="";
return x;
}
function collecturl(target, custom) {
var p = new Array();var i = 0;var url="";var z = document.f;
if (z.as_q.value.length) {p[i++] = 'as_q=' + esc(z.as_q.value);}
if (z.as_epq.value.length) {p[i++] = 'as_epq=' + esc(z.as_epq.value);}
if (z.as_oq.value.length) {p[i++] = 'as_oq=' + esc(z.as_oq.value);}
if (z.as_eq.value.length) {p[i++] = 'as_eq=' + esc(z.as_eq.value);}
if (z.as_sitesearch.value.length)
{p[i++]='as_sitesearch='+esc(z.as_sitesearch.value);}
if (z.as_lq.value.length) {p[i++] = 'as_lq=' + esc(z.as_lq.value);}
if (z.as_occt.options[z.as_occt.selectedIndex].value.length)
{p[i++]='as_occt='+esc(z.as_occt.options[z.as_occt.selectedIndex].value);}
if (z.as_dt.options[z.as_dt.selectedIndex].value.length)
{p[i++]='as_dt='+esc(z.as_dt.options[z.as_dt.selectedIndex].value);}
if (z.lr.options[z.lr.selectedIndex].value != '') {p[i++] = 'lr=' +
z.lr.options[z.lr.selectedIndex].value;}
if (z.num.options[z.num.selectedIndex].value != '10')
{p[i++] = 'num=' + z.num.options[z.num.selectedIndex].value;}
if (z.sort.options[z.sort.selectedIndex].value != '')
{p[i++] = 'sort=' + z.sort.options[z.sort.selectedIndex].value;}
if (typeof(z.client) != 'undefined')
{p[i++] = 'client=' + esc(z.client.value);}
if (typeof(z.site) != 'undefined')
{p[i++] = 'site=' + esc(z.site.value);}
if (typeof(z.output) != 'undefined')
{p[i++] = 'output=' + esc(z.output.value);}
if (typeof(z.proxystylesheet) != 'undefined')
{p[i++] = 'proxystylesheet=' + esc(z.proxystylesheet.value);}
if (typeof(z.ie) != 'undefined')
{p[i++] = 'ie=' + esc(z.ie.value);}
if (typeof(z.oe) != 'undefined')
{p[i++] = 'oe=' + esc(z.oe.value);}
if (typeof(z.restrict) != 'undefined')
{p[i++] = 'restrict=' + esc(z.restrict.value);}
if (typeof(z.access) != 'undefined')
{p[i++] = 'access=' + esc(z.access.value);}
if (custom != '')
{p[i++] = 'proxycustom=' + '&lt;ADVANCED/&gt;';}
if (p.length &gt; 0) {
url = p[0];
for (var j = 1; j &lt; p.length; j++) { url += "&amp;" + p[j]; }}
location.href = target + '?' + url;
}
// </xsl:comment>
</script>

<xsl:call-template name="langHeadEnd"/>

<body class="d" onload="setFocus()">

<!-- *** Customer's own advanced search page header *** -->
<xsl:if test="$choose_adv_search_page_header = 'mine' or
$choose_adv_search_page_header = 'both'">
<xsl:call-template name="my_page_header"/>
</xsl:if>

<!--====Advanced Search Header======-->
<xsl:if test="$choose_adv_search_page_header = 'provided' or
$choose_adv_search_page_header = 'both'">
<xsl:call-template name="advanced_search_header"/>
</xsl:if>

<!--====Carry over Search Parameters======-->
<form method="get" action="/search" name="f">
<xsl:if test="PARAM[@name='client']">
<input type="hidden" name="client"
value="{PARAM[@name='client']/@value}" />
</xsl:if>
<xsl:if test="PARAM[@name='site']">
<input type="hidden" name="site" value="{PARAM[@name='site']/@value}"/>
</xsl:if>
<xsl:if test="PARAM[@name='output']">
<input type="hidden" name="output"
value="{PARAM[@name='output']/@value}" />
</xsl:if>
<xsl:if test="PARAM[@name='proxystylesheet']">
<input type="hidden" name="proxystylesheet"
value="{PARAM[@name='proxystylesheet']/@value}" />
</xsl:if>
<xsl:if test="PARAM[@name='ie']">
<input type="hidden" name="ie"
value="{PARAM[@name='ie']/@value}" />
</xsl:if>
<xsl:if test="PARAM[@name='oe']">
<input type="hidden" name="oe"
value="{PARAM[@name='oe']/@value}" />
</xsl:if>
<xsl:if test="PARAM[@name='restrict'] and
$search_subcollections_xslt = ''">
<input type="hidden" name="restrict"
value="{PARAM[@name='restrict']/@value}" />
</xsl:if>

<!--====Advanced Search Options======-->

<table cellpadding="6" cellspacing="0" border="0" width="99%">
<tr>
<td><b>Advanced Web Search</b></td>
</tr>
</table>

<table cellspacing="0" cellpadding="3" border="0" width="99%">
<tr bgcolor="{$adv_search_panel_bgcolor}">
<td>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr bgcolor="{$adv_search_panel_bgcolor}">
<td>
<table width="100%" cellspacing="0" cellpadding="2"
border="0">
<tr>
<td valign="top" width="15%"><font size="-1"><br />
<b>Find results</b></font> </td>

<td width="85%">
<table width="100%" cellpadding="2"
border="0" cellspacing="0">
<tr>
<td><font size="-1">with <b>all</b>
of the words</font></td>

<td>
<xsl:text disable-output-escaping="yes">
&lt;input type=&quot;text&quot;
name=&quot;as_q&quot;
size=&quot;25&quot; value=&quot;</xsl:text>
<xsl:value-of disable-output-escaping="yes"
select="$html_escaped_as_q"/>
<xsl:text disable-output-escaping="yes">&quot;&gt;</xsl:text>

<script type="text/javascript">
<xsl:comment>
document.f.as_q.focus();
// </xsl:comment>
</script>
</td>

<td valign="top" rowspan="4">
<font size="-1">
<select name="num">
<xsl:choose>
<xsl:when test="PARAM[(@name='num') and (@value!='10')]">
<option value="10">10 results</option>
</xsl:when>
<xsl:eek:therwise>
<option value="10" selected="selected">10 results</option>
</xsl:eek:therwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="PARAM[(@name='num') and (@value='20')]">
<option value="20" selected="selected">20 results</option>
</xsl:when>
<xsl:eek:therwise>
<option value="20">20 results</option>
</xsl:eek:therwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="PARAM[(@name='num') and (@value='30')]">
<option value="30" selected="selected">30 results</option>
</xsl:when>
<xsl:eek:therwise>
<option value="30">30 results</option>
</xsl:eek:therwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="PARAM[(@name='num') and (@value='50')]">
<option value="50" selected="selected">50 results</option>
</xsl:when>
<xsl:eek:therwise>
<option value="50">50 results</option>
</xsl:eek:therwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="PARAM[(@name='num') and (@value='100')]">
<option value="100" selected="selected">100 results</option>
</xsl:when>
<xsl:eek:therwise>
<option value="100">100 results</option>
</xsl:eek:therwise>
</xsl:choose>
</select>
</font>
</td>
<xsl:call-template name="subcollection_menu"/>
<td>
<font size="-1">
<input type="submit" name="btnG"
value="{$search_button_text}" />
</font>
</td>
</tr>

<tr>
<td nowrap="nowrap"><font size="-1">with the
<b>exact phrase</b></font></td>

<td>
<xsl:text disable-output-escaping="yes">
&lt;input type=&quot;text&quot;
name=&quot;as_epq&quot;
size=&quot;25&quot; value=&quot;</xsl:text>
<xsl:value-of disable-output-escaping="yes"
select="$html_escaped_as_epq"/>
<xsl:text disable-output-escaping="yes">&quot;&gt;</xsl:text>
</td>
</tr>

<tr>
<td nowrap="nowrap"><font size="-1">with <b>any</b>
of the words</font></td>

<td>
<xsl:text disable-output-escaping="yes">
&lt;input type=&quot;text&quot;
name=&quot;as_oq&quot;
size=&quot;25&quot; value=&quot;</xsl:text>
<xsl:value-of disable-output-escaping="yes"
select="$html_escaped_as_oq"/>
<xsl:text disable-output-escaping="yes">&quot;&gt;</xsl:text>
</td>
</tr>

<tr>
<td nowrap="nowrap"><font size="-1"><b>without</b>
the words</font></td>

<td>
<xsl:text disable-output-escaping="yes">
&lt;input type=&quot;text&quot;
name=&quot;as_eq&quot;
size=&quot;25&quot; value=&quot;</xsl:text>
<xsl:value-of disable-output-escaping="yes"
select="$html_escaped_as_eq"/>
<xsl:text disable-output-escaping="yes">&quot;&gt;</xsl:text>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>

<tr bgcolor="{$global_bg_color}">
<td>
<table width="100%" cellspacing="0"
cellpadding="2" border="0">
<tr>
<td width="15%"><font size="-1"><b>Language</b></font></td>

<td width="40%"><font size="-1">Return pages written
in</font></td>

<td><font size="-1">

<xsl:choose>
<xsl:when test="PARAM[(@name='oe') and (@value!='')]">
<xsl:text disable-output-escaping="yes">&lt;select name=&quot;lr&quot;&gt;</xsl:text>
</xsl:when>
<xsl:eek:therwise>
<xsl:text disable-output-escaping="yes">&lt;select name=&quot;lr&quot; onchange=&quot;javascript:collecturl('/search', 'adv');&quot;&gt;</xsl:text>
</xsl:eek:therwise>
</xsl:choose>

<option value="">any language</option>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_zh-CN')]">
<option value="lang_zh-CN"
selected="selected">Chinese (Simplified)</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_zh-CN">Chinese (Simplified)</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_zh-TW')]">
<option value="lang_zh-TW"
selected="selected">Chinese (Traditional)</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_zh-TW">Chinese (Traditional)</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_cs')]">
<option value="lang_cs" selected="selected">Czech</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_cs">Czech</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_da')]">
<option value="lang_da" selected="selected">Danish</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_da">Danish</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_nl')]">
<option value="lang_nl" selected="selected">Dutch</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_nl">Dutch</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_en')]">
<option value="lang_en" selected="selected">English</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_en">English</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_et')]">
<option value="lang_et" selected="selected">Estonian</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_et">Estonian</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_fi')]">
<option value="lang_fi" selected="selected">Finnish</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_fi">Finnish</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_fr')]">
<option value="lang_fr" selected="selected">French</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_fr">French</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_de')]">
<option value="lang_de" selected="selected">German</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_de">German</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_el')]">
<option value="lang_el" selected="selected">Greek</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_el">Greek</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_iw')]">
<option value="lang_iw" selected="selected">Hebrew</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_iw">Hebrew</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_hu')]">
<option value="lang_hu" selected="selected">Hungarian</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_hu">Hungarian</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_is')]">
<option value="lang_is" selected="selected">Icelandic</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_is">Icelandic</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_it')]">
<option value="lang_it" selected="selected">Italian</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_it">Italian</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_ja')]">
<option value="lang_ja" selected="selected">Japanese</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_ja">Japanese</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_ko')]">
<option value="lang_ko" selected="selected">Korean</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_ko">Korean</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_lv')]">
<option value="lang_lv" selected="selected">Latvian</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_lv">Latvian</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_lt')]">
<option value="lang_lt" selected="selected">Lithuanian</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_lt">Lithuanian</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_no')]">
<option value="lang_no" selected="selected">Norwegian</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_no">Norwegian</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_pl')]">
<option value="lang_pl" selected="selected">Polish</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_pl">Polish</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_pt')]">
<option value="lang_pt" selected="selected">Portuguese</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_pt">Portuguese</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_ro')]">
<option value="lang_ro" selected="selected">Romanian</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_ro">Romanian</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_ru')]">
<option value="lang_ru" selected="selected">Russian</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_ru">Russian</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_es')]">
<option value="lang_es" selected="selected">Spanish</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_es">Spanish</option>
</xsl:eek:therwise>
</xsl:choose>

<xsl:choose>
<xsl:when test="PARAM[(@name='lr') and (@value='lang_sv')]">
<option value="lang_sv" selected="selected">Swedish</option>
</xsl:when>
<xsl:eek:therwise>
<option value="lang_sv">Swedish</option>
</xsl:eek:therwise>
</xsl:choose>
<xsl:text disable-output-escaping="yes">&lt;/select&gt;</xsl:text>
</font></td>
</tr>
</table>
</td>
</tr>

<tr bgcolor="{$global_bg_color}">
<td>
<table width="100%" cellspacing="0"
cellpadding="2" border="0">
<tr>
<td width="15%"><font size="-1"><b>Occurrences</b></font></td>

<td nowrap="nowrap" width="40%"><font size="-1">Return
results where my terms occur</font></td>

<td><font size="-1"><select
name="as_occt">
<xsl:choose>
<xsl:when test="PARAM[(@name='as_occt') and (@value!='any')]">
<option value="any"> anywhere in the page </option>
</xsl:when>
<xsl:eek:therwise>
<option value="any" selected="selected">
anywhere in the page
</option>
</xsl:eek:therwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="PARAM[(@name='as_occt') and (@value='title')]">
<option value="title" selected="selected">in the title of the page</option>
</xsl:when>
<xsl:eek:therwise>
<option value="title">in the title of the page</option>
</xsl:eek:therwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="PARAM[(@name='as_occt') and (@value='url')]">
<option value="url" selected="selected">in the url of the page</option>
</xsl:when>
<xsl:eek:therwise>
<option value="url">in the url of the page</option>
</xsl:eek:therwise>
</xsl:choose>
</select></font></td>
</tr>
</table>
</td>
</tr>

<tr bgcolor="{$global_bg_color}">
<td>
<table width="100%" cellpadding="2"
cellspacing="0" border="0">
<tr>
<td width="15%"><font size="-1"><b>Domains</b></font></td>

<td width="40%" nowrap="nowrap"><font size="-1"><select
name="as_dt">
<xsl:choose>
<xsl:when test="PARAM[(@name='as_dt') and (@value='i')]">
<option value="i" selected="selected">Only</option>
</xsl:when>
<xsl:eek:therwise>
<option value="i">Only</option>
</xsl:eek:therwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="PARAM[(@name='as_dt') and (@value='e')]">
<option value="e" selected="selected">Don't</option>
</xsl:when>
<xsl:eek:therwise>
<option value="e">Don't</option>
</xsl:eek:therwise>
</xsl:choose>
</select>return results from the site or domain</font></td>

<td>
<table cellpadding="0" cellspacing="0"
border="0">
<tr>
<td>
<xsl:choose>
<xsl:when test="PARAM[@name='as_sitesearch']">
<input type="text" size="25"
value="{PARAM[@name='as_sitesearch']/@value}"
name="as_sitesearch" />
</xsl:when>
<xsl:eek:therwise>
<input type="text" size="25" value="" name="as_sitesearch" />
</xsl:eek:therwise>
</xsl:choose>
</td>
</tr>

<tr>
<td valign="top" nowrap="nowrap"><font size="-1">
<i>e.g. google.com, .org</i></font></td>
</tr>
</table>
</td>
</tr>

<!-- Sort by Date feature -->
<tr>
<td width="15%"><font size="-1"><b>Sort</b></font></td>

<td width="40%" nowrap="nowrap"><font size="-1"><select
name="sort">
<xsl:choose>
<xsl:when test="PARAM[(@name='sort') and (@value='')]">
<option value="" selected="selected">by Relevance</option>
</xsl:when>
<xsl:eek:therwise>
<option value="">by Relevance</option>
</xsl:eek:therwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="PARAM[(@name='sort') and (@value='date:D:S:d1')]">
<option value="date:D:S:d1" selected="selected">by Date</option>
</xsl:when>
<xsl:eek:therwise>
<option value="date:D:S:d1">by Date</option>
</xsl:eek:therwise>
</xsl:choose>
</select></font></td>
</tr>
<!-- Secure Search feature -->
<xsl:if test="$show_secure_radio != '0'">
<tr>
<td width="15%"><font size="-1"><b>Security</b></font></td>

<td width="40%" nowrap="nowrap"><font size="-1">
<xsl:choose>
<xsl:when test="$access='p'">
<input type="radio" name="access" value="p" checked="checked" />Search public content only
</xsl:when>
<xsl:eek:therwise>
<input type="radio" name="access" value="p"/>Search public content only
</xsl:eek:therwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="$access='a'">
<input type="radio" name="access" value="a" checked="checked" />Search public and secure content (login required)
</xsl:when>
<xsl:eek:therwise>
<input type="radio" name="access" value="a"/>Search public and secure content (login required)
</xsl:eek:therwise>
</xsl:choose>
</font></td>
</tr>
</xsl:if>
</table>
</td>
</tr>

</table>
</td>
</tr>
</table>
<br />
<br />

<!--====Page-Specific Search======-->
<table cellpadding="6" cellspacing="0" border="0">
<tr>
<td><b>Page-Specific Search</b></td>
</tr>
</table>

<table cellspacing="0" cellpadding="3" border="0"
width="99%">
<tr bgcolor="{$adv_search_panel_bgcolor}">
<td>
<table width="100%" cellpadding="0" cellspacing="0"
border="0">
<tr bgcolor="{$adv_search_panel_bgcolor}">
<td>

<table width="100%" cellpadding="2"
cellspacing="0" border="0">
<form method="get" action="/search" name="h">

<tr bgcolor="{$global_bg_color}">
<td width="15%"><font size="-1"><b>Links</b></font></td>

<td width="40%" nowrap="nowrap"><font size="-1">Find pages
that link to the page</font> </td>

<td nowrap="nowrap">
<xsl:choose>
<xsl:when test="PARAM[@name='as_lq']">
<input type="text" size="30"
value="{PARAM[@name='as_lq']/@value}"
name="as_lq" />
</xsl:when>
<xsl:eek:therwise>
<input type="text" size="30" value="" name="as_lq" />
</xsl:eek:therwise>
</xsl:choose>
<font size="-1">
<input type="submit" name="btnG" value="{$search_button_text}" /></font>
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>

<xsl:call-template name="copyright"/>

</form>

<!-- *** Customer's own advanced search page footer *** -->
<xsl:call-template name="my_page_footer"/>

</body>
</html>
</xsl:template>


<!-- **********************************************************************
Resend query with filter=p to disable path_filtering
if there is only one result cluster (do not customize)
********************************************************************** -->
<xsl:template name="redirect_if_few_results">
<xsl:variable name="count" select="count(/GSP/RES/R)"/>
<xsl:variable name="start" select="/GSP/RES/@SN"/>
<xsl:variable name="filterall"
select="count(/GSP/PARAM[@name='filter']) = 0"/>
<xsl:variable name="filter" select="/GSP/PARAM[@name='filter']/@value"/>

<xsl:if test="$count = 2 and $start = 1 and ($filterall or $filter = '1')">
<meta HTTP-EQUIV="REFRESH" content="0;url={$filter_url}p"/>
</xsl:if>
</xsl:template>


<!-- **********************************************************************
Search results (do not customize)
********************************************************************** -->
<xsl:template name="search_results">
<html>

<!-- *** HTML header and style *** -->
<xsl:call-template name="langHeadStart"/>
<xsl:call-template name="redirect_if_few_results"/>
<title><xsl:value-of select="$result_page_title"/>: <xsl:value-of
disable-output-escaping="yes" select="$html_escaped_query"/>
</title>
<xsl:call-template name="style"/>
<script type="text/javascript">
<xsl:comment>
function resetForms() {
for (var i = 0; i &lt; document.forms.length; i++ ) {
document.forms.reset();
}
}
//</xsl:comment>
</script>
<xsl:call-template name="langHeadEnd"/>

<body onLoad="resetForms()">

<!-- *** Customer's own result page header *** -->
<xsl:if test="$choose_result_page_header = 'mine' or
$choose_result_page_header = 'both'">
<xsl:call-template name="my_page_header"/>
</xsl:if>

<!-- *** Result page header *** -->
<xsl:if test="$choose_result_page_header = 'provided' or
$choose_result_page_header = 'both'">
<xsl:call-template name="result_page_header" />
</xsl:if>

<!-- *** Top separation bar *** -->
<xsl:if test="Q != ''">
<xsl:call-template name="top_sep_bar">
<xsl:with-param name="query" select="Q"/>
<xsl:with-param name="time" select="TM"/>
</xsl:call-template>
</xsl:if>

<xsl:if test="$choose_sep_bar = 'line'">
<hr size="1" color="gray"/>
</xsl:if>

<!-- *** Handle results (if any) *** -->
<xsl:choose>
<xsl:when test="RES or GM or Spelling or Synonyms or CT">
<xsl:call-template name="results">
<xsl:with-param name="query" select="Q"/>
<xsl:with-param name="time" select="TM"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="Q=''">
</xsl:when>
<xsl:eek:therwise>
<xsl:call-template name="no_RES">
<xsl:with-param name="query" select="Q"/>
</xsl:call-template>
</xsl:eek:therwise>
</xsl:choose>

<!-- *** Google footer *** -->
<xsl:call-template name="copyright"/>

<!-- *** Customer's own result page footer *** -->
<xsl:call-template name="my_page_footer"/>

<!-- *** HTML footer *** -->
</body>
</html>

</xsl:template>


<!-- **********************************************************************
Subcollection menu beside the search box
********************************************************************** -->
<xsl:template name="subcollection_menu">
<xsl:if test="$search_subcollections_xslt != ''">
<td valign="middle">
<select name="restrict">
<xsl:choose>
<xsl:when test="PARAM[(@name='restrict') and (@value!='')]">
<option value="">All documents</option>
</xsl:when>
<xsl:eek:therwise>
<option value="" selected="selected">All documents</option>
</xsl:eek:therwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="PARAM[(@name='restrict') and (@value='ebmud_com')]">
<option value="ebmud_com" selected="selected">ebmud_com</option>
</xsl:when>
<xsl:eek:therwise>
<option value="ebmud_com">ebmud_com</option>
</xsl:eek:therwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="PARAM[(@name='restrict') and (@value='idrive')]">
<option value="idrive" selected="selected">idrive</option>
</xsl:when>
<xsl:eek:therwise>
<option value="idrive">idrive</option>
</xsl:eek:t
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top