1.1 --- a/docs/advice.html Thu Nov 17 19:46:28 2005 +0000
1.2 +++ b/docs/advice.html Thu Nov 17 23:47:08 2005 +0000
1.3 @@ -58,7 +58,7 @@
1.4 the <code>author</code> element into the XML document when
1.5 creating the <code>package</code> element - this should then
1.6 "bootstrap" the process and ensure that the author details will remain
1.7 -editable as long as the <code>package</code> element exists.</p><h3>Ensuring Element Structure with Document Initialisation</h3><p>Although it is not necessary to use <a href="multiple.html">document initialisation</a> in resources, the above case would be detected by an input/initialiser stylesheet, and the <code>package</code> and <code>author</code> elements would be added if no way of adding them was mentioned in the template. Typically, we would employ <a href="selectors.html">selectors</a> to provide the ability to add elements in templates, and the above example could be extended as follows:</p><pre><p template:element="package"><br /> <p template:element="author"><br /> Name: <input template:attribute-field="name" name="..." type="text" value="..."/><br /> </p><br /> <p><br /> <input name="..." template:selector-field="add-author,author" type="submit" value="Add author" /><br /> </p><br /></p></pre><p>With the newly-added selector, we can see that <code>author</code> elements could at least be added by users of the application, but <code>package</code>
1.8 +editable as long as the <code>package</code> element exists.</p><h3>Ensuring Element Structure with Document Initialisation</h3><p>Although it is not necessary to use <a href="multiple.html#DocumentInitialisation">document initialisation</a> in resources, the above case would be detected by an input/initialiser stylesheet, and the <code>package</code> and <code>author</code> elements would be added if no way of adding them was mentioned in the template. Typically, we would employ <a href="selectors.html">selectors</a> to provide the ability to add elements in templates, and the above example could be extended as follows:</p><pre><p template:element="package"><br /> <p template:element="author"><br /> Name: <input template:attribute-field="name" name="..." type="text" value="..."/><br /> </p><br /> <p><br /> <input name="..." template:selector-field="add-author,author" type="submit" value="Add author" /><br /> </p><br /></p></pre><p>With the newly-added selector, we can see that <code>author</code> elements could at least be added by users of the application, but <code>package</code>
1.9 elements would still be impossible to create in the user interface. The
1.10 document initialisation mechanism distinguishes between these two cases
1.11 by looking for selectors which mention element names; here, the <code>template:selector-field</code> attribute has two parts to its value:</p><ol><li>A name used to identify the selector.</li><li>The name of an element: <code>author</code></li></ol><p>Since the <code>author</code>
2.1 --- a/docs/multiple.html Thu Nov 17 19:46:28 2005 +0000
2.2 +++ b/docs/multiple.html Thu Nov 17 23:47:08 2005 +0000
2.3 @@ -85,7 +85,7 @@
2.4 will
2.5 need to find a way of merging the range of allowed values into the
2.6 user-edited form data before presenting that data using our template.</p>
2.7 -<h2>Document Initialisation</h2>
2.8 +<h2><a name="DocumentInitialisation"></a>Document Initialisation</h2>
2.9 <p>There are many possible ways of inserting extra XML elements into an
2.10 existing XML document, but XSLForms provides an easy way of defining
2.11 lists of values that will be included in the way we desire. First, let