Skip to content

Gallery

Real-world XML and JSON documents rendered with unxml, syntax-highlighted with the same grammar unxml ships for bat.

The basics below are shown inline — original source on the left, unxml output on the right. The gallery further down links full-page renders of larger real-world documents, with original-vs-rendered size comparisons.

JSON

Uniform objects become a compact table

service-catalog.json · 23 → 25 lines

JSON source
{
  "generatedAt": "2026-07-30T09:00:00Z",
  "environments": ["development", "staging", "production"],
  "services": [
    {"name": "accounts", "team": "identity", "language": "Rust", "tier": 1, "healthy": true},
    {"name": "catalog", "team": "commerce", "language": "Go", "tier": 1, "healthy": true},
    {"name": "checkout", "team": "commerce", "language": "Kotlin", "tier": 1, "healthy": false},
    {"name": "email", "team": "engagement", "language": "Python", "tier": 2, "healthy": true},
    {"name": "recommendations", "team": "data, search", "language": "Python", "tier": 2, "healthy": true},
    {"name": "web", "team": "experience", "language": "TypeScript", "tier": 1, "healthy": true}
  ],
  "deployment": {
    "region": "eu-north-1",
    "replicas": 3,
    "strategy": "rolling"
  },
  "alerts": [
    {"service": "checkout", "severity": "critical", "details": {"code": "PAYMENT_TIMEOUT", "count": 17}},
    {"service": "catalog", "severity": "warning", "details": null}
  ],
  "metadata": {},
  "retired": []
}
unxml
generatedAt = 2026-07-30T09:00:00Z
environments = [development, staging, production]
services[]{name,team,language,tier,healthy}
  accounts, identity, Rust, 1, true
  catalog, commerce, Go, 1, true
  checkout, commerce, Kotlin, 1, false
  email, engagement, Python, 2, true
  recommendations, "data, search", Python, 2, true
  web, experience, TypeScript, 1, true
deployment
  region = eu-north-1
  replicas = 3
  strategy = rolling
alerts[]
  service = checkout
  severity = critical
  details
    code = PAYMENT_TIMEOUT
    count = 17
alerts[]
  service = catalog
  severity = warning
  details = null
metadata = {}
retired = []

JSON Schema — required fields, types, refs, and regex

person.schema.json · 47 → 17 lines

JSON source
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.test/person.schema.json",
  "title": "Person",
  "type": "object",
  "required": ["id", "email", "username"],
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64"
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "username": {
      "type": "string",
      "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{2,31}$",
      "minLength": 3,
      "maxLength": 32
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "manager": {
      "$ref": "#/$defs/PersonSummary"
    }
  },
  "$defs": {
    "PersonSummary": {
      "type": "object",
      "required": ["id", "username"],
      "properties": {
        "id": {
          "type": "integer"
        },
        "username": {
          "type": "string"
        }
      }
    }
  }
}
unxml
"$schema" = https://json-schema.org/draft/2020-12/schema
"$id" = https://example.test/person.schema.json
schema : object
  id! : integer int64
  email! : string email
  username! : string
    pattern = "^[a-zA-Z][a-zA-Z0-9_-]{2,31}$"
    minLength = 3
    maxLength = 32
  tags : string[]
    uniqueItems = true
  manager : ref PersonSummary
  defs
    PersonSummary : object
      id! : integer
      username! : string
  title = Person

OpenAPI — embedded schemas simplify in place

openapi-schema.json · 61 → 25 lines

