---
title: Order Entry Stylesheet - XSLT Template Example
description: Render the XML Order Entry messages of the Nodinite Order-to-Cash demo as a readable ERP order document with the XSLT Stylesheet O2C - View Order Entry, from Log Views and BPM Log Search (7.12).
---

# Order Entry Stylesheet

> This page provides the **XSLT** [Stylesheet][Stylesheets] **O2C - View Order Entry** for the **Order Entry** messages (Step 2) in the [Order-to-Cash demo][Generate-Demo].

![O2C BPM Viewer with order ORD-10005 for Tailspin Toys, Action on the Order Entry in ERP Finished event and View message formatted as O2C - View Order Entry, ending on the Order Entry document ERP-2025-10005, animated walkthrough (7.12)][1]  
*Animated walkthrough: in the BPM Viewer of [BPM Log Search][Search log events from a BPM], open **Action** on the *Order Entry in ERP Finished* event of order `ORD-10005` and choose **View message formatted as 'O2C - View Order Entry'**.*  

**Read the ERP's XML order as a document, not as markup.** With <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [Stylesheets][], operators see what the ERP registered without reading namespaced XML. On this page, you will:

* ✅ Transform the XML Order Entry message into an ERP order document with XSLT  
* ✅ Show the ERP reference, the order and entry dates, the status, and the order lines with a Reserved column  
* ✅ Open the document from [Log Views][] and from [BPM Log Search][Search log events from a BPM] <sup><span class="nodinite-new-badge">New 7.11</span></sup>  

## <i class="fal fa-diagram-project" aria-hidden="true"></i> Understanding the Order Entry Stylesheet

A [Stylesheet][Stylesheets] is tied to a [Message Type][Message Types]. The business [Log Event][] of Step 2, *Order Entry in ERP Finished*, carries the Message Type `O2C.Order.Entry/1.0`, so <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> offers **O2C - View Order Entry** for it. XSLT reads the XML body directly; the namespace `http://schemas.Contoso.example/O2C/1.0` is bound to the prefix `o` in the template.

<div class="mermaid">
graph LR
    A["fa:fa-inbox Order Entry<br/>Log Event (XML)"] --> B{"fa:fa-tags Message Type<br/>O2C.Order.Entry/1.0"}
    B --> C["fa:fa-file-code O2C - View Order Entry<br/>(XSLT)"]
    C --> D["fa:fa-file-alt Order Entry document"]
    D --> E1["fa:fa-search Log Views"]
    D --> E2["fa:fa-sitemap BPM Log Search"]
    style A fill:#2678BD
    style B fill:#9E59BB
    style C fill:#3F827B
    style D fill:#93d16d
    style E1 fill:#2678BD
    style E2 fill:#2678BD
</div>

*The Order Entry [Log Event][] (blue) is matched to its [Message Type][Message Types] (purple); the XSLT [Stylesheet][Stylesheets] (teal) renders the document (green), which users open from a [Log View][Log Views] or from [BPM Log Search][Search log events from a BPM] (blue).*

### <i class="fal fa-puzzle-piece" aria-hidden="true"></i> Where Users Open the Order Entry Document

|Where|How|
|---|---|
|[Log Views][]|Search the Log View, open **Action** on the *Order Entry in ERP Finished* event, and choose **View message formatted as 'O2C - View Order Entry'**.|
|[Log Search][Search log events from a BPM] on a BPM <sup><span class="nodinite-new-badge">New 7.11</span></sup>|Click **Log Search** on the Order-to-Cash [BPM][], search for the order number, and open **Action** on the Order Entry event in the BPM Viewer.|

The dialog is titled **View message body formatted as 'O2C - View Order Entry'** and has the buttons **Open in New Window**, **Print**, and **Close**. The forwarding event of the step, *Order Entry Received*, logs `O2C.Forwarding/1.0`, so this Stylesheet isn't offered there.

![Order Entry ORD-10005 for Tailspin Toys rendered by the O2C - View Order Entry Stylesheet, with the ERP reference, the dates, the status ENTERED, and one reserved order line (7.13)][2]  
*The XML Order Entry message rendered as an ERP order document: ERP reference, order and entry dates, status, and the order lines with their inventory reservation and the total.*  

### <i class="fal fa-gear" aria-hidden="true"></i> Stylesheet Settings

