Open topic with navigation

# Use XSL Templates to Transform Action Responses

You can transform the action responses returned by IDOL Speech Server using XSL templates. You must write your own XSL templates and save them with either an `.xsl` or `.tmpl` file extension. For more information about XSL, see http://www.w3.org/TR/xslt.

After creating the templates, you must configure IDOL Speech Server to use them, and then apply them to the relevant actions.

To enable XSL transformations

1. Ensure that the `autnxslt` library is located in the same directory as your configuration file. If the library is not included in your installation, you can obtain it from HPE Support.
2. Open the IDOL Speech Server configuration file in a text editor.

3. In the `[Server]` section, set the `XSLTemplates` parameter to `True`.

   Caution: If `XSLTemplates` is set to `True` and the `autnxslt` library is not present in the same directory as the configuration file, the server will not start.

4. In the `[Paths]` section, set the `TemplateDirectory` parameter to the path to the directory that contains your XSL templates.
5. Save and close the configuration file.
6. Restart IDOL Speech Server for your changes to take effect.

To apply a template to action output

- Add the following parameters to the action.

  `Template` | The name of the template to use to transform the action output. Exclude the folder path and file extension.
  `OutputEncoding` | Set to `UTF8`.
  `ForceTemplateRefresh` | (Optional) If you modified the template after the server started, set this parameter to `True` to force the ACI server to reload the template from disk rather than from the cache.

  For example:

      action=QueueInfo&QueueName=AddTask
                      &QueueAction=GetStatus
                      &Token=MTkyLjE2OC45NS4yNDox
                      &Template=Form
                      &OutputEncoding=UTF8

  In this example, IDOL Speech Server applies the XSL template `Form.tmpl` to the response from a `QueueInfo` action.

  Note: If the action returns an error response, IDOL Speech Server does not apply the XSL template.

© 2013-2016 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE Close We welcome your comments! To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to AutonomyTPFeedback@hpe.com. Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm