beautypg.com

Editing customer-onebox.xsl to call your xsl file – Google Search Appliance OneBox for Enterprise Developers Guide User Manual

Page 20

background image

Google Search Appliance: Google OneBox for Enterprise Developer’s Guide

20

Editing customer-onebox.xsl to Call Your XSL File

Edit the customer-onebox.xsl file to point to the projects.xsl file as follows:


This file calls your stylesheet for all OneBox results, whether or not the results come from the projects
OneBox. In a search appliance, the customer-onebox.xsl file only passes results to your style sheet.
The customer-onebox.xsl cannot be used as a OneBox module because it contains a match
statement.

Merging a OneBox Module Output with the
Search Results

To merge a OneBox module output with the search results:

1.

Append the argument --dumpOutput=1 to the command line when you invoke the simulator.
Invoke the simulator from the directory in which you unzipped the simulator zip file.

2.

Each time your provider returns a valid result, the simulator creates a new XML file in the current
directory, named name-Results-number.xml, where name is the name of your OneBox module,
and number is a unique integer. The simulator merges the XML for you.

3.

Insert your OneBox module’s results into the search output XML. Copy the contents of your
element into the element, replacing the module_name attribute with
your module name. Omit the element itself.

For example, the projects output appears as follows for a query on project 1:

Corporate Project Database
</p><p style="position:absolute;top:941px;left:228px;white-space:nowrap" class="ft05"><urlText>Lookup results for project 1</urlText><br><urlLink>http://www.mycompany.com/cgi-bin/projects?projectId=1</urlLink></p><p style="position:absolute;top:976px;left:212px;white-space:nowrap" class="ft05">
http://www.mycompany.com/icons/favicon.ico

http://www.mycompany.com/cgi-bin/projects?projectId=1

NextGen

Green