Creating Applications: Design the Structure of the Form Data

Before designing a template, we must first consider how the form data to be modelled in our application will be structured. Let us consider the following hierarchical structure:

Since XSLForms is an XML-based framework, let us define this structure using an informal example XML document:

<?xml version="1.0"?>
<structure>
<item value="some value">
<subitem subvalue="some other value"/>
</item>
</structure>

The above example only shows a single item and a single subitem within it. Our application will provide the ability to add and remove items and subitems, although this is not directly modelled in the XML documents that will be used to represent the form data.

With this basic information defined, we can now proceed to designing a template in the next stage of the process.