Category Component 25.2
Category Component Help

# Edit Templates

The XSL templates use XPath and XSLT to identify and display fields from the XML returned in response to actions sent to the Community component.

You identify the XML fields that the template uses to create emails by using the `select` attribute in the template `XSL` tags. To identify the XML fields that a template can use, use a Web browser to send the HTTP action for which Community uses the template to display results. You can then determine available field names from the `autn` tags in the XML that returns. The action to send depends on the template that you are editing.

Template | Action
--- | ---
`email.xss` | `AgentGetResults`
`channels.xss` | CategoryQuery
`ondemand.xss` | `Custom`

For more information about the `AgentGetResults` and `Custom` actions, refer to the Community component Reference.

Related Topics

- Send Custom Emails

- Display Online Help

For example, if you send an `AgentGetResults` action to the Community component, the following XML might return:

    <?xml version='1.0' encoding='UTF-8' ?>
    <autnresponse xmlns:autn='http://schemas.autonomy.com/aci/'>
       <action>AGENTGETRESULTS</action>
       <response>SUCCESS</response>
       <responsedata>
          <autn:agent>
             <autn:aid>2-A2</autn:aid>
             <autn:training />
             <autn:parent>2</autn:parent>
             <autn:agentname>agent21</autn:agentname>
             <autn:fields>
          <retrained>true</retrained>
             <private>false</private>
             <fromdocument>true</fromdocument>
          </autn:fields>
          <autn:results>
             <autn:numhits>1</autn:numhits>
             <autn:hit>
                <autn:reference>http://193.115.251.40/ArchiveData/encarta/38000/msdata39439.htm</autn:reference>
                <autn:id>1254</autn:id>
                <autn:section>0</autn:section>
                <autn:weight>70.77</autn:weight>
                <autn:links>TAPESTRI,REVIV,WEAV,REACH,EUROPEAN,OCCUR,PRACTIC,TRADIT,REMAIN,EUROP,EXAMPL,WESTERN,ALTHOUGH,EAR</autn:links>
                <autn:database>News</autn:database>
                <autn:title>Tapestry Tapestry weaving may have been practiced in Europe as...</autn:title>
                <autn:summary>Tapestry Tapestry weaving may have been practiced in Europe as ... . Tapestry Tapestry weaving may have been practiced in Europe as early as the 8th century, although no examples remain. Western European tapestry reached its greatest development between the 14th and 18th centuries. During the 19th and 20th centuries, however, revivals of the tapestry tradition occurred. . </autn:summary>
                <autn:content>
                   <DOCUMENT>
                   <DREREFERENCE>http://193.115.251.40/ArchiveData/encarta/38000/msdata39439.htm</DREREFERENCE>
                   <DRETITLE>Tapestry  Tapestry weaving may have been practiced in Europe as ... </DRETITLE>
                   <BLANK />
                   <IMAGE>archiv</IMAGE>
                   <PAPER />
                   <SUMMARY>Tapestry   Tapestry weaving may have been practiced in Europe as early as the 8th century, although no examples remain. Western European tapestry reached its greatest development between the 14th and 18th centuries</SUMMARY>
                   <DOCTYPE>ARCHIVE</DOCTYPE>
                   <DREDATE>907347778</DREDATE>
                   <DREDBNAME>ARCHIVE</DREDBNAME>
                   <DRECONTENT>Tapestry Tapestry weaving may have been practiced in Europe as early as the 8th century, although no examples remain. Western European tapestry reached its greatest development between the 14th and 18th centuries. During the 19th and 20th centuries, however, revivals of the tapestry tradition occurred. </DRECONTENT>
                <autn:content>
             </autn:hit>
          </autn:results>
       </autn:agent>
    </responsedata>
    </autnresponse>

In this example, you can see from the XML that Community returns that the following fields are available as values for the `select` attribute:

`agent` | `private` | `section`
`aid` | `fromdocument` | `weight`
`training` | `results` | `links`
`parent` | `numhits` | `database`
`agentname` | `hit` | `title`
`fields` | `reference` | `summary`
`retrained` | `id` | `content`

You can include these fields as values in the XSL tags. For example, to display the value of the `<autn: title>` tag for each result document, include these lines in your template:

    <xsl:for-each select=responsedata/hit">
    <xsl:value-of select="title">
    </xsl:for-each>

You must remove the `autn:` part of the tag from the XSL tag that you specify. For example, if the XML that Community returns contains a tag called `autn:title`, specify the tag as `title` (as in `select="title",` in the example here).

Copyright 2025 Open Text
Version 25.2 | Last updated April 2025

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 MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery Category Component 25.2

Topic Title: Edit Templates