XSLTools

Annotated docs/data.html

178:7e7d9dbcec62
2005-07-22 paulb [project @ 2005-07-22 18:26:38 by paulb] Tidied up the function names and added some API documentation. Added child-element and child-attribute functions for coherent references to potentially non-existent nodes in the form data.
paulb@129 1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
paulb@129 2
<html xmlns="http://www.w3.org/1999/xhtml">
paulb@129 3
<head>
paulb@129 4
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type" />
paulb@129 5
  <title>Creating Applications: Design the Structure of the Form Data</title>
paulb@129 6
  <meta name="generator" content="amaya 8.1a, see http://www.w3.org/Amaya/" />
paulb@129 7
  <link href="styles.css" rel="stylesheet" type="text/css" />
paulb@129 8
</head>
paulb@129 9
<body>
paulb@129 10
paulb@129 11
<h1>Creating Applications: Design the Structure of the Form Data</h1>
paulb@129 12
paulb@129 13
<p>Before designing a template, we must first consider how the form
paulb@129 14
data to be modelled in our application will be structured. Let us
paulb@129 15
consider the following hierarchical structure:</p>
paulb@129 16
paulb@129 17
<ul>
paulb@129 18
  <li>A list of&nbsp;items, each containing...<br />
paulb@129 19
    <ul>
paulb@129 20
      <li>An editable value.</li>
paulb@129 21
      <li>A list of subitems, each containing...<br />
paulb@129 22
        <ul>
paulb@129 23
          <li>An editable value.</li>
paulb@129 24
        </ul>
paulb@129 25
      </li>
paulb@129 26
    </ul>
paulb@129 27
  </li>
paulb@129 28
</ul>
paulb@129 29
paulb@129 30
<p>Since XSLForms is an XML-based framework, let us define this structure using an informal example XML document:</p>
paulb@129 31
<pre>&lt;?xml version="1.0"?&gt;<br />&lt;structure&gt;<br />  &lt;item value="some value"&gt;<br />    &lt;subitem subvalue="some other value"/&gt;<br />  &lt;/item&gt;<br />&lt;/structure&gt;</pre>
paulb@129 32
<p>The above example only shows a single item and a single subitem
paulb@129 33
within it. Our application will provide the ability to add and remove
paulb@129 34
items and subitems, although this is not directly modelled in the XML
paulb@129 35
documents that will be used to represent the form data.</p>
paulb@129 36
<p>With this basic information defined, we can now proceed to <a href="design.html">designing a template</a> in the next stage of the <a href="overview.html">process</a>.</p>
paulb@129 37
paulb@129 38
</body>
paulb@129 39
</html>