1. Rethinking transformation – the potential of code generation
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.
2. Combining graph and tree: writing SHAX, obtaining SHACL, XSD and more
The Shapes Constraint Language (SHACL) is a data modeling language for describing and validating RDF data.This paper introduces SHAX, which is an XML syntax for SHACL. SHAX documents are easy to write andunderstand. They cannot only be translated into executable SHACL, but also into XSD describing XML dataequivalent to the RDF data constrained by the SHACL model. Similarly, SHAX can be translated into JSONSchema describing a JSON representation of the data. SHAX may thus be viewed as an abstract data modelinglanguage, which does not prescribe a concrete representation language (RDF, XML, JSON, …), but can betranslated into concrete models validating concrete model instances.