XSL Transformations

Learn about XSL transformation for CRM.Web.

XSL transformation scripts and document functions should be enabled for CRM.Web to be able to use them. Set the EnableScript and EnableDocumentFunction options to true, under the XSLTransformation section in the settings.xml file. See the sample below:
<update.lib>
    <XslTransformation>
        <EnableScript>FALSE</EnableScript>
        <EnableDocumentFunction>FALSE</EnableDocumentFunction>
    </XslTransformation>
</update.lib>
Attention: Enabling XSL transformations exposes a severe security threat, potentially revealing the remote code execution path to an attacker. You should ensure that people with potential malicious intent do not have access to the system. if you enable these options.

By default, the XSL transformations used by Aurea CRM.Web are stored in ..\data\reports\xslt.

To use another than the default location, add the following elements to the settings.xml file:

<update.web>
    ...
    <mmReports>
        <XSLTPath>Data/Reports/XSLT</XSLTPath>
    </mmReports> 

By default, the XSL transformations are loaded on first use and cached thereafter. While developing new XSL transformations this can become cumbersome, because Aurea CRM.Web has to be restarted for each change to the XSL transformation. For information on disabling the caching of XSL transformations and debugging reports, see the article “How to Debug Reports” at https://support.aurea.com.

There are no constraints on the XSL transformations you create for XSL reporting, as long as they are valid transformations according to the W3C XSL Transformations (XSLT) Version 1.0 recommendation located at http://www.w3.org/TR/xslt.

However, you should add a media-type attribute to your <xsl:output> element.

Aurea CRM.Web looks for this attribute and modifies the content-type of the HTTP-Stream sent to the client (browser). Without setting the media-type the OS on the client computer cannot determine the correct application for opening the report.

<xsl:output method="xml" encoding="UTF-8" media-type="application/msword" />
Note: The media-type is also used to alter the file extension of the file name transferred to the client. For security reasons the client application (browser) uses the file extension rather than the HTTP content-type to determine the application used to open a file. As a result all content-types and file extensions must be known to your Aurea CRM.Web server, i.e. defined in the registry.