1.1 --- a/docs/advice.html Thu Nov 10 19:49:35 2005 +0000
1.2 +++ b/docs/advice.html Fri Nov 11 17:14:22 2005 +0000
1.3 @@ -13,7 +13,7 @@
1.4 <h2>Beware of Nesting Elements in Multiple-Choice Elements</h2>
1.5 <p>It is not necessarily a good idea to nest elements inside
1.6 multiple-choice elements like this:</p>
1.7 -<pre><multi><br /> <multi-enum value="1"/><br /> <multi-enum value="1"/><br /> <multi-enum value="1"/><br /> <nested value="x"/><br /></multi></pre>
1.8 +<pre><multi><br /> <multi-enum value="1"/><br /> <multi-enum value="2"/><br /> <multi-enum value="3"/><br /> <nested value="x"/><br /></multi></pre>
1.9 <p>The reason for this is that the number of multiple-choice values may
1.10 vary within your application, and the nested elements will appear
1.11 at a different position depending on how many such values have been
1.12 @@ -21,8 +21,8 @@
1.13 to begin with, the usage of more advanced features (<a href="in-page-updates.html">in-page updates</a>, for example) will
1.14 probably expose
1.15 problems due to the way XSLForms reconstructs the XML document data
1.16 -from the input form data.</p>
1.17 -<h2>Beware of Adding Elements into Mixtures of Elements</h2>
1.18 +from the input form data.</p><p>We can avoid the above mistake by specifying the first parameter in the <code>template:multiple-choice-field</code> and <code>template:multiple-choice-list-field</code> annotations. For example:</p><pre><select name="..." template:multiple-choice-field="multi,multi-enum,value"><br /> <option value="..." template:multiple-choice-value="multi-enum,value,selected"></option><br /></select></pre>
1.19 +<p>This effectively prevents us from inserting the <code>nested</code> element inside the <code>multi</code> element.<br /></p><h2>Beware of Adding Elements into Mixtures of Elements</h2>
1.20 <p>Although we ignore this rule with the example in this documentation,
1.21 it is necessary to be aware of problems with adding and removing
1.22 elements where other elements may reside. Consider part of our form
2.1 --- a/docs/directory.html Thu Nov 10 19:49:35 2005 +0000
2.2 +++ b/docs/directory.html Fri Nov 11 17:14:22 2005 +0000
2.3 @@ -1,20 +1,16 @@
2.4 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2.5 -<html xmlns="http://www.w3.org/1999/xhtml">
2.6 -<head>
2.7 +<html xmlns="http://www.w3.org/1999/xhtml"><head>
2.8 <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type" />
2.9 - <title>Creating Applications: Create a Directory</title>
2.10 - <meta name="generator"
2.11 - content="amaya 8.1a, see http://www.w3.org/Amaya/" />
2.12 - <link href="styles.css" rel="stylesheet" type="text/css" />
2.13 -</head>
2.14 +
2.15 + <title>Creating Applications: Create a Directory</title><meta name="generator" content="amaya 8.1a, see http://www.w3.org/Amaya/" />
2.16 + <link href="styles.css" rel="stylesheet" type="text/css" /></head>
2.17 <body>
2.18 <h1>Creating Applications: Create
2.19 a Directory</h1>
2.20 <p>The recommended directory
2.21 structure of an XSLForms application is as
2.22 follows:</p>
2.23 -<table style="text-align: left; width: 80%;" align="center" border="0"
2.24 - cellpadding="5" cellspacing="0" width="60%">
2.25 +<table style="text-align: left; width: 80%;" align="center" border="0" cellpadding="5" cellspacing="0" width="60%">
2.26 <tbody>
2.27 <tr>
2.28 <td width="60%"></td>
2.29 @@ -26,10 +22,7 @@
2.30 <tr>
2.31 <th style="text-align: right;">A
2.32 top-level directory corresponding to a Python package</th>
2.33 - <td
2.34 - style="background-color: rgb(204, 204, 255); border-top-style: solid; border-left-style: solid; border-right-style: solid; border-right-width: 1px; border-left-width: 1px; border-top-width: 1px;"
2.35 - align="undefined" valign="undefined"><code><span
2.36 - style="font-weight: bold;">VerySimple</span><br />
2.37 + <td style="background-color: rgb(204, 204, 255); border-top-style: solid; border-left-style: solid; border-right-style: solid; border-right-width: 1px; border-left-width: 1px; border-top-width: 1px;" align="undefined" valign="undefined"><code><span style="font-weight: bold;">VerySimple</span><br />
2.38 __init__.py</code></td>
2.39 <td></td>
2.40 </tr>
2.41 @@ -37,11 +30,9 @@
2.42 <th style="text-align: right;">A subdirectory
2.43 containing non-code resources for the
2.44 application</th>
2.45 - <td
2.46 - style="background-color: rgb(204, 204, 255); border-left-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-width: 1px; border-right-width: 1px; border-bottom-width: 1px;"><br />
2.47 + <td style="background-color: rgb(204, 204, 255); border-left-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-width: 1px; border-right-width: 1px; border-bottom-width: 1px;"><br />
2.48 </td>
2.49 - <td><span class="subdirectory"><code><span
2.50 - style="font-weight: bold;">Resources</span><br />
2.51 + <td><span class="subdirectory"><code><span style="font-weight: bold;">Resources</span><br />
2.52 ...</code></span></td>
2.53 </tr>
2.54 </tbody>
2.55 @@ -52,9 +43,5 @@
2.56 <pre>mkdir VerySimple<br />mkdir VerySimple/Resources<br />touch VerySimple/__init__.py</pre>
2.57 <p>It is in the <code>Resources</code>
2.58 subdirectory that we will save
2.59 -our template files when <a href="design.html">designing</a>
2.60 -them as
2.61 -part of the next activity in the application development <a
2.62 - href="overview.html">process</a>.</p>
2.63 -</body>
2.64 -</html>
2.65 +our template files. First, however, we must undertake some <a href="data.html">data definition</a> as the next activity in the application development <a href="overview.html">process</a>.</p>
2.66 +</body></html>
2.67 \ No newline at end of file
3.1 --- a/docs/template-design.html Thu Nov 10 19:49:35 2005 +0000
3.2 +++ b/docs/template-design.html Fri Nov 11 17:14:22 2005 +0000
3.3 @@ -95,14 +95,14 @@
3.4 and whilst such attributes typically reside in the form data document
3.5 carrying a single, currently set value, the representation of the
3.6 document processed by the template must somehow incorporate the list of
3.7 -acceptable values; this was covered in the <a href="multiple.html">"Creating Applications: Adding Multiple-Choice Fields and Values"</a> document, and involved adding new elements, each carrying a single acceptable value for the attribute concerned.</p><h4>Single Selection Menus</h4><ul><li>See <a href="reference.html#multiple-choice-field">"template:multiple-choice-field"</a> and <a href="reference.html#multiple-choice-value">"template:multiple-choice-value"</a> in the <a href="reference.html">"Template Attribute Reference"</a> document.</li></ul><p>In
3.8 +acceptable values; this was covered in the <a href="multiple.html">"Creating Applications: Adding Multiple-Choice Fields and Values"</a> document, and involved adding new elements, each carrying a single acceptable value for the attribute concerned.</p><h4>Single Selection Menus</h4><ul><li>See <a href="reference.html#multiple-choice-field">"template:multiple-choice-field"</a> and <a href="reference.html#multiple-choice-value">"template:multiple-choice-value"</a> in the <a href="reference.html">"Template Attribute Reference"</a> document.</li><li>Described in the <a href="multiple.html">"Creating Applications: Adding Multiple-Choice Fields and Values"</a> document.</li></ul><p>In
3.9 certain situations, it makes more sense to present acceptable values
3.10 for an attribute in a menu-like representation in the final output
3.11 presented to the user. With the element on which the attribute resides
3.12 now containing a list of sub-elements with each carrying an acceptable
3.13 value in an attribute, a form control can be defined as follows:</p><pre><select template:multiple-choice-field="-,attribute" name="..."><br /> <option template:multiple-choice-value="element-enum,value,selected" value="..."></option><br /></select></pre><p>This would produce the following HTML form control:</p><p><select name="..."><option>First</option><option>Second</option><option>Third</option></select></p><p>Note that the element on which the attribute is defined is not declared
3.14 in the above example, although we could modify the <code>template:multiple-choice-field</code> annotation on
3.15 -the <code>select</code> element (as described in the <a href="reference.html">"Template Attribute Reference"</a> document) and replace the <code>-</code> with a name such as <code>element</code>.</p><h4>Multiple Selection Lists</h4><ul><li>See <a href="reference.html#multiple-choice-list-field">"template:multiple-choice-list-field"</a> and <a href="reference.html#multiple-choice-list-value">"template:multiple-choice-list-value"</a> in the <a href="reference.html">"Template Attribute Reference"</a> document.</li></ul><p>In
3.16 +the <code>select</code> element (as described in the <a href="reference.html">"Template Attribute Reference"</a> document) and replace the <code>-</code> with a name such as <code>element</code>.</p><h4>Multiple Selection Lists</h4><ul><li>See <a href="reference.html#multiple-choice-list-field">"template:multiple-choice-list-field"</a> and <a href="reference.html#multiple-choice-list-value">"template:multiple-choice-list-value"</a> in the <a href="reference.html">"Template Attribute Reference"</a> document.</li><li>Described in the <a href="multivalue.html">"Creating Applications: Adding Multivalued Fields"</a> document.</li></ul><p>In
3.17 other situations, where many values can be chosen, a single attribute
3.18 on a single element is not sufficient to hold all such values.
3.19 Consequently, a collection of elements is employed, each with an