JSON source
{
  "openapi": "3.1.0",
  "info": {
    "title": "People API",
    "version": "1.0.0"
  },
  "paths": {
    "/people/{id}": {
      "get": {
        "summary": "Fetch one person",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The person",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Person"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Person": {
        "type": "object",
        "required": ["id", "email"],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
unxml
openapi = 3.1.0
info
  title = People API
  version = 1.0.0
paths
  "/people/{id}"
    get
      summary = Fetch one person
      parameters[]
        name = id
        in = path
        required = true
        schema : integer int64
      responses
        "200"
          description = The person
          content
            "application/json"
              schema : ref Person
components
  schemas
    Person : object
      id! : integer int64
      email! : string email
      roles : string[]

Invoice basics

CII / Factur-X — minimal invoice

factur-x-basic.xml · 130 → 83 lines

XML source
<?xml version="1.0" encoding="UTF-8" ?>
<rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100">
    <!-- generated by: mustangproject.org vnull-->
    <rsm:ExchangedDocumentContext>
        <ram:GuidelineSpecifiedDocumentContextParameter>
            <ram:ID>urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic</ram:ID>
        </ram:GuidelineSpecifiedDocumentContextParameter>
    </rsm:ExchangedDocumentContext>
    <rsm:ExchangedDocument>
        <ram:ID>471102</ram:ID>
        <ram:TypeCode>380</ram:TypeCode>
        <ram:IssueDateTime>
            <udt:DateTimeString format="102">20241115</udt:DateTimeString>
        </ram:IssueDateTime>
        <ram:IncludedNote>
            <ram:Content>Rechnung gemäß Bestellung vom 01.11.2024.</ram:Content>
        </ram:IncludedNote>
        <ram:IncludedNote>
            <ram:Content>Lieferant GmbH
                Lieferantenstraße 20
                80333 München
                Deutschland
                Geschäftsführer: Hans Muster
                Handelsregisternummer: H A 123</ram:Content>
        </ram:IncludedNote>
        <ram:IncludedNote>
            <ram:Content>Unsere GLN: 4000001123452
                Ihre GLN: 4000001987658
                Ihre Kundennummer: GE2020211
                Zahlbar innerhalb 30 Tagen netto bis 25.12.2024, 3% Skonto innerhalb 10 Tagen bis 25.11.2024.</ram:Content>
        </ram:IncludedNote>
    </rsm:ExchangedDocument>
    <rsm:SupplyChainTradeTransaction>
        <ram:IncludedSupplyChainTradeLineItem>
            <ram:AssociatedDocumentLineDocument>
                <ram:LineID>1</ram:LineID>
            </ram:AssociatedDocumentLineDocument>
            <ram:SpecifiedTradeProduct>
                <ram:GlobalID schemeID="0160">4012345001235</ram:GlobalID>
                <ram:Name>GTIN: 4012345001235
                    Unsere Art.-Nr.: TB100A4
                    Trennblätter A4
                </ram:Name>
            </ram:SpecifiedTradeProduct>
            <ram:SpecifiedLineTradeAgreement>
                <ram:NetPriceProductTradePrice>
                    <ram:ChargeAmount>9.9000</ram:ChargeAmount>
                    <ram:BasisQuantity unitCode="H87">1.0000</ram:BasisQuantity>
                </ram:NetPriceProductTradePrice>
            </ram:SpecifiedLineTradeAgreement>
            <ram:SpecifiedLineTradeDelivery>
                <ram:BilledQuantity unitCode="H87">20.0000</ram:BilledQuantity>
            </ram:SpecifiedLineTradeDelivery>
            <ram:SpecifiedLineTradeSettlement>
                <ram:ApplicableTradeTax>
                    <ram:TypeCode>VAT</ram:TypeCode>
                    <ram:CategoryCode>S</ram:CategoryCode>
                    <ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
                </ram:ApplicableTradeTax>
                <ram:SpecifiedTradeSettlementLineMonetarySummation>
                    <ram:LineTotalAmount>198.00</ram:LineTotalAmount>
                </ram:SpecifiedTradeSettlementLineMonetarySummation>
            </ram:SpecifiedLineTradeSettlement>
        </ram:IncludedSupplyChainTradeLineItem>
        <ram:ApplicableHeaderTradeAgreement>
            <ram:SellerTradeParty>
                <ram:Name>Lieferant GmbH</ram:Name>
                <ram:PostalTradeAddress>
                    <ram:PostcodeCode>80333</ram:PostcodeCode>
                    <ram:LineOne>Lieferantenstraße 20</ram:LineOne>
                    <ram:CityName>München</ram:CityName>
                    <ram:CountryID>DE</ram:CountryID>
                </ram:PostalTradeAddress>
                <ram:SpecifiedTaxRegistration>
                    <ram:ID schemeID="VA">DE123456789</ram:ID>
                </ram:SpecifiedTaxRegistration>
                <ram:SpecifiedTaxRegistration>
                    <ram:ID schemeID="FC">201/113/40209</ram:ID>
                </ram:SpecifiedTaxRegistration>
            </ram:SellerTradeParty>
            <ram:BuyerTradeParty>
                <ram:Name>Kunden AG Mitte</ram:Name>
                <ram:PostalTradeAddress>
                    <ram:PostcodeCode>69876</ram:PostcodeCode>
                    <ram:LineOne>Hans Muster</ram:LineOne>
                    <ram:LineTwo>Kundenstraße 15</ram:LineTwo>
                    <ram:CityName>Frankfurt</ram:CityName>
                    <ram:CountryID>DE</ram:CountryID>
                </ram:PostalTradeAddress>
            </ram:BuyerTradeParty>
        </ram:ApplicableHeaderTradeAgreement>
        <ram:ApplicableHeaderTradeDelivery>
            <ram:ActualDeliverySupplyChainEvent>
                <ram:OccurrenceDateTime>
                    <udt:DateTimeString format="102">20241114</udt:DateTimeString>
                </ram:OccurrenceDateTime>
            </ram:ActualDeliverySupplyChainEvent>
        </ram:ApplicableHeaderTradeDelivery>
        <ram:ApplicableHeaderTradeSettlement>
            <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
            <ram:ApplicableTradeTax>
                <ram:CalculatedAmount>37.62</ram:CalculatedAmount>
                <ram:TypeCode>VAT</ram:TypeCode>
                <ram:BasisAmount>198.00</ram:BasisAmount>
                <ram:CategoryCode>S</ram:CategoryCode>
                <ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
            </ram:ApplicableTradeTax>
            <ram:SpecifiedTradePaymentTerms>
                <ram:Description>Zahlbar innerhalb 30 Tagen netto bis 25.12.2024, 3% Skonto innerhalb 10 Tagen bis 25.11.2024.</ram:Description>
                <ram:DueDateDateTime>
                    <udt:DateTimeString format="102">20241215</udt:DateTimeString>
                </ram:DueDateDateTime>
            </ram:SpecifiedTradePaymentTerms>
            <ram:SpecifiedTradeSettlementHeaderMonetarySummation>
                <ram:LineTotalAmount>198.00</ram:LineTotalAmount>
                <ram:ChargeTotalAmount>0.00</ram:ChargeTotalAmount>
                <ram:AllowanceTotalAmount>0.00</ram:AllowanceTotalAmount>
                <ram:TaxBasisTotalAmount>198.00</ram:TaxBasisTotalAmount>
                <ram:TaxTotalAmount currencyID="EUR">37.62</ram:TaxTotalAmount>
                <ram:GrandTotalAmount>235.62</ram:GrandTotalAmount>
                <ram:TotalPrepaidAmount>0.00</ram:TotalPrepaidAmount>
                <ram:DuePayableAmount>235.62</ram:DuePayableAmount>
            </ram:SpecifiedTradeSettlementHeaderMonetarySummation>
        </ram:ApplicableHeaderTradeSettlement>
    </rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>
unxml --auto
CrossIndustryInvoice(
    xmlns="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100",
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance")
  // generated by: mustangproject.org vnull
  ExchangedDocumentContext/GuidelineSpecifiedDocumentContextParameter/ID = urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic
  ExchangedDocument
    ID = 471102
    TypeCode = 380
    IssueDateTime/DateTimeString(format="102") = 20241115
    IncludedNote/Content = Rechnung gemäß Bestellung vom 01.11.2024.
    IncludedNote/Content =
      | Lieferant GmbH
      |                 Lieferantenstraße 20
      |                 80333 München
      |                 Deutschland
      |                 Geschäftsführer: Hans Muster
      |                 Handelsregisternummer: H A 123
    IncludedNote/Content =
      | Unsere GLN: 4000001123452
      |                 Ihre GLN: 4000001987658
      |                 Ihre Kundennummer: GE2020211
      |
      |
      |                 Zahlbar innerhalb 30 Tagen netto bis 25.12.2024, 3% Skonto innerhalb 10 Tagen bis 25.11.2024.
  SupplyChainTradeTransaction
    IncludedSupplyChainTradeLineItem
      AssociatedDocumentLineDocument/LineID = 1
      SpecifiedTradeProduct
        GlobalID(schemeID="0160") = 4012345001235
        Name =
          | GTIN: 4012345001235
          |                     Unsere Art.-Nr.: TB100A4
          |                     Trennblätter A4
      SpecifiedLineTradeAgreement/NetPriceProductTradePrice
        ChargeAmount = 9.9000
        BasisQuantity(unitCode="H87") = 1.0000
      SpecifiedLineTradeDelivery/BilledQuantity(unitCode="H87") = 20.0000
      SpecifiedLineTradeSettlement
        ApplicableTradeTax
          TypeCode = VAT
          CategoryCode = S
          RateApplicablePercent = 19.00
        SpecifiedTradeSettlementLineMonetarySummation/LineTotalAmount = 198.00
    ApplicableHeaderTradeAgreement
      SellerTradeParty
        Name = Lieferant GmbH
        PostalTradeAddress
          PostcodeCode = 80333
          LineOne = Lieferantenstraße 20
          CityName = München
          CountryID = DE
        SpecifiedTaxRegistration/ID(schemeID="VA") = DE123456789
        SpecifiedTaxRegistration/ID(schemeID="FC") = 201/113/40209
      BuyerTradeParty
        Name = Kunden AG Mitte
        PostalTradeAddress
          PostcodeCode = 69876
          LineOne = Hans Muster
          LineTwo = Kundenstraße 15
          CityName = Frankfurt
          CountryID = DE
    ApplicableHeaderTradeDelivery/ActualDeliverySupplyChainEvent/OccurrenceDateTime/DateTimeString(
        format="102") = 20241114
    ApplicableHeaderTradeSettlement
      InvoiceCurrencyCode = EUR
      ApplicableTradeTax
        CalculatedAmount = 37.62
        TypeCode = VAT
        BasisAmount = 198.00
        CategoryCode = S
        RateApplicablePercent = 19.00
      SpecifiedTradePaymentTerms
        Description = Zahlbar innerhalb 30 Tagen netto bis 25.12.2024, 3% Skonto innerhalb 10 Tagen bis 25.11.2024.
        DueDateDateTime/DateTimeString(format="102") = 20241215
      SpecifiedTradeSettlementHeaderMonetarySummation
        LineTotalAmount = 198.00
        ChargeTotalAmount = 0.00
        AllowanceTotalAmount = 0.00
        TaxBasisTotalAmount = 198.00
        TaxTotalAmount(currencyID="EUR") = 37.62
        GrandTotalAmount = 235.62
        TotalPrepaidAmount = 0.00
        DuePayableAmount = 235.62

Folding boilerplate

UBL — ext:UBLExtensions collapsed under --auto

invoice-with-extensions.xml · 35 → 15 lines

XML source
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
         xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
         xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
         xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
         xmlns:sig="urn:oasis:names:specification:ubl:schema:xsd:CommonSignatureComponents-2"
         xmlns:sac="urn:oasis:names:specification:ubl:schema:xsd:SignatureAggregateComponents-2"
         xmlns:sbc="urn:oasis:names:specification:ubl:schema:xsd:SignatureBasicComponents-2">
  <ext:UBLExtensions>
    <ext:UBLExtension>
      <ext:ExtensionContent>
        <sig:UBLDocumentSignatures>
          <sac:SignatureInformation>
            <cbc:ID>urn:oasis:names:tc:ebcore:partyid-type:unregistered</cbc:ID>
            <sbc:ReferencedSignatureID>urn:oasis:names:specification:ubl:signature:Invoice</sbc:ReferencedSignatureID>
          </sac:SignatureInformation>
        </sig:UBLDocumentSignatures>
      </ext:ExtensionContent>
    </ext:UBLExtension>
  </ext:UBLExtensions>
  <cbc:UBLVersionID>2.1</cbc:UBLVersionID>
  <cbc:ID>INV-2026-0042</cbc:ID>
  <cbc:IssueDate>2026-01-15</cbc:IssueDate>
  <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
  <cac:AccountingSupplierParty>
    <cac:Party>
      <cac:PartyName>
        <cbc:Name>Acme Components Ltd</cbc:Name>
      </cac:PartyName>
    </cac:Party>
  </cac:AccountingSupplierParty>
  <cac:LegalMonetaryTotal>
    <cbc:PayableAmount currencyID="EUR">1240.00</cbc:PayableAmount>
  </cac:LegalMonetaryTotal>
</Invoice>
unxml --auto
Invoice(
    xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2",
    xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2",
    xmlns:sac="urn:oasis:names:specification:ubl:schema:xsd:SignatureAggregateComponents-2",
    xmlns:sbc="urn:oasis:names:specification:ubl:schema:xsd:SignatureBasicComponents-2",
    xmlns:sig="urn:oasis:names:specification:ubl:schema:xsd:CommonSignatureComponents-2")
  ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/sig:UBLDocumentSignatures/sac:SignatureInformation
    ID = urn:oasis:names:tc:ebcore:partyid-type:unregistered
    sbc:ReferencedSignatureID = urn:oasis:names:specification:ubl:signature:Invoice
  UBLVersionID = 2.1
  ID = INV-2026-0042
  IssueDate = 2026-01-15
  DocumentCurrencyCode = EUR
  AccountingSupplierParty/Party/PartyName/Name = Acme Components Ltd
  LegalMonetaryTotal/PayableAmount(currencyID="EUR") = 1240.00

CII / Factur-X — what --auto does (hide prefixes + fold wrapper chains)

factur-x-basic.xml · 101 → 83 lines

unxml --no-auto
rsm:CrossIndustryInvoice(
    xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100",
    xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100",
    xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100",
    xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100",
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance")
  // generated by: mustangproject.org vnull
  rsm:ExchangedDocumentContext
    ram:GuidelineSpecifiedDocumentContextParameter
      ram:ID = urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic
  rsm:ExchangedDocument
    ram:ID = 471102
    ram:TypeCode = 380
    ram:IssueDateTime
      udt:DateTimeString(format="102") = 20241115
    ram:IncludedNote
      ram:Content = Rechnung gemäß Bestellung vom 01.11.2024.
    ram:IncludedNote
      ram:Content =
        | Lieferant GmbH
        |                 Lieferantenstraße 20
        |                 80333 München
        |                 Deutschland
        |                 Geschäftsführer: Hans Muster
        |                 Handelsregisternummer: H A 123
    ram:IncludedNote
      ram:Content =
        | Unsere GLN: 4000001123452
        |                 Ihre GLN: 4000001987658
        |                 Ihre Kundennummer: GE2020211
        |
        |
        |                 Zahlbar innerhalb 30 Tagen netto bis 25.12.2024, 3% Skonto innerhalb 10 Tagen bis 25.11.2024.
  rsm:SupplyChainTradeTransaction
    ram:IncludedSupplyChainTradeLineItem
      ram:AssociatedDocumentLineDocument
        ram:LineID = 1
      ram:SpecifiedTradeProduct
        ram:GlobalID(schemeID="0160") = 4012345001235
        ram:Name =
          | GTIN: 4012345001235
          |                     Unsere Art.-Nr.: TB100A4
          |                     Trennblätter A4
      ram:SpecifiedLineTradeAgreement
        ram:NetPriceProductTradePrice
          ram:ChargeAmount = 9.9000
          ram:BasisQuantity(unitCode="H87") = 1.0000
      ram:SpecifiedLineTradeDelivery
        ram:BilledQuantity(unitCode="H87") = 20.0000
      ram:SpecifiedLineTradeSettlement
        ram:ApplicableTradeTax
          ram:TypeCode = VAT
          ram:CategoryCode = S
          ram:RateApplicablePercent = 19.00
        ram:SpecifiedTradeSettlementLineMonetarySummation
          ram:LineTotalAmount = 198.00
    ram:ApplicableHeaderTradeAgreement
      ram:SellerTradeParty
        ram:Name = Lieferant GmbH
        ram:PostalTradeAddress
          ram:PostcodeCode = 80333
          ram:LineOne = Lieferantenstraße 20
          ram:CityName = München
          ram:CountryID = DE
        ram:SpecifiedTaxRegistration
          ram:ID(schemeID="VA") = DE123456789
        ram:SpecifiedTaxRegistration
          ram:ID(schemeID="FC") = 201/113/40209
      ram:BuyerTradeParty
        ram:Name = Kunden AG Mitte
        ram:PostalTradeAddress
          ram:PostcodeCode = 69876
          ram:LineOne = Hans Muster
          ram:LineTwo = Kundenstraße 15
          ram:CityName = Frankfurt
          ram:CountryID = DE
    ram:ApplicableHeaderTradeDelivery
      ram:ActualDeliverySupplyChainEvent
        ram:OccurrenceDateTime
          udt:DateTimeString(format="102") = 20241114
    ram:ApplicableHeaderTradeSettlement
      ram:InvoiceCurrencyCode = EUR
      ram:ApplicableTradeTax
        ram:CalculatedAmount = 37.62
        ram:TypeCode = VAT
        ram:BasisAmount = 198.00
        ram:CategoryCode = S
        ram:RateApplicablePercent = 19.00
      ram:SpecifiedTradePaymentTerms
        ram:Description = Zahlbar innerhalb 30 Tagen netto bis 25.12.2024, 3% Skonto innerhalb 10 Tagen bis 25.11.2024.
        ram:DueDateDateTime
          udt:DateTimeString(format="102") = 20241215
      ram:SpecifiedTradeSettlementHeaderMonetarySummation
        ram:LineTotalAmount = 198.00
        ram:ChargeTotalAmount = 0.00
        ram:AllowanceTotalAmount = 0.00
        ram:TaxBasisTotalAmount = 198.00
        ram:TaxTotalAmount(currencyID="EUR") = 37.62
        ram:GrandTotalAmount = 235.62
        ram:TotalPrepaidAmount = 0.00
        ram:DuePayableAmount = 235.62
unxml --auto
CrossIndustryInvoice(
    xmlns="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100",
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance")
  // generated by: mustangproject.org vnull
  ExchangedDocumentContext/GuidelineSpecifiedDocumentContextParameter/ID = urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic
  ExchangedDocument
    ID = 471102
    TypeCode = 380
    IssueDateTime/DateTimeString(format="102") = 20241115
    IncludedNote/Content = Rechnung gemäß Bestellung vom 01.11.2024.
    IncludedNote/Content =
      | Lieferant GmbH
      |                 Lieferantenstraße 20
      |                 80333 München
      |                 Deutschland
      |                 Geschäftsführer: Hans Muster
      |                 Handelsregisternummer: H A 123
    IncludedNote/Content =
      | Unsere GLN: 4000001123452
      |                 Ihre GLN: 4000001987658
      |                 Ihre Kundennummer: GE2020211
      |
      |
      |                 Zahlbar innerhalb 30 Tagen netto bis 25.12.2024, 3% Skonto innerhalb 10 Tagen bis 25.11.2024.
  SupplyChainTradeTransaction
    IncludedSupplyChainTradeLineItem
      AssociatedDocumentLineDocument/LineID = 1
      SpecifiedTradeProduct
        GlobalID(schemeID="0160") = 4012345001235
        Name =
          | GTIN: 4012345001235
          |                     Unsere Art.-Nr.: TB100A4
          |                     Trennblätter A4
      SpecifiedLineTradeAgreement/NetPriceProductTradePrice
        ChargeAmount = 9.9000
        BasisQuantity(unitCode="H87") = 1.0000
      SpecifiedLineTradeDelivery/BilledQuantity(unitCode="H87") = 20.0000
      SpecifiedLineTradeSettlement
        ApplicableTradeTax
          TypeCode = VAT
          CategoryCode = S
          RateApplicablePercent = 19.00
        SpecifiedTradeSettlementLineMonetarySummation/LineTotalAmount = 198.00
    ApplicableHeaderTradeAgreement
      SellerTradeParty
        Name = Lieferant GmbH
        PostalTradeAddress
          PostcodeCode = 80333
          LineOne = Lieferantenstraße 20
          CityName = München
          CountryID = DE
        SpecifiedTaxRegistration/ID(schemeID="VA") = DE123456789
        SpecifiedTaxRegistration/ID(schemeID="FC") = 201/113/40209
      BuyerTradeParty
        Name = Kunden AG Mitte
        PostalTradeAddress
          PostcodeCode = 69876
          LineOne = Hans Muster
          LineTwo = Kundenstraße 15
          CityName = Frankfurt
          CountryID = DE
    ApplicableHeaderTradeDelivery/ActualDeliverySupplyChainEvent/OccurrenceDateTime/DateTimeString(
        format="102") = 20241114
    ApplicableHeaderTradeSettlement
      InvoiceCurrencyCode = EUR
      ApplicableTradeTax
        CalculatedAmount = 37.62
        TypeCode = VAT
        BasisAmount = 198.00
        CategoryCode = S
        RateApplicablePercent = 19.00
      SpecifiedTradePaymentTerms
        Description = Zahlbar innerhalb 30 Tagen netto bis 25.12.2024, 3% Skonto innerhalb 10 Tagen bis 25.11.2024.
        DueDateDateTime/DateTimeString(format="102") = 20241215
      SpecifiedTradeSettlementHeaderMonetarySummation
        LineTotalAmount = 198.00
        ChargeTotalAmount = 0.00
        AllowanceTotalAmount = 0.00
        TaxBasisTotalAmount = 198.00
        TaxTotalAmount(currencyID="EUR") = 37.62
        GrandTotalAmount = 235.62
        TotalPrepaidAmount = 0.00
        DuePayableAmount = 235.62

XSLT basics

Build an HTML table with for-each

cdcatalog.xsl · 22 → 15 lines

XSLT source
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
  <h2>My CD Collection</h2>
  <table border="1">
    <tr bgcolor="#9acd32">
      <th style="text-align:left">Title</th>
      <th style="text-align:left">Artist</th>
    </tr>
    <xsl:for-each select="catalog/cd">
    <tr>
      <td><xsl:value-of select="title"/></td>
      <td><xsl:value-of select="artist"/></td>
    </tr>
    </xsl:for-each>
  </table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
unxml --xslt
xsl:stylesheet(version="1.0", xmlns:xsl="http://www.w3.org/1999/XSL/Transform")
  match /:
    html
      body
        h2 = My CD Collection
        table(border="1")
          tr(bgcolor="#9acd32")
            th(style="text-align:left") = Title
            th(style="text-align:left") = Artist
          foreach catalog/cd:
            tr
              td
                <- title
              td
                <- artist

Branch with choose / when / otherwise

cdcatalog-choose.xsl · 32 → 20 lines

XSLT source
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
  <h2>My CD Collection</h2>
  <table border="1">
    <tr bgcolor="#9acd32">
      <th>Title</th>
      <th>Artist</th>
    </tr>
    <xsl:for-each select="catalog/cd">
    <tr>
      <td><xsl:value-of select="title"/></td>
      <xsl:choose>
      <xsl:when test="price &gt; 10">
         <td bgcolor="#ff00ff">
         <xsl:value-of select="artist"/>
         </td>
      </xsl:when>
      <xsl:otherwise>
         <td><xsl:value-of select="artist"/></td>
      </xsl:otherwise>
      </xsl:choose>
    </tr>
    </xsl:for-each>
  </table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
unxml --xslt
xsl:stylesheet(version="1.0", xmlns:xsl="http://www.w3.org/1999/XSL/Transform")
  match /:
    html
      body
        h2 = My CD Collection
        table(border="1")
          tr(bgcolor="#9acd32")
            th = Title
            th = Artist
          foreach catalog/cd:
            tr
              td
                <- title
              choose:
                when price > 10:
                  td(bgcolor="#ff00ff")
                    <- artist
                else:
                  td
                    <- artist

Named templates + apply-templates

cdcatalog-templates.xsl · 33 → 20 lines

XSLT source
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
  <html>
  <body>
  <h2>My CD Collection</h2>
  <xsl:apply-templates/>
  </body>
  </html>
</xsl:template>
<xsl:template match="cd">
  <p>
    <xsl:apply-templates select="title"/>
    <xsl:apply-templates select="artist"/>
  </p>
</xsl:template>
<xsl:template match="title">
  Title: <span style="color:#ff0000">
  <xsl:value-of select="."/></span>
  <br />
</xsl:template>
<xsl:template match="artist">
  Artist: <span style="color:#00ff00">
  <xsl:value-of select="."/></span>
  <br />
</xsl:template>
</xsl:stylesheet>
unxml --xslt
xsl:stylesheet(version="1.0", xmlns:xsl="http://www.w3.org/1999/XSL/Transform")
  match /:
    html
      body
        h2 = My CD Collection
        apply
  match cd:
    p
      apply title
      apply artist
  match title:
    "Title:"
    span(style="color:#ff0000")
      <- .
    br
  match artist:
    "Artist:"
    span(style="color:#00ff00")
      <- .
    br

Literal-result-element stylesheet

breakfast-menu.xsl · 17 → 15 lines

XSLT source
<?xml version="1.0" encoding="UTF-8"?>
<html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <body style="font-family:Arial;font-size:12pt;background-color:#EEEEEE">
    <xsl:for-each select="breakfast_menu/food">
      <div style="background-color:teal;color:white;padding:4px">
        <span style="font-weight:bold"><xsl:value-of select="name"/> - </span>
        <xsl:value-of select="price"/>
      </div>
      <div style="margin-left:20px;margin-bottom:1em;font-size:10pt">
        <p>
        <xsl:value-of select="description"/>
        <span style="font-style:italic"> (<xsl:value-of select="calories"/> calories per serving)</span>
        </p>
      </div>
    </xsl:for-each>
  </body>
</html>
unxml --xslt
html(xmlns:xsl="http://www.w3.org/1999/XSL/Transform", xsl:version="1.0")
  body(style="font-family:Arial;font-size:12pt;background-color:#EEEEEE")
    foreach breakfast_menu/food:
      div(style="background-color:teal;color:white;padding:4px")
        span(style="font-weight:bold")
          <- name
          "-"
        <- price
      div(style="margin-left:20px;margin-bottom:1em;font-size:10pt")
        p
          <- description
          span(style="font-style:italic")
            "("
            <- calories
            "calories per serving)"

JSON

Document Original Rendered Source
JSON — Service catalog 23 lines · 1.0 KB 25 lines · 631 B source
OpenAPI — Swagger Petstore 1,270 lines · 32.0 KB 644 lines · 18.0 KB source
JSON Schema — Draft 2020-12 meta-schema 58 lines · 2.4 KB 41 lines · 1.9 KB source
GeoJSON — RFC 7946 FeatureCollection 52 lines · 936 B 42 lines · 687 B source

XML documents

Document Original Rendered Source
UBL — Invoice (instance) 493 lines · 19.2 KB 292 lines · 11.5 KB source
UBL — Order (instance) 341 lines · 13.6 KB 212 lines · 7.1 KB source
UBL — Credit Note (instance) 431 lines · 17.0 KB 256 lines · 10.3 KB source
CII — Invoice (instance) 656 lines · 34.7 KB 336 lines · 14.1 KB source
Factur-X / ZUGFeRD — Extended (instance) 430 lines · 20.6 KB 299 lines · 13.9 KB source

Schemas

Document Original Rendered Source
Finvoice 3.0 1,690 lines · 95.1 KB 1,129 lines · 45.5 KB source
UBL — Core Component Types 731 lines · 44.2 KB 139 lines · 6.8 KB source
UBL — Unqualified Data Types 553 lines · 26.7 KB 129 lines · 6.3 KB source
UBL — Qualified Data Types 69 lines · 3.5 KB 59 lines · 3.2 KB source
UBL — Common Basic Components 5,388 lines · 214.7 KB 1,807 lines · 92.9 KB source
UBL — Common Aggregate Components 39,798 lines · 2.3 MB 5,456 lines · 291.3 KB source
UBL — Common Extension Components 222 lines · 9.3 KB 105 lines · 5.4 KB source
UBL — Invoice 1,001 lines · 58.8 KB 175 lines · 9.0 KB source

XSLT

Document Original Rendered Source
DocBook XSL — HTML driver 558 lines · 20.0 KB 364 lines · 12.7 KB source
DocBook XSL — inline elements 1,598 lines · 49.8 KB 973 lines · 26.6 KB source
DocBook xslTNG 3.0 — function library 863 lines · 30.6 KB 507 lines · 20.3 KB source
DocBook xslTNG 3.0 — variables & maps 428 lines · 20.5 KB 305 lines · 16.5 KB source
DocBook xslTNG 3.0 — localization (try/catch, iterate) 273 lines · 10.2 KB 151 lines · 6.1 KB source
DocBook xslTNG 3.0 — profiling transform 298 lines · 12.2 KB 185 lines · 8.5 KB source
ISO Schematron — SVRL skeleton 614 lines · 21.1 KB 384 lines · 15.1 KB source

Schematron

Document Original Rendered Source
EN16931 — UBL validation (driver) 34 lines · 1.8 KB 26 lines · 1.2 KB source
EN16931 — abstract model rules 341 lines · 51.3 KB 471 lines · 46.0 KB source
EN16931 — UBL bindings 277 lines · 71.1 KB 576 lines · 72.5 KB source

MSBuild

Document Original Rendered Source
MSBuild — C# language targets 397 lines · 21.9 KB 352 lines · 19.5 KB source
MSBuild — NuGet restore targets 1,600 lines · 73.2 KB 1,184 lines · 63.4 KB source
MSBuild — common build targets 7,129 lines · 379.4 KB 5,679 lines · 337.8 KB source