|Setting|Value|Why|
|---|---|---|
|Name|`O2C - View Order Entry`|The name users pick in the **Action** menu|
|Type|XSLT|The Order Entry body is XML|
|Render as HTML|**Checked**|The template outputs an HTML page|
|Message Body is Json|Not shown|The checkbox only appears for Liquid; XSLT always reads the body as XML|
|Message Types|`O2C.Order.Entry/1.0`|Only the Step 2 business event gets the Stylesheet|

## <i class="fal fa-file-code" aria-hidden="true"></i> Input XML

The Order Entry body of order 1 as logged by the [demo data script][Generate-Demo], the same message as on the [Step 2 page][Order-Entry-Message]. Other orders carry another customer, product, quantity, and total ([the six demo customers][Demo Customers]).

```xml
<?xml version="1.0" encoding="utf-8"?>
<OrderEntry xmlns="http://schemas.Contoso.example/O2C/1.0">
  <OrderHeader>
    <OrderId>ORD-10001</OrderId>
    <OrderDate>2025-10-14T09:15:00Z</OrderDate>
    <EntryDate>2025-10-14T09:18:30Z</EntryDate>
    <OrderStatus>ENTERED</OrderStatus>
  </OrderHeader>
  <Customer>
    <CustomerId>CUST-001</CustomerId>
    <CustomerName>Contoso Corporation</CustomerName>
    <CustomerEmail>orders@Contoso.example.com</CustomerEmail>
  </Customer>
  <OrderLines>
    <OrderLine>
      <LineId>1</LineId>
      <SKU>SKU-DEMO-001</SKU>
      <Description>Demo Widget</Description>
      <Quantity>1</Quantity>
      <UnitPrice>99.95</UnitPrice>
      <LineTotal>99.95</LineTotal>
      <InventoryReserved>true</InventoryReserved>
    </OrderLine>
  </OrderLines>
  <OrderTotal>99.95</OrderTotal>
  <Currency>USD</Currency>
  <ERPReferenceNumber>ERP-2025-10001</ERPReferenceNumber>
</OrderEntry>
```

### <i class="fal fa-table" aria-hidden="true"></i> XML to Document Mapping

|XML element (prefix `o`)|Shown in the document as|
|---|---|
|`o:OrderHeader/o:OrderId`|The title, and **Order ID**|
|`o:ERPReferenceNumber`|*Registered in the ERP as* under the title|
|`o:Customer/o:CustomerName`, `o:Customer/o:CustomerId`|**Customer**|
|`o:OrderHeader/o:OrderDate`, `o:OrderHeader/o:EntryDate`|**Order Date**, **Entry Date**|
|`o:OrderHeader/o:OrderStatus`|**Status**, as a badge|
|`o:OrderLines/o:OrderLine`|**Order Lines** table: Line, SKU, Description, Qty, Unit Price, Line Total|
|`o:InventoryReserved`|**Reserved**: *Yes* for `true`, otherwise *No*|
|`o:OrderTotal`, `o:Currency`|The **Total** row|

XML values show exactly as the message holds them: dates stay `2025-10-14T09:15:00Z`, and amounts keep their two decimals. `CustomerEmail` is not displayed.

## <i class="fal fa-code" aria-hidden="true"></i> XSLT Template

The template uses Bootstrap 4 for the layout. `exclude-result-prefixes="o"` keeps the namespace out of the HTML output.

