Google Cloud Storage Connector 12.13

# Use XSL Templates to Transform Action Responses

You can transform the action responses returned by Google Cloud Storage Connector using XSL templates. You must write your own XSL templates and save them with either an `.xsl` or `.tmpl` file extension.

After creating the templates, you must configure Google Cloud Storage Connector 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 Micro Focus Support.
2. Open the Google Cloud Storage Connector configuration file in a text editor.

3. In the `[Server]` section, ensure that the `XSLTemplates` parameter is set 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. (Optional) In the `[Paths]` section, set the `TemplateDirectory` parameter to the path to the directory that contains your XSL templates. The default directory is `acitemplates`.
5. Save and close the configuration file.
6. Restart Google Cloud Storage Connector 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.
  `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=Fetch
                      &QueueAction=GetStatus
                      &Token=...
                      &Template=myTemplate

  In this example, Google Cloud Storage Connector applies the XSL template `myTemplate` to the response from a `QueueInfo` action.

  NOTE: If the action returns an error response, Google Cloud Storage Connector does not apply the XSL template.

## Example XSL Templates

Google Cloud Storage Connector includes the following sample XSL templates, in the `acitemplates` folder:

XSL Template | Description
--- | ---
`FetchIdentifiers` | Transforms the output from the `Identifiers` fetch action, to show what is in the repository.
`FetchIdentifiersTreeview` | Transforms the output from the `Identifiers` fetch action, to show what is in the repository. This template produces a tree or hierarchical view, instead of the flat view produced by the `FetchIdentifiers` template.
`LuaDebug` | Transforms the output from the `LuaDebug` action, to assist with debugging Lua scripts.

© Copyright 2022 Micro Focus or one of its affiliates
Version 12.13 | Last updated October 2022

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL Google Cloud Storage Connector 12.13

Topic Title: Use XSL Templates to Transform Action Responses