StylesheetScriptsEnabled – System Parameter
Control advanced script execution in Nodinite Stylesheets for enhanced data transformation capabilities. The StylesheetScriptsEnabled system parameter determines whether embedded scripts in XSLT stylesheets are allowed to execute—balancing powerful customization with security.
What you'll achieve with this guide:
- ✅ Enable or disable script execution in XSLT stylesheets
- ✅ Understand security implications of embedded scripts
- ✅ Balance customization needs with security requirements
- ✅ Control advanced stylesheet transformation capabilities
The StylesheetScriptsEnabled system parameter globally controls whether Nodinite allows embedded scripts (such as msxsl:script blocks) to execute within Stylesheets. This capability enables advanced data transformations but requires careful security consideration.
Stylesheets in Nodinite are used to transform and customize data presentation in Log Views, Monitoring Alerts, and Alarm Plugins. While standard XSLT provides powerful transformation capabilities, embedded scripts (like C#, VB.NET, or JavaScript code blocks) offer even greater flexibility for complex data processing scenarios.
| System Parameter Name | Data Type | Values/Example | Comment |
|---|---|---|---|
| StylesheetScriptsEnabled | boolean | true/false |
Default = false (Disabled). Set to true to allow embedded scripts in Stylesheets to execute. |
This feature is available from Nodinite version 7.
Warning
Security Consideration: Enabling script execution in stylesheets allows custom code to run within the Nodinite process. Only enable this feature if you:
- Trust all members of the built-in Administrators Role (only Administrators can create or modify Stylesheets)
- Understand the security implications of code execution
- Need advanced transformation capabilities beyond standard XSLT
When to Enable Scripts
Enable StylesheetScriptsEnabled when you need:
- Complex calculations – Perform advanced mathematical operations or business logic
- Date/time manipulation – Custom date formatting or timezone conversions beyond XSLT 1.0 capabilities
- Custom algorithms – Implement proprietary data transformation logic
- Encoding/decoding – Base64, encryption, or custom encoding operations
- External data access – Connect to databases or web services during transformation (use with extreme caution)
Example: Stylesheet with Embedded Script
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:custom="urn:custom-functions">
<msxsl:script language="C#" implements-prefix="custom">
<![CDATA[
public string FormatDateTime(string dateTime, string format)
{
DateTime dt = DateTime.Parse(dateTime);
return dt.ToString(format);
}
]]>
</msxsl:script>
<xsl:template match="/">
<result>
<formatted-date>
<xsl:value-of select="custom:FormatDateTime(/data/timestamp, 'yyyy-MM-dd HH:mm:ss')"/>
</formatted-date>
</result>
</xsl:template>
</xsl:stylesheet>
Note
When StylesheetScriptsEnabled is set to
false, any Stylesheet containingmsxsl:scriptblocks or similar script elements will fail to execute, and an error will be logged. Standard XSLT transformations without scripts will continue to work normally.
Frequently Asked Questions
Find more solutions and answers in the Nodinite System Parameters FAQ, as well as the Troubleshooting user guide.
How do I change the value?
Changing a value for the pre-defined System Parameters is described in the generic 'How do I change the System Parameters' article.
Do I need to restart anything?
This parameter is evaluated when Stylesheets are loaded and executed by the Web Client, Logging Service, and Monitoring Service. If you change this value:
- Existing cached stylesheets may need to be reloaded
- For Web Client, users may need to refresh their browser or clear cache
- For Logging Service and Monitoring Service, a service restart is recommended to ensure the new setting takes effect immediately
Recommendation: Restart Core Services after changing this parameter to ensure consistent behavior.
What happens if I disable scripts on stylesheets that use them?
If you set StylesheetScriptsEnabled to false and you have existing Stylesheets that contain embedded scripts:
- The stylesheet transformation will fail
- An error will be logged indicating script execution is disabled
- Log Views using these stylesheets will not render correctly
- Monitoring Alerts using these stylesheets will fail to send properly formatted messages
Recommendation: Before disabling, review all Stylesheets to identify which ones use embedded scripts. Either remove the script blocks or accept that those stylesheets will stop working.
How do I secure stylesheet management?
Only members of the built-in Administrators Role can create and modify Stylesheets in Nodinite. To ensure security:
- Navigate to Administration → Access Management → Roles
- Review membership of the Administrators role
- Grant Administrator access only to trusted users
- Implement code review processes for new stylesheets before deployment
- Regularly audit existing stylesheets for security concerns
Note
Stylesheet management is restricted to the built-in Administrators role and cannot be delegated to other roles.
See the Add or Manage Stylesheet user guide for detailed management instructions.
Next Step
- How do I change the System Parameters?
- Add or Manage Stylesheet – Create and manage stylesheets
- What is a Stylesheet – Learn about stylesheet capabilities
Related Topics
- System Parameters – All configuration parameters
- Stylesheets – Overview of stylesheet management
- Log Views – Using stylesheets in log views
- Alarm Plugins – Using stylesheets in alerts
- Core Services
- Roles – Access control for stylesheet management