Previous Topic: Search Definitions and Search ResultsNext Topic: Performance Tips


Custom Reports

Custom reports use an XSL stylesheet to transform the results into the desired format. In order for the text embedded in these reports to be translated, the strings need to be defined in a structured way. This is achieved using an XML data island such as the example here, inserted into the root element of the stylesheet:

<ca:report name="MyReport" dictionary="MyDict">
  <ca:string name="heading">English Heading</ca:string>
  <ca:string name="string1">English 1</ca:string>
  <ca:string name="string2">English 2</ca:string>
  <ca:string name="string3">English 3</ca:string>
</ca:report>

The ca namespace needs to be declared using:

xmlns:ca="http://www.ca.com" 

The strings are accessed using:

 <xsl:value-of select="//ca:string[@name='heading']" /> 

The namespace is required as the xslt schema does not allow elements with null namespace at the root level.

Dictionary entries would then be of the form:

<MyReport>
  <heading>French Heading</heading>
  <string1>French 1</string1>
  <string2>French 2</string2>
  <string3>French 3</string3>
</MyReport>