Google Search Appliance OneBox for Enterprise Developers Manual de usuario Pagina 13

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 30
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 12
Google Search Appliance: Google OneBox for Enterprise Developer’s Guide 13
The following example shows the results from a
directory smith
query and the directory items for
William Smith and Bill Smith. The
<MODULE_RESULT>
tag contains the information sent from the
provider for the search results:
<?xml version="1.0" encoding="UTF-8"?>
<OneBoxResults>
<provider>ACME Employee Directory</provider>
<title>
<urlText>13 results in the ACME directory</urlText>
<urlLink>http://directory.corp.acme.com/cgi-bin/search?smith</urlLink>
</title>
<IMAGE_SOURCE>http://directory.corp.acme.com/images/directory.jpg
</IMAGE_SOURCE>
<MODULE_RESULT>
<U>http://directory.corp.acme.com/cqi-bin/lookup?empid=448473</U>
<Field name="display">Smith, William</Field>
<Field name="firstname">William</Field>
<Field name="lastname">Smith</Field>
<Field name="phone">617-555-1234</Field>
<Field name="email">wsmith@acme.com</Field>
<Field name="picture">http://directory.corp.acme.com/cqi-bin/lookup?
photo=448473</Field>
</MODULE_RESULT>
<MODULE_RESULT>
<U>http://directory.corp.acme.com/cqi-bin/lookup?empid=22638</U>
<Field name="display">Smith, Bill R.</Field>
<Field name="firstname">Bill</Field>
<Field name="lastname">Smith</Field>
<Field name="phone">617-555-9345</Field>
<Field name="email">bsmith@acme.com</Field>
<Field name="picture">http://directory.corp.acme.com/cqi-bin/lookup?
photo=22638</Field>
</MODULE_RESULT>
</OneBoxResults>
Transforming XML to HTML
You can transform the XML results into HTML by means of an XSLT stylesheet template.
The
<Field>
elements (see the element “MODULE_RESULT” on page 28) are available for both external
and internal OneBox provider.
The
<Field>
elements provide data about the results from a provider, and you can specify parameters
to improve the display of the results data. In the directory example, the provider sends the search
appliance two results and title display information:
The title is a clickable URL with the text “13 results in the ACME directory.”
An icon image makes the results stand out as directory entries.
The two results are directory listing results, including a display name, first name, last name, phone
number, email address, and link to an image of the employee.
The
<Field>
element’s
name
attribute provides the information for the OneBox.
Vista de pagina 12
1 2 ... 8 9 10 11 12 13 14 15 16 17 18 ... 29 30

Comentarios a estos manuales

Sin comentarios