ENE: What are the limitations on contents of Templates.XML

ENE: What are the limitations on contents of Templates.XML

99
Created On 11/10/26 10:57 AM - Last Modified 11/10/26 16:08 PM


Question


What are the schema limitations, supported content types, dynamic variable restrictions, and special character handling rules when customizing the Templates.xml file for the Event Notification Engine (ENE)?



Environment


N/A Privileged Access Manager (PAM, self-hosted);Privilege Cloud Event Notification Engine

Answer


Overview

When customizing notification templates in Templates.xml for the Event Notification Engine (ENE), the structure is strictly governed by an XML Schema Definition (XSD). Understanding which elements support dynamic variables, complex markup, or simple string values is essential to prevent parsing errors or template rendering failures.

1. Element Limitations & Variable Support

Not all template elements support dynamic variables or child XML tags. The table below summarizes the technical restrictions per element:

ElementRequired?Schema TypeSupports Dynamic Variables?
GeneralHeader✅ YESxs:string (Simple String)❌ No
GeneralFooter✅ YESxs:string (Simple String)❌ No
Subject✅ YESComplex (<xs:any processContents="skip">)✅ YES
Body✅ YESComplex (<xs:any processContents="skip">)✅ YES
Header (Template-level)❌ Noxs:string (Simple String)❌ No
Footer (Template-level)❌ Noxs:string (Simple String)❌ No

Important Note: Dynamic variables and child XML tags are only supported in the Subject and Body elements. GeneralHeader, GeneralFooter, and template-level Header/Footer elements are strictly simple strings; therefore, you cannot use dynamic variables such as <CA-PVWABaseUrl/> outside of the Subject and Body elements.

2. Attribute Restrictions

  • NotificationTemplates Root Attribute:

    • Charset (Required): Defines default character encoding across all templates.
    • Example: <NotificationTemplates Charset="utf-8">
  • Template Attributes:

    • ID (Required): Must be a valid integer (xs:integer).
    • Type (Required): Must strictly match one of two enumerated values (Any other value will violate the schema):
      • "Text"
      • "Html" 
    • Charset (Optional): Specifies encoding for the individual template.
    • Example: <Template ID="4" Type="Text">

3. Syntax & Character Formatting Rules

XML Reserved Characters

Because Templates.xml is parsed as XML, any special characters within standard text content must be properly escaped:

  • Use &lt; for <
  • Use &gt; for >
  • Use &amp; for &
  • Use &quot; for "
  • Use &apos; for '

Practical Example: Header/Footer String Restrictions

Since simple string elements like <GeneralFooter> do not support child XML tags, dynamic variables cannot be used, and any URL parameter ampersands must be properly escaped.

❌ Invalid Configuration:

<GeneralFooter>
  Click here to log in: https://login.domain.com/idp/SOAP?PartnerSpId=CN=CyberArk:CustomerName:XXX1111&;TargetResource=<CA-PVWABaseUrl/>/privilegecloud
</GeneralFooter>
  • Why it fails:
    • Uses a dynamic variable tag (<CA-PVWABaseUrl/>), which is not supported in simple string elements.
    • Contains an improper ampersand syntax (&;) instead of the required XML entity (&amp;).

✅ Valid Configuration:

<GeneralFooter>
  Click here to log in: https://login.domain.com/idp/SOAP?PartnerSpId=CN=CyberArk:CustomerName:XXX1111&amp;TargetResource=https://domain.cyberark.cloud/privilegecloud
</GeneralFooter>
  • Why it works:
    • Uses purely static plain text with a fully qualified URL.
    • Correctly escapes the URL query parameter ampersand as &amp;.

HTML Content Handling

When using HTML templates (Type="Html"), wrap HTML content inside CDATA sections in the <Body> element to prevent XML parsing conflicts:

<Body>
  <![CDATA[
    <h2>Notification Alert</h2>
    <p>Event details follow...</p>
  ]]>
</Body>


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000001TzGCAU&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail