Home - xokomola/origami GitHub Wiki

Origami is a micro-templating library for XQuery 3.1.

Work in progress: this wiki is being updated for version 0.6

Templating is a staple of web application development or web APIs. XML already has great technologies for this: XSLT, XQuery and XPath. When working with XQuery you might miss XSLT-style transformations. But it's easy enough to invoke XSLT transformations from an XQuery application. XPath 3.1 now also includes a standard XSLT transform function.

But XSLT may also seem a bit heavy-handed for simple micro-templating use cases. When mixing XQuery and XSLT you will have to mentally switch between their different processing models. It's these micro-templating use cases that Origami targets and that are often found along the boundaries of your application.

Origami provides tools for implementing different templating styles and in this this document I will show three different styles of templating and how they could be implemented using Origami.

But first I have to introduce the concept of mu-nodes. XML as a simple, generic data structure. A kind of micro-XML.