Rethinking transformation – the potential of code generation

Hans-Jürgen Rennau

parsQube GmbH

Hauke Brandes

parsQube GmbH

Abstract

A code generator for document to document transformation is introduced. It reduces the development effort to editing a set of metadata items attached to a tree model of the target documents. Metadata values are XQuery expressions which are typically so simple that they do not require genuine programming skills. Nevertheless, expressions are more difficult to provide than static values, and therefore possibilities of further simplifying the development task are explored, striving to enable subject matter experts to define the transformation without writing XQuery expressions. This can be achieved by generating the expressions from assertions about alignments between source and target nodes, although specific requirements will often necessitate additional information. As alignments can be represented graphically by connecting lines, the approach amounts to a solid conceptual foundation for graphical mapping tools. Finally, the underlying model of code generation driven by target document structure is generalized into a conceptual framework which is not restricted to XML data sources. Its usefulness is demonstrated by a simple code generator for transforming RDF data into XML documents.


Table of Contents

Introduction
Rethinking document-to-document transformation
Source navigation based model
Basic concepts
Primitive operations
Composing document-to-document transformation
Metadata model SNAT
Metadata item model
Advanced features
Value mappings
User-defined functions
User-defined variables
Code generator SNAT
Source alignment based model
What is an alignment?
Representation versus information
Annotated target tree (SAAT)
Mapping alignments to navigation
Inferring context propagation
Semantic versus structural relationships
Shortest-path-principle
Future work
Metadata model SAAT (Source Alignment Annotated Target tree)
Minimal SAAT
Alignment qualifiers
Code generator SAAT
AT Map Machine
Does SNAT presuppose XML?
Does SAAT presuppose XML?
Scheme for building SNAT-based code generators
Metadata item model
Metadata value model
Code assembly model
Using SNAT as a meta model
Proof of concept: RDF-to-XML, SNAT-based
Metadata item model
Metadata value model
Code assembly model
Example SNAT and source code
Bibliography