Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

CC By 4.0 This document is published under a CC Attribution 4.0 International license

XForms Generation

Eric van der Vlist (

November 2015

XML Amsterdam 2015
This presentation online

Why would you want to generate XForms?

Isn't XForms the coolest programming language ever?

Hmmm, actually...

XForms is not perfect (yet)

When MVC becomes a burden for XForms

Lack of modularity may be a good reason to generate XForms

See also:

But that's not (always) the point

Why do we translate Schematron into XSLT?

Why do we translate XForms into HTML + JavaScript?

CoffeeScript into JavaScript?

C into assembly languages?

Assembly languages into bits?

And why do we translate Java into JavaScript?

Python into Java?

And why do we translate English into Chinese?

Serbo-Croatian into Dutch?

In some cases it's a matter of level

Always a matter of context

In Amsterdam Dutch is a better choice than Serbo-Croatian

And at XML Amsterdam, English is a safer bet than Dutch

Something big

Code generation (or translation) is part of something bigger called metaprogramming


Metaprogramming is the writing of computer programs with the ability to treat programs as their data.



The language in which the metaprogram is written is called the metalanguage. The language of the programs that are manipulated is called the object language.





    <case id="test-greetings">
        <title>Test that greetings are correctly set</title>
        <controller.setvalue ref="instance('instance')/PersonGivenName">Eric</controller.setvalue>
            <actual ref="instance('instance')/Greetings"/>
            <expected>Hello Eric. We hope you like XForms!</expected>
            <message>The greetings should be the concatenation of "Hello ", the given name and ". We hope you like

Focus on conciseness


WSDL2XForms generates XForms for the operations of a given WSDL file.../... All (useful) XML Schema elements are supported.



WSDL / XML Schema.


How do you deal with elements presented in different forms?

JSON to XForms

Private development for a customer


JSON description of QOS surveys (converted using this XSLT parsing library)

Object language

Orbeon Form Runner


Huge surveys with hundreds of controls

Reversible transformation


French National Statistical Institute (NSI) surveys





See also

Our presentation at Balisage 2013

Demo time

Use a spacebar or arrow keys to navigate