* Andr� Malo wrote:

>> (One other thing: I'm not sure how good they are with sub-site searches;
>> ie, search only under /docs-2.0/.  I guess a little expirimenting will be
>> necessary.)
> 
> I'm currently dissecting their advanced search page to build our hidden
> fields properly (assuming these fields won't change quite often in future).
> A path thing is not there, but we could put a "hint word" like "Apache 2"
> or someting into one of the fields.

well ...
an example is online at:
<http://cvs.apache.org/~nd/manual/index.html.en>

There are reasonable results at least for the English version.
The required source patch is attached. Comments/Suggestions?

nd
-- 
Gefunden auf einer "Webdesigner"-Seite:
        > Programmierung in HTML, XML, WML, CGI, FLASH <

# Andr� Malo # http://www.perlig.de/ #
Index: manual/style/manual.de.xsl
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/manual/style/manual.de.xsl,v
retrieving revision 1.2
diff -u -r1.2 manual.de.xsl
--- manual/style/manual.de.xsl  5 Sep 2002 22:59:32 -0000       1.2
+++ manual/style/manual.de.xsl  8 Apr 2003 02:13:20 -0000
@@ -12,6 +12,7 @@
 
 <!-- Read the localized messages from the specified language file -->
 <xsl:variable name="messages" select="document('lang/de.xml')/messages"/>
+<xsl:variable name="output-encoding" select="'ISO-8859-1'" />
 
 <!-- Now get the real guts of the stylesheet -->
 <xsl:include href="xsl/common.xsl"/>
Index: manual/style/manual.en.xsl
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/manual/style/manual.en.xsl,v
retrieving revision 1.2
diff -u -r1.2 manual.en.xsl
--- manual/style/manual.en.xsl  5 Sep 2002 22:59:32 -0000       1.2
+++ manual/style/manual.en.xsl  8 Apr 2003 02:13:20 -0000
@@ -12,6 +12,7 @@
 
 <!-- Read the localized messages from the specified language file -->
 <xsl:variable name="messages" select="document('lang/en.xml')/messages"/>
+<xsl:variable name="output-encoding" select="'ISO-8859-1'" />
 
 <!-- Now get the real guts of the stylesheet -->
 <xsl:include href="xsl/common.xsl"/>
Index: manual/style/manual.ja.xsl
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/manual/style/manual.ja.xsl,v
retrieving revision 1.4
diff -u -r1.4 manual.ja.xsl
--- manual/style/manual.ja.xsl  5 Sep 2002 22:59:32 -0000       1.4
+++ manual/style/manual.ja.xsl  8 Apr 2003 02:13:20 -0000
@@ -12,6 +12,7 @@
 
 <!-- Read the localized messages from the specified language file -->
 <xsl:variable name="messages" select="document('lang/ja.xml')/messages"/>
+<xsl:variable name="output-encoding" select="'iso-2022-jp'" />
 
 <!-- Now get the real guts of the stylesheet -->
 <xsl:include href="xsl/common.xsl"/>
Index: manual/style/manual.pt-br.xsl
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/manual/style/manual.pt-br.xsl,v
retrieving revision 1.2
diff -u -r1.2 manual.pt-br.xsl
--- manual/style/manual.pt-br.xsl       5 Sep 2002 22:59:32 -0000       1.2
+++ manual/style/manual.pt-br.xsl       8 Apr 2003 02:13:20 -0000
@@ -12,6 +12,7 @@
 
 <!-- Read the localized messages from the specified language file -->
 <xsl:variable name="messages" select="document('lang/pt-br.xml')/messages"/>
+<xsl:variable name="output-encoding" select="'ISO-8859-1'" />
 
 <!-- Now get the real guts of the stylesheet -->
 <xsl:include href="xsl/common.xsl"/>
Index: manual/style/manual.ru.xsl
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/manual/style/manual.ru.xsl,v
retrieving revision 1.1
diff -u -r1.1 manual.ru.xsl
--- manual/style/manual.ru.xsl  18 Sep 2002 14:36:51 -0000      1.1
+++ manual/style/manual.ru.xsl  8 Apr 2003 02:13:20 -0000
@@ -12,6 +12,7 @@
 
 <!-- Read the localized messages from the specified language file -->
 <xsl:variable name="messages" select="document('lang/ru.xml')/messages"/>
+<xsl:variable name="output-encoding" select="'KOI8-R'" />
 
 <!-- Now get the real guts of the stylesheet -->
 <xsl:include href="xsl/common.xsl"/>
Index: manual/style/lang/de.xml
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/manual/style/lang/de.xml,v
retrieving revision 1.9
diff -u -r1.9 de.xml
--- manual/style/lang/de.xml    6 Apr 2003 19:17:38 -0000       1.9
+++ manual/style/lang/de.xml    8 Apr 2003 02:13:20 -0000
@@ -67,7 +67,7 @@
  <message name="apachetitle">- Apache HTTP Server</message>
  <message name="apachehttpserver">Apache HTTP Server Version 2.1</message>
  <message name="apachedocalt">[APACHE DOCUMENTATION]</message>
- <message name="search">Suchen</message> <!-- search button -->
+ <message name="search">Google-Suche</message> <!-- search button -->
  <message name="index">Index</message> <!-- deprecated -->
  <message name="home">Startseite</message> <!-- deprecated -->
 
Index: manual/style/lang/en.xml
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/manual/style/lang/en.xml,v
retrieving revision 1.9
diff -u -r1.9 en.xml
--- manual/style/lang/en.xml    6 Apr 2003 18:01:33 -0000       1.9
+++ manual/style/lang/en.xml    8 Apr 2003 02:13:20 -0000
@@ -63,7 +63,7 @@
  <message name="apachetitle">- Apache HTTP Server</message>
  <message name="apachehttpserver">Apache HTTP Server Version 2.1</message>
  <message name="apachedocalt">[APACHE DOCUMENTATION]</message>
- <message name="search">Search</message> <!-- search button -->
+ <message name="search">Google Search</message> <!-- search button -->
  <message name="index">Index</message> <!-- deprecated -->
  <message name="home">Home</message> <!-- deprecated -->
 
Index: manual/style/lang/ja.xml
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/manual/style/lang/ja.xml,v
retrieving revision 1.8
diff -u -r1.8 ja.xml
--- manual/style/lang/ja.xml    6 Apr 2003 18:01:33 -0000       1.8
+++ manual/style/lang/ja.xml    8 Apr 2003 02:13:20 -0000
@@ -58,7 +58,7 @@
  <message name="apachetitle">- Apache HTTP $B%5!<%P(B</message>
  <message name="apachehttpserver">Apache HTTP $B%5!<%P(B $B%P!<%8%g%s(B 
2.1</message>
  <message name="apachedocalt">[APACHE DOCUMENTATION]</message>
- <message name="search">Search</message> <!-- search button -->
+ <message name="search">Google Search</message> <!-- search button -->
  <message name="index">$B:w0z(B</message> <!-- deprecated -->
  <message name="home">$B%[!<%`(B</message> <!-- deprecated -->
 
Index: manual/style/lang/ru.xml
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/manual/style/lang/ru.xml,v
retrieving revision 1.3
diff -u -r1.3 ru.xml
--- manual/style/lang/ru.xml    6 Apr 2003 18:01:33 -0000       1.3
+++ manual/style/lang/ru.xml    8 Apr 2003 02:13:20 -0000
@@ -52,7 +52,7 @@
  <message name="apachetitle">- HTTP ������ Apache</message>
  <message name="apachehttpserver">HTTP ������ Apache ������ 2.1</message>
  <message name="apachedocalt">[������������ APACHE]</message>
- <message name="search">Search</message> <!-- search button -->
+ <message name="search">Google Search</message> <!-- search button -->
  <message name="index">����������</message> <!-- deprecated -->
  <message name="home">�� ������� ��������</message> <!-- deprecated -->
 
Index: manual/style/xsl/indexpage.xsl
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/manual/style/xsl/indexpage.xsl,v
retrieving revision 1.1
diff -u -r1.1 indexpage.xsl
--- manual/style/xsl/indexpage.xsl      6 Apr 2003 18:01:34 -0000       1.1
+++ manual/style/xsl/indexpage.xsl      8 Apr 2003 02:13:21 -0000
@@ -51,13 +51,53 @@
 <xsl:text>
 </xsl:text> <!-- insert line break -->
 
-          <form method="post" action="http://search.apache.org/";><p>
-            <input type="hidden" name="what" value="httpd.apache.org" />
-            <input type="hidden" name="results" value="20" />
-            <input type="hidden" name="version" value="2" />
-            <input type="text" name="keyword" size="20" />
-            <xsl:text> </xsl:text>
-            <input type="submit" value="{$messages/[EMAIL 
PROTECTED]'search']}" />
+          <form action="http://www.google.com/search"; method="get"><p>
+          <!-- search google: -->
+          <!-- with all of the words -->
+          <input type="text" value="" name="as_q" />
+          <xsl:text> </xsl:text>
+          <input type="submit" value="{$messages/[EMAIL PROTECTED]'search']}" 
/>
+
+          <!-- the specified number of results -->
+          <input type="hidden" name="num" value="10" />
+
+          <!-- the current displayed language -->
+          <input type="hidden" name="hl" value="{$messages/@lang}" />
+
+          <!-- the current document encoding for input (?) -->
+          <input type="hidden" name="ie" value="{$output-encoding}" />
+
+          <!-- (submit the original button and name) -->
+          <input type="hidden" name="btnG" value="Google Search" />
+
+          <!-- including the exact phrase "Apache 2.0" -->
+          <input type="hidden" value="Apache 2.0" name="as_epq" />
+
+          <!-- with at least one of the words (none) -->
+          <input type="hidden" value="" name="as_oq" />
+
+          <!-- without the phrase "List-Post" (to exclude the mail archives) 
-->
+          <input type="hidden" value="&quot;List-Post&quot;" name="as_eq" />
+
+          <!-- return results written in (any) language -->
+          <input type="hidden" name="lr" value="" />
+
+          <!-- and any format -->
+          <input type="hidden" name="as_ft" value="i" />
+          <input type="hidden" name="as_filetype" value="" />
+
+          <!-- updated anytime -->
+          <input type="hidden" name="as_qdr" value="all" />
+
+          <!-- where the result appears anywhere in the document -->
+          <input type="hidden" name="as_occt" value="any" />
+
+          <!-- only from httpd.apache.org -->
+          <input type="hidden" name="as_dt" value="i" />
+          <input type="hidden" name="as_sitesearch" value="httpd.apache.org" />
+
+          <!-- turn off "safe" mode -->
+          <input type="hidden" name="safe" value="off" />
           </p></form>
 
 <xsl:text>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to