---
title: XML Passthrough - Debug Stylesheet for Raw XML in Email Alerts
description: Use a passthrough XSLT stylesheet to output raw XML unchanged in email alerts for debugging. Perfect for troubleshooting alarm configurations and understanding alarm object structure.
---

# 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  

![Set the XML Passthrough Stylesheet on a debug Email with Options entry, run Execute Alarm test, and read the alarm object as plain text, animated walkthrough (7.12)][1]  
*Animated walkthrough: on the debug entry **Contoso: Raw alarm XML (debug)**, **Configuration** > **Basic**: **Override Basic options**, **Send body as text**, **Override Stylesheet options**, and the passthrough Stylesheet; **Save**, then **Execute Alarm test**. The received e-mail holds the alarm object as plain-text XML.*  

>[!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**: On the [Email with Options][] entry's **Basic** tab, 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

```mermaid
flowchart LR
    MS["fa:fa-watch-fitness Monitoring Service"] -->|"XML AlarmObject"| IT["fa:fa-code Passthrough Transform<br/>XSLT Stylesheet"]
    IT -->|"Same XML<br/>Unchanged"| EMAIL["fa:fa-envelope Email Body<br/>Plain Text XML"]
    EMAIL -->|"View in<br/>Email Client"| DEV["fa:fa-user-gear Developer/Admin<br/>Analyzes Structure"]
    classDef monitorClass fill:#2678BD,color:#fff
    classDef transformClass fill:#E47528,color:#fff
    classDef outputClass fill:#9E59BB,color:#fff
    class MS monitorClass
    class IT transformClass
    class EMAIL,DEV outputClass
```

*The passthrough transform (orange) passes the XML from the Monitoring Service (blue) unchanged to the email output (purple), so developers see the raw alarm object structure.*

## XSLT Passthrough Transform

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

```xslt
<?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

### :fa-bug: Debugging Alarm Object Structure

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

```mermaid
flowchart LR
    A["fa:fa-watch-fitness Monitoring Service"] -->|"XML AlarmObject"| B["fa:fa-bug Passthrough Transform"]
    B -->|"Same XML"| C["fa:fa-envelope Email Body"]
    C -->|"Raw XML"| D["fa:fa-user-gear Developer Reviews Structure"]
    D -->|"Build Custom XSLT"| E["fa:fa-file-code Production Stylesheet"]
    classDef debugClass fill:#E47528,color:#fff
    classDef doneClass fill:#93d16d,color:#000
    class B,C,D debugClass
    class E doneClass
```

*Debugging steps (orange) lead to the production Stylesheet (green).*

#### Process

1. Set the passthrough stylesheet on a separate debug [Email with Options][] entry, and add that entry to a test [Monitor View][]
2. Trigger an alarm, or run the entry's **Execute Alarm test**
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

### :fa-flask: Testing Alarm Plugin Configuration

Verify that [Custom Metadata][], [Resources][], [Integrations][Integration Landscape], 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

### :fa-magnifying-glass: 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. The sample below is shortened: a real alarm object carries more elements (for example the Source, Category, and Application of each Resource), under the same `<AlarmObject>` root.

```xml
<?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/</WebClientUrl>
  <IsRecurring>false</IsRecurring>
</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
* **IsRecurring flag** - `true` if alert was [resent due to recurrence configuration][Add or manage Monitor View#configuring-alert-recurrence], `false` for initial alert

## Configuration Steps

### 1. Create the Stylesheet

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

1. Click **:fa-square-plus: Add Stylesheet** 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](#xslt-passthrough-transform) above
5. Click **Save**

### 2. Set It on a Debug Email with Options Entry

The Stylesheet and **Send body as text** are set on the [Alarm Plugin][Alarm Plugins] entry, not on the Monitor View. Keep a separate debug entry, so the production entry isn't touched:

1. Navigate to **Administration** > **Settings** > **Alarm Plugins** and open (or add) an [Email with Options][] entry for debugging, such as *Contoso: Raw alarm XML (debug)*
2. Open **Configuration** > **Basic**
3. Check **Override Basic options**, then check **Send body as text** (prevents HTML parsing of XML)
4. Check **Override Stylesheet options**, then choose "XML Passthrough (Debug)"
5. Click **Save**
6. On the [Monitor View][] you want to debug, add the debug entry on the **External notifications** tab. A Monitor View only selects entries; it has no Stylesheet or text option of its own.

### 3. Trigger Test Alarm

Click **Execute Alarm test** on the debug entry's **Control** card, 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

Once debugging is complete, remove the debug entry from the Monitor View's **External notifications** tab. The production entry kept its Stylesheet and HTML body the whole time.

>[!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.

## :fa-hand-point-right: Next Steps

* :fa-file-lines: [Build Custom XSLT Stylesheet][Alarm Plugin Object]  
* :fa-file-plus: [Add or manage Stylesheet][]  

## :fa-link-horizontal: Related Topics

:fa-code: [Alarm Plugin Object][] - XML structure and custom XSLT examples  
:fa-code: [Stylesheet Examples][] - All XSLT and Liquid examples  
:fa-bell: [Alarm Plugins][] - Notification channels that use Stylesheets  
:fa-file-xml: [XML to XML][] - Transform XML to different XML format  
:fa-file-lines: [Stylesheets][] - Manage XSLT and Liquid stylesheets  
:fa-display: [Monitor Views][] - Configure alarm notifications  
:fa-envelope: [Email with Options][] - Email notification configuration with plain text option  

[1]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Customize/Stylesheets/Stylesheet_XmlPassthrough.gif

[Add or manage Monitor View#configuring-alert-recurrence]:{ndr}/Administration/5.%20Settings/1.%20Alarm%20Plugins/Features/Add%20or%20manage%20Alarm%20Plugin.md#fa-repeat-recurrence
[Add or manage Stylesheet]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Features/Add%20or%20manage%20Stylesheet.md
[Alarm Plugin Object]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Examples/Alarm%20Plugin%20Object.md
[Alarm Plugins]:{ndr}/Administration/5.%20Settings/1.%20Alarm%20Plugins/Features/What%20is%20an%20Alarm%20Plugin.md
[Custom Metadata]:{ndr}/Repository%20Model/Custom%20Metadata/Overview.md
[Email with Options]:{ndr}/Administration/5.%20Settings/1.%20Alarm%20Plugins/Features/Email%20with%20Options.md
[Integration Landscape]:{ndr}/Getting%20Started/4.%20Repository/Integrations/Integration%20Landscape.md
[Monitor View]:{ndr}/Administration/2.%20Monitor%20Management/1.%20Monitor%20Views/Features/What%20is%20a%20Monitor%20View.md
[Monitor Views]:{ndr}/Administration/2.%20Monitor%20Management/1.%20Monitor%20Views/Features/What%20is%20a%20Monitor%20View.md
[Monitoring Service]:{ndr}/Core%20Services/Monitoring%20Service/Overview.md
[Resources]:{ndr}/Administration/2.%20Monitor%20Management/3.%20Resources/Features/What%20is%20a%20Resource.md
[Stylesheet]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Features/What%20is%20a%20Stylesheet.md
[Stylesheet Examples]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Examples/Overview.md
[Stylesheets]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Features/What%20is%20a%20Stylesheet.md
[Web Client]:{ndr}/Core%20Services/Web%20Client/Overview.md
[XML to XML]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Examples/XML%20to%20XML.md
[XPath]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Extract/xPath.md