---
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 <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> 7.12.*  

<aside aria-label="Note" class="nodinite-note nodinite-note--note">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-note"></i> Note</p>
<div class="nodinite-note__content"><p>The <a href="#base64-decode-xml-from-json">Base64-Decode XML from JSON</a> and <a href="#edifact-line-breaking">EDIFACT Line Breaking</a> examples contain JavaScript. They run only when the <a href="https://docs.nodinite.com/administration/settings/system-parameters/stylesheetscriptsenabled/">StylesheetScriptsEnabled</a> <a href="https://docs.nodinite.com/administration/settings/system-parameters/overview/">System Parameter</a> is <code>true</code>; the default is <code>false</code> on a new installation, and an upgraded installation keeps its value. <sup><span class="nodinite-new-badge">New 7.12</span></sup> The scripts run isolated from the <a href="https://docs.nodinite.com/getting-started/overview/">Web Client</a>.</p></div>
</aside>

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

[<i class="fal fa-file-code" aria-hidden="true"></i> View Base64-Decode XML from JSON Example][Base64Decode XML from JSON]

---

### Alarm Plugin Object Formatting

**Format:** <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> Alarm object XML  
**Technology:** XSLT  
**Output:** Formatted alert notifications

Transform <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> 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.

[<i class="fal fa-bell" aria-hidden="true"></i> View Alarm Plugin Object Example][Alarm Plugin Object]

---

### XML Passthrough (Debug)

**Format:** <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> 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].

[<i class="fal fa-bug" aria-hidden="true"></i> 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 <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [Log Views][].

[<i class="fal fa-file-lines" aria-hidden="true"></i> 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.

[<i class="fal fa-exchange" aria-hidden="true"></i> 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:

[<i class="fal fa-palette" aria-hidden="true"></i> 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][].

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

* <i class="fal fa-code" aria-hidden="true"></i> Choose an example above and review the complete code  
* <i class="fal fa-file-plus" aria-hidden="true"></i> [Add or manage Stylesheet][] to deploy in <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>  
* <i class="fal fa-tags" aria-hidden="true"></i> [Message Types][] - Associate stylesheets with your messages  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-book" aria-hidden="true"></i> [What is a Stylesheet?][Stylesheets]  
* <i class="fal fa-edit" aria-hidden="true"></i> [Add or manage Stylesheet][]  
* <i class="fal fa-tags" aria-hidden="true"></i> [Message Types][]  
* <i class="fal fa-search" aria-hidden="true"></i> [Log Views][]  
* <i class="fal fa-cogs" aria-hidden="true"></i> [Stylesheets Overview][Stylesheets Overview]  
* <i class="fal fa-bell" aria-hidden="true"></i> [Alarm Plugins][]  
* <i class="fal fa-gears" aria-hidden="true"></i> [StylesheetScriptsEnabled][]  
* <i class="fal fa-palette" aria-hidden="true"></i> [O2C Demo Stylesheets][]  

[1]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Customize/Stylesheets/Stylesheet_XmlToXml.gif

[Add or manage Stylesheet]:https://docs.nodinite.com/administration/customize/stylesheets/features/add-or-manage-stylesheet/
[Add or manage Stylesheet - Preview]:https://docs.nodinite.com/administration/customize/stylesheets/features/add-or-manage-stylesheet/#preview-with-a-test-message-body
[Alarm Plugin Object]:https://docs.nodinite.com/administration/customize/stylesheets/examples/alarm-plugin-object/
[Alarm Plugin Object Sample Data]:https://docs.nodinite.com/administration/customize/stylesheets/examples/alarm-plugin-object-sample-data/
[Alarm Plugins]:https://docs.nodinite.com/administration/settings/alarm-plugins/features/what-is-an-alarm-plugin/
[Base64Decode XML from JSON]:https://docs.nodinite.com/administration/customize/stylesheets/examples/base64decode-xml-from-json/
[Custom Metadata]:https://docs.nodinite.com/repository-model/custom-metadata/overview/
[Integrations]:https://docs.nodinite.com/repository-model/integrations/overview/
[Line break an EDIFACT]:https://docs.nodinite.com/administration/customize/stylesheets/examples/line-break-an-edifact/
[Log Views]:https://docs.nodinite.com/administration/log-management/log-views/features/what-is-a-log-view/
[Message Type]:https://docs.nodinite.com/repository-model/message-types/overview/
[Message Types]:https://docs.nodinite.com/repository-model/message-types/overview/
[Monitoring Service]:https://docs.nodinite.com/core-services/monitoring-service/overview/
[O2C Demo Stylesheets]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/stylesheets/overview/
[Order-to-Cash demo]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/generate-o2c-demo-data/
[Stylesheets]:https://docs.nodinite.com/administration/customize/stylesheets/features/what-is-a-stylesheet/
[Stylesheets Overview]:https://docs.nodinite.com/administration/customize/stylesheets/overview/
[StylesheetScriptsEnabled]:https://docs.nodinite.com/administration/settings/system-parameters/stylesheetscriptsenabled/
[System Parameters]:https://docs.nodinite.com/administration/settings/system-parameters/overview/
[Tags]:https://docs.nodinite.com/administration/customize/tags/features/what-is-a-tag/
[Web Client]:https://docs.nodinite.com/getting-started/overview/
[XML Passthrough]:https://docs.nodinite.com/administration/customize/stylesheets/examples/xml-passthrough/
[XML to XML]:https://docs.nodinite.com/administration/customize/stylesheets/examples/xml-to-xml/