- 6 minutes to read

XML Passthrough (Debug Stylesheet)

Use this "pass-through" XSLT stylesheet to output raw XML unchanged in email alerts. Perfect for debugging when you need to see the actual XML structure without HTML transformation.

Why Use a Passthrough Transform?

Nodinite Email Alarm Plugins require a Stylesheet to be configured—you cannot send emails without one. When debugging alarm configurations or troubleshooting data structures, you often need to see the raw XML exactly as the Monitoring Service sends it.

This passthrough stylesheet solves that problem by:

Passing XML through unchanged – Input XML = Output XML
Enabling raw XML in emails – See the actual alarm object structure
Debugging alarm configurations – Verify what data is available
Troubleshooting stylesheet development – Understand the source XML before building complex transformations

Warning

This stylesheet outputs XML, not HTML. The email body will display as plain XML text, not a formatted HTML layout. This is intentional for debugging purposes.

Configuration Required: In the Email with Options alarm plugin settings, check "Send body as text" to send the email in plain text instead of HTML. This prevents email clients from attempting to parse and render the XML as HTML, which can cause formatting issues.

Data Flow Interaction

%%{init: {'theme':'base', 'themeVariables': {'primaryColor':'#e3f2fd','primaryBorderColor':'#1976d2','lineColor':'#1976d2','secondaryColor':'#fff3e0','tertiaryColor':'#f3e5f5'}}}%% flowchart LR MS[Monitoring Service] -->|XML AlarmObject| IT[Passthrough Transform<br/>XSLT Stylesheet] IT -->|Same XML<br/>Unchanged| EMAIL[Email Body<br/>Plain Text XML] EMAIL -->|View in<br/>Email Client| DEV[Developer/Admin<br/>Analyzes Structure] classDef monitorClass fill:#e3f2fd,stroke:#1976d2,stroke-width:2px classDef transformClass fill:#fff3e0,stroke:#fb8c00,stroke-width:2px classDef outputClass fill:#f3e5f5,stroke:#9c27b0,stroke-width:2px class MS monitorClass class IT transformClass class EMAIL,DEV outputClass

This diagram illustrates how the passthrough transform passes XML through unchanged from the Monitoring Service to the email output, enabling developers to see the raw alarm object structure.

XSLT Passthrough Transform

Use the following XSLT to output the input XML exactly as received:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
  <!-- Output method: XML with declaration and indentation for readability -->
  <xsl:output method="xml" 
              version="1.0" 
              encoding="UTF-8" 
              indent="yes"
              omit-xml-declaration="no"/>
  
  <!-- Identity template: Copy everything as-is -->
  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>
  
</xsl:stylesheet>

How It Works

The passthrough transform uses a single template that matches all attributes (@*) and nodes (node()):

  • <xsl:copy> – Copies the current node exactly as it appears in the source
  • <xsl:apply-templates> – Recursively applies the same template to all child nodes and attributes
  • indent="yes" – Formats the output XML with proper indentation for readability
  • omit-xml-declaration="no" – Includes the <?xml version="1.0"?> declaration

This creates a recursive copy of the entire XML tree without any modifications.

Use Cases

Debugging Alarm Object Structure

When developing custom alarm email stylesheets, you need to understand the XML structure available:

%%{init: {'theme':'base', 'themeVariables': {'primaryColor':'#fff3e0','primaryBorderColor':'#fb8c00','lineColor':'#fb8c00'}}}%% flowchart LR A[Monitoring Service] -->|XML AlarmObject| B[Passthrough Transform] B -->|Same XML| C[Email Body] C -->|Raw XML| D[Developer Reviews Structure] D -->|Build Custom XSLT| E[Production Stylesheet] classDef debugClass fill:#fff3e0,stroke:#fb8c00,stroke-width:2px class B,C,D debugClass

Process:

  1. Configure passthrough stylesheet on test Monitor View
  2. Trigger an alarm (or use test alarm feature)
  3. Receive email with raw XML showing complete Alarm Plugin Object structure
  4. Use the XML to develop custom XSLT with proper element paths
  5. Replace with production stylesheet once development is complete