```xml
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:o="http://schemas.Contoso.example/O2C/1.0" exclude-result-prefixes="o">
  <xsl:output method="html" indent="yes"/>
  <xsl:template match="/o:OrderEntry">
    <html>
      <head>
        <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"/>
      </head>
      <body>
        <div class="container mt-4">
          <h1 class="mb-0">Order Entry <xsl:value-of select="o:OrderHeader/o:OrderId"/></h1>
          <span class="text-muted">Registered in the ERP as <strong><xsl:value-of select="o:ERPReferenceNumber"/></strong></span>
          <table class="table mt-3">
            <thead>
              <tr><th>Order ID</th><th>Customer</th><th>Order Date</th><th>Entry Date</th><th>Status</th></tr>
            </thead>
            <tbody>
              <tr>
                <td><strong><xsl:value-of select="o:OrderHeader/o:OrderId"/></strong></td>
                <td><strong><xsl:value-of select="o:Customer/o:CustomerName"/></strong><br/><span class="text-muted"><xsl:value-of select="o:Customer/o:CustomerId"/></span></td>
                <td><xsl:value-of select="o:OrderHeader/o:OrderDate"/></td>
                <td><xsl:value-of select="o:OrderHeader/o:EntryDate"/></td>
                <td><span class="badge badge-success"><xsl:value-of select="o:OrderHeader/o:OrderStatus"/></span></td>
              </tr>
            </tbody>
          </table>
          <h5 class="mt-4">Order Lines</h5>
          <table class="table table-sm">
            <thead>
              <tr><th>Line</th><th>SKU</th><th>Description</th><th class="text-center">Qty</th><th class="text-right">Unit Price</th><th class="text-right">Line Total</th><th class="text-center">Reserved</th></tr>
            </thead>
            <tbody>
              <xsl:for-each select="o:OrderLines/o:OrderLine">
                <tr>
                  <td><xsl:value-of select="o:LineId"/></td>
                  <td><xsl:value-of select="o:SKU"/></td>
                  <td><xsl:value-of select="o:Description"/></td>
                  <td class="text-center"><xsl:value-of select="o:Quantity"/></td>
                  <td class="text-right"><xsl:value-of select="o:UnitPrice"/></td>
                  <td class="text-right"><xsl:value-of select="o:LineTotal"/></td>
                  <td class="text-center"><xsl:choose><xsl:when test="o:InventoryReserved = 'true'">Yes</xsl:when><xsl:otherwise>No</xsl:otherwise></xsl:choose></td>
                </tr>
              </xsl:for-each>
            </tbody>
            <tfoot>
              <tr><th colspan="5" class="text-right">Total (<xsl:value-of select="o:Currency"/>)</th><th class="text-right"><xsl:value-of select="o:OrderTotal"/></th><th></th></tr>
            </tfoot>
          </table>
          <div class="mt-5 pt-3 border-top text-center text-muted"><small>Rendered by a Nodinite Stylesheet (XSLT) from the Order Entry message</small></div>
        </div>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>
```

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

* <i class="fal fa-palette" aria-hidden="true"></i> [Order Confirmation Stylesheet][Next-Stylesheet] — The CSV message of Step 3, rendered with Liquid  
* <i class="fal fa-palette" aria-hidden="true"></i> [View all O2C stylesheets][Overview] — Every demo Stylesheet and its settings  
* <i class="fal fa-play" aria-hidden="true"></i> [Generate O2C Demo Data][Generate-Demo] — Create test messages for this Stylesheet  

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

* <i class="fal fa-arrow-left" aria-hidden="true"></i> [Order Received Stylesheet][Previous-Stylesheet]  
* <i class="fal fa-server" aria-hidden="true"></i> [2. Order Entry in ERP Finished][Order-Entry-Message] — The step this message belongs to  
* <i class="fal fa-file-lines" aria-hidden="true"></i> [What is a Stylesheet?][Stylesheets]  
* <i class="fal fa-file-circle-plus" aria-hidden="true"></i> [Add or manage Stylesheet][]  
* <i class="fal fa-tags" aria-hidden="true"></i> [Message Types][]  

[1]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Repository/BPMs/O2C/O2C_Stylesheet_2-Order-Entry_Open.gif
[2]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Repository/BPMs/O2C/O2C_Stylesheet_2-Order-Entry.png

[Add or manage Stylesheet]:https://docs.nodinite.com/administration/customize/stylesheets/features/add-or-manage-stylesheet/
[BPM]:https://docs.nodinite.com/repository-model/bpms/overview/
[Demo Customers]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/generate-o2c-demo-data/#fa-users-customers-products-and-grouping
[Generate-Demo]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/generate-o2c-demo-data/
[Log Event]:https://docs.nodinite.com/core-services/log-event/overview/
[Log Views]:https://docs.nodinite.com/administration/log-management/log-views/features/what-is-a-log-view/
[Message Types]:https://docs.nodinite.com/repository-model/message-types/overview/
[Next-Stylesheet]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/stylesheets/3-order-confirmation/
[Order-Entry-Message]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/2-order-entry/
[Overview]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/stylesheets/overview/
[Previous-Stylesheet]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/stylesheets/1-order-received/
[Search log events from a BPM]:https://docs.nodinite.com/getting-started/repository/bpms/search-log-events-from-a-bpm/
[Stylesheets]:https://docs.nodinite.com/administration/customize/stylesheets/features/what-is-a-stylesheet/