Back to Home | Admin Console Help | Log Out
 Admin Console Help
 
Admin Console Help

Home

Content Sources

Index

Search
  Search Features
    Front Ends
      Output Format
      KeyMatch
      Related Queries
      Filters
      Remove URLs
      OneBox Modules
    Query Settings
    Document Preview Module
    Result Biasing
    Suggestions
    Dynamic Navigation
    Language Bundles
    User Results
    Expert Search
  Secure Search
  Diagnostics

Reports

GSA Unification

GSAn

Administration

More Information

Search > Search Features > Front Ends > Output Format - XSLT Stylesheet Editor

Use the XSLT Stylesheet Editor to perform the following tasks:

You can export the stylesheet to edit it on your computer, then import it when you are satisfied with the changes. You can then preview the changes you've made.

All styles must be defined inside the stylesheet. You cannot include external XML or XSLT code in the stylesheet.

You cannot go back to the Page Layout Helper after you manually edit the Stylesheet, unless you start over completely by clicking the Restore Default button.

To return the Stylesheet to the state before it was edited, click the Restore Default button.

Before Starting this Task

After you finish making and saving changes in the Page Layout Helper, you can, if you wish, make further changes in the XSLT Stylesheet Editor. You must make all Page Layout changes in the boxes provided before editing the Stylesheet directly. These changes are saved in the Stylesheet when you click Save.

Making Changes in the XSLT Stylesheet Editor

You can edit the following sections of the stylesheet:

Editing or Viewing the XSLT Stylesheet

To edit or view the XSLT stylesheet:

  1. Under Search > Search Features > Front Ends, click the Edit link for a front end.
  2. On the Output Format page, scroll down to see the XSLT Stylesheet Editor.
  3. Click the Edit Underlying XSLT Code link.
  4. Enter any changes to the stylesheet and click the Preview button to review the changes.
  5. When finished previewing your changes, close the preview window.
  6. Correct errors or make more changes.
  7. When finished, click Save.

Exporting the XSLT Stylesheet

To export the XSLT stylesheet:

  1. Under Search > Search Features > Front Ends, click the Edit link for a front end.
  2. On the Output Format page, scroll down to see the XSLT Stylesheet Editor.
  3. Click the Edit Underlying XSLT Code link.
  4. Click Export.
  5. Navigate to a location for the file and save it.

Importing an XSLT Stylesheet

To import an edited XSLT stylesheet:

  1. Under Search > Search Features > Front Ends, click the Edit link for a front end.
  2. On the Output Format page, scroll down to see the XSLT Stylesheet Editor.
  3. Click the Edit Underlying XSLT Code link.
  4. Click Choose File and browse to the file.
  5. Click Import.
    A confirmation message warns that this will overwrite your current stylesheet.
  6. Click OK.
    The edited stylesheet displays and is validated. Errors found during validation are displayed in red.
  7. Fix errors in the file and repeat the import steps.
  8. When finished, click Save.

Restoring the XSLT Stylesheet

To restore the XSLT stylesheet to the state before it was edited:

  1. Under Search > Search Features > Front Ends, click the Edit link for a front end.
  2. On the Output Format page, scroll down to see the XSLT Stylesheet Editor.
  3. Click the Edit Underlying XSLT Code link.
  4. Click Restore Default.
  5. Click OK.

Related Tasks

Customizations to XSLT stylesheets may result in vulnerability to cross-site scripting (XSS) attacks. Google recommends that you run XSS test after customizing an XSLT stylesheet.

For More Information

For detailed information about using the XSLT Stylesheet Editor, see "Creating the Search Experience: Customizing the User Interface."

For more information about generating HTML from XSLT, see "Search Protocol Reference."

Both of these documents are linked to the Google Search Appliance help center.


 
© Google Inc.