Testing Alarm Plugin Configuration

Verify that Custom Metadata, Resources, Integrations, and other alarm data populate correctly:

Before building complex HTML emails, use the passthrough transform to confirm:

  • Custom metadata fields appear in the XML
  • Monitor view names and descriptions are correct
  • Resource states and status codes match expectations
  • Integration and application data is present

Troubleshooting Missing Data

If your production stylesheet shows missing data, use the passthrough transform to determine if:

  • The data exists in the source XML (stylesheet XPath issue)
  • The data is missing from the alarm object (configuration issue)

Example Output

When using the passthrough transform on an Alarm Plugin Object, the email body contains the raw XML structure:

<?xml version="1.0" encoding="UTF-8"?>
<AlarmObject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <MonitorViews>
    <MonitorView>
      <MonitorViewId>1</MonitorViewId>
      <Name>Production Monitoring</Name>
      <Description>Critical production systems</Description>
      <StatusCode>
        <StatusCode>1</StatusCode>
        <Name>Warning</Name>
      </StatusCode>
      <NumberOfMonitoredResources>5</NumberOfMonitoredResources>
      <Integrations>
        <Integration>
          <IntegrationId>42</IntegrationId>
          <Name>Order Processing Integration</Name>
          <WebSite>https://portal.example.com/integrations/42</WebSite>
          <CustomFields>
            <CustomField>
              <CustomFieldId>1</CustomFieldId>
              <Name>SLA Level</Name>
              <CustomValues>
                <CustomValue>
                  <Value>Gold</Value>
                  <Description>24/7 support required</Description>
                </CustomValue>
              </CustomValues>
            </CustomField>
          </CustomFields>
        </Integration>
      </Integrations>
      <Resources>
        <Resource>
          <ResourceId>10</ResourceId>
          <Name>Order API - Queue Processor</Name>
          <StatusCode>
            <StatusCode>1</StatusCode>
            <Name>Warning</Name>
          </StatusCode>
        </Resource>
      </Resources>
    </MonitorView>
  </MonitorViews>
  <Created>2025-11-04T14:30:00.000000Z</Created>
  <WebClientUrl>https://monitoring.example.com/Nodinite/WebClient/</WebClientUrl>
</AlarmObject>

This raw XML shows you:

  • Available element paths for XSLT template matching
  • Custom metadata structure and values
  • Monitor view hierarchy
  • Resource naming and status codes
  • All data available for transformation

Configuration Steps

1. Create the Stylesheet

In Nodinite Web Client, navigate to Administration > Customize > Stylesheets:

  1. Click Add to create a new stylesheet
  2. Name: "XML Passthrough (Debug)" or "Raw XML Output"
  3. Type: Select XSLT
  4. Stylesheet: Paste the XSLT Passthrough Transform above
  5. Click Save

2. Associate with Monitor View

Navigate to the Monitor View you want to debug:

  1. Click Edit on the Monitor View
  2. Scroll to Email Alarm Plugin configuration
  3. Select the stylesheet dropdown
  4. Choose "XML Passthrough (Debug)"
  5. Check "Send body as text" to send as plain text (prevents HTML parsing of XML)
  6. Click Save

3. Trigger Test Alarm

Use the test alarm feature or wait for a real alarm condition:

  1. The email body will contain raw XML instead of HTML
  2. Email clients will display the XML as plain text
  3. Copy the XML to analyze structure or use in stylesheet development

4. Return to Production Stylesheet

Once debugging is complete:

  1. Edit the Monitor View again
  2. Change stylesheet back to your production HTML transformation
  3. Click Save

Tip

Best Practice: Keep the passthrough stylesheet saved in Nodinite for future debugging sessions. Name it clearly (e.g., "DEBUG - Raw XML Passthrough") so team members understand its purpose.


Next Step

Build Custom XSLT Stylesheet

Alarm Plugin Object - XML structure and custom XSLT examples
XML to XML - Transform XML to different XML format
Stylesheets - Manage XSLT and Liquid stylesheets
Monitor Views - Configure alarm notifications
Email with Options - Email notification configuration with plain text option