A methodology to build XSLT transforms

Introduction

Extraction

First identify the top-level elements we are interested in. For instance if we have an XML database of clients and orders, we would like to select the delivered orders whose bills have not been payed in time, and the clients involved. This can be done conveniently using the generic recursive template contained in ???. This template will be called inside a top-level variable; here is a partial stylesheet covering the extraction step.

Restructure

This is a non-mandatory step. Suppose that we have a tree data structure defined in a two colunm table with parent and child id's. We might want to restructure this in a more typical XML style with sub-trees embedded in nodes. Again, the restructuring template(s) will be called inside a top-level variable, and they will consume variables produced in the first step. Some of the templates in the XSLT transforms library (those marked domain="structure") can be reused here.

Assembly

This final does the final element and attribute renaming, using variables created in the first and (if present) second steps. This is where we will use the vocabulary of the target XML language, typically XHTML, or SVG or another presentation language, or a business vocabulary for data interchange.