---
title: Stylesheet Examples - XSLT and Liquid Transformation Templates
description: Stylesheet examples including XSLT and Liquid templates for transforming JSON, XML, and EDIFACT messages. Learn base64 decoding, Alarm Plugin formatting, and message transformation patterns.
---

# Stylesheet Examples

Learn by example: explore XSLT and Liquid stylesheets that transform business messages into readable, formatted output. From base64-decoded XML to [Alarm Plugin][Alarm Plugins] formatting, these examples demonstrate real-world stylesheet patterns.

On this page, you will find:

* ✅ Working stylesheet examples for common transformation scenarios  
* ✅ Both XSLT and Liquid template patterns  
* ✅ Real-world use cases from various industries and data formats  

![Install an example as a Stylesheet, bind it to a Message Type, and view a Log Event formatted with it, animated walkthrough (7.12)][1]  
*Animated walkthrough of the [XML to XML][] example: **Add Stylesheet**, Type **XSLT**, paste the template, bind the [Message Type][], **Save and close**, then **View message formatted as** in a [Log View][Log Views]. Every example on these pages works unchanged on :Nodinite: 7.12.*  

>[!NOTE]
>The [Base64-Decode XML from JSON](#base64-decode-xml-from-json) and [EDIFACT Line Breaking](#edifact-line-breaking) examples contain JavaScript. They run only when the [StylesheetScriptsEnabled][] [System Parameter][System Parameters] is `true`; the default is `false` on a new installation, and an upgraded installation keeps its value. :new7.12: The scripts run isolated from the [Web Client][].

| Example | Input | Engine | Used in |
| --- | --- | --- | --- |
| [Base64Decode XML from JSON][] | JSON with base64-encoded XML | Liquid + JavaScript | [Log Views][] |
| [Alarm Plugin Object][] | Alarm object XML | XSLT | Email [Alarm Plugins][] |
| [Alarm Plugin Object Sample Data][] | Alarm object XML | XSLT | Test data for Email [Alarm Plugins][] [Stylesheets][] |
| [XML Passthrough][] | Alarm object XML | XSLT | Email [Alarm Plugins][] (debugging) |
| [Line break an EDIFACT][] | EDIFACT or X12 | Liquid + JavaScript | [Log Views][] |
| [XML to XML][] | XML (SOAP) | XSLT | [Log Views][] |

---

## Core Examples

### Base64-Decode XML from JSON

**Format:** JSON input with base64-encoded XML content  
**Technology:** Liquid with JavaScript  
**Output:** Decoded XML displayed in CodeMirror editor with download capability

Transform JSON messages that contain base64-encoded XML payloads into readable XML. Useful for systems that wrap XML inside JSON for transport, or for displaying embedded content that end-users need to inspect.

[:fa-file-code: View Base64-Decode XML from JSON Example][Base64Decode XML from JSON]

---

### Alarm Plugin Object Formatting

**Format:** :Nodinite: Alarm object XML  
**Technology:** XSLT  
**Output:** Formatted alert notifications

Transform :Nodinite: alarm notifications into custom, branded HTML e-mails. XSLT Stylesheets apply to the Email [Alarm Plugins][] only. Learn the complete XML structure of alarm objects and how to extract relevant business data, and test with the [Alarm Plugin Object Sample Data][], which covers every status, [Tags][], [Integrations][], and [Custom Metadata][] type.

[:fa-bell: View Alarm Plugin Object Example][Alarm Plugin Object]

---

### XML Passthrough (Debug)

**Format:** :Nodinite: Alarm object XML  
**Technology:** XSLT  
**Output:** The raw alarm XML, unchanged, in a plain-text email

See exactly which data the [Monitoring Service][] sends to the Email Alarm Plugins before you build a custom alert [Stylesheet][Stylesheets].

[:fa-bug: View XML Passthrough Example][XML Passthrough]

---

### EDIFACT Line Breaking

**Format:** EDI Flat File (EDIFACT or X12)  
**Technology:** Liquid with JavaScript  
**Output:** Line-broken, readable EDI format

Transform compact EDIFACT messages into readable line-by-line format. Useful for operators who need to inspect or verify EDI interchange content in :Nodinite: [Log Views][].

[:fa-file-lines: View EDIFACT Line Breaking Example][Line break an EDIFACT]

---

### XML to XML Transformation

**Format:** XML to XML  
**Technology:** XSLT  
**Output:** Reformatted or restructured XML

Transform XML structures from one schema to another. Useful for reshaping messages to hide sensitive data, restructure for reporting, or conform to different system requirements.

[:fa-exchange: View XML to XML Example][XML to XML]

---

## O2C Demo Stylesheets

The [Order-to-Cash demo][] includes one Stylesheet for message formatting at each of its 7 order steps, from Order Received to Order Invoiced:

* **JSON steps** (Order Received, Order Planned, Order Invoiced) - Liquid templates on the parsed JSON
* **XML steps** (Order Entry, Order Ready) - XSLT templates
* **CSV and PSV steps** (Order Confirmation, Order Shipped) - Liquid templates that split the raw body

Learn more about using stylesheets in the O2C demo and see how raw messages transform into business-friendly reports:

[:fa-palette: View O2C Demo Stylesheets Overview][O2C Demo Stylesheets]

---

## How to Apply These Examples

1. Copy the stylesheet code from the example page
2. Navigate to **Administration → Customize → [Stylesheets][Stylesheets Overview]**
3. Click **Add Stylesheet**
4. Paste the template code
5. Bind to your [Message Type][]
6. Click **Message Body** to load sample data (raw input, a file, or a logged Message Id) and check the result with **Preview**, see [Preview with a test message body][Add or manage Stylesheet - Preview]
7. If the example contains JavaScript, set [StylesheetScriptsEnabled][] to `true`

For complete guidance, see [Add or manage Stylesheet][].

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

* :fa-code: Choose an example above and review the complete code  
* :fa-file-plus: [Add or manage Stylesheet][] to deploy in :Nodinite:  
* :fa-tags: [Message Types][] - Associate stylesheets with your messages  

## :fa-link-horizontal: Related Topics

* :fa-book: [What is a Stylesheet?][Stylesheets]  
* :fa-edit: [Add or manage Stylesheet][]  
* :fa-tags: [Message Types][]  
* :fa-search: [Log Views][]  
* :fa-cogs: [Stylesheets Overview][Stylesheets Overview]  
* :fa-bell: [Alarm Plugins][]  
* :fa-gears: [StylesheetScriptsEnabled][]  
* :fa-palette: [O2C Demo Stylesheets][]  

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

[Add or manage Stylesheet]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Features/Add%20or%20manage%20Stylesheet.md
[Add or manage Stylesheet - Preview]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Features/Add%20or%20manage%20Stylesheet.md#preview-with-a-test-message-body
[Alarm Plugin Object]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Examples/Alarm%20Plugin%20Object.md
[Alarm Plugin Object Sample Data]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Examples/Alarm%20Plugin%20Object%20Sample%20Data.md
[Alarm Plugins]:{ndr}/Administration/5.%20Settings/1.%20Alarm%20Plugins/Features/What%20is%20an%20Alarm%20Plugin.md
[Base64Decode XML from JSON]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Examples/Base64Decode%20XML%20from%20JSON.md
[Custom Metadata]:{ndr}/Repository%20Model/Custom%20Metadata/Overview.md
[Integrations]:{ndr}/Repository%20Model/Integrations/Overview.md
[Line break an EDIFACT]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Examples/Line%20break%20an%20EDIFACT.md
[Log Views]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/What%20is%20a%20Log%20View.md
[Message Type]:{ndr}/Repository%20Model/Message%20Types/Overview.md
[Message Types]:{ndr}/Repository%20Model/Message%20Types/Overview.md
[Monitoring Service]:{ndr}/Core%20Services/Monitoring%20Service/Overview.md
[O2C Demo Stylesheets]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/Stylesheets/Overview.md
[Order-to-Cash demo]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/Generate-O2C-Demo-Data.md
[Stylesheets]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Features/What%20is%20a%20Stylesheet.md
[Stylesheets Overview]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Overview.md
[StylesheetScriptsEnabled]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/StylesheetScriptsEnabled.md
[System Parameters]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/Overview.md
[Tags]:{ndr}/Administration/4.%20Customize/5.%20Tags/Features/What%20is%20a%20Tag.md
[Web Client]:{ndr}/Getting%20Started/Overview.md
[XML Passthrough]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Examples/XML%20Passthrough.md
[XML to XML]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Examples/XML%20to%20XML.md