1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/docs/JavaScript-reference.html Tue Nov 08 19:04:00 2005 +0000
1.3 @@ -0,0 +1,8 @@
1.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1.5 +<html xmlns="http://www.w3.org/1999/xhtml"><head>
1.6 + <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type" />
1.7 +
1.8 + <title>JavaScript Function Reference</title><meta name="generator" content="amaya 8.1a, see http://www.w3.org/Amaya/" />
1.9 + <link href="styles.css" rel="stylesheet" type="text/css" /></head>
1.10 +<body>
1.11 +<h1>JavaScript Function References</h1><p>The following JavaScript functions are available for the triggering of in-page updates:</p><h2>requestUpdateArea</h2><p>Parameters:</p><dl><dt><code>url</code></dt><dd>The URL (which may be relative to the current page or resource) to which the update shall be sent. For example:<br /><pre>'platforms'</pre>The above example causes an update to be sent to the location <code>platforms</code> relative to the current page.</dd><dt><code>sourceAreasStr</code></dt><dd>A comma-separated list of regions in the form data which affect the outcome of the update. For example:<br /><pre>'/package$1/platforms$1'</pre>Typically, one would use an <a href="../apidocs/public/XSLForms.Output-module.html">XSLT/template function</a> to provide such information. For example:<br /><pre>'{template:other-elements(..)}'</pre>Selector fields may be specified in addition to regions:<br /><pre>'{template:selector-name('remove_platform', .)}'</pre>The above example causes the <code>remove_platform</code> selector field to be included in the update.</dd><dt><code>targetName</code></dt><dd>The element identifier (specified by an HTML or XML <code>id</code> attribute) within which the outcome of the update shall appear.</dd><dt><code>targetAreasStr</code></dt><dd>A comma-separated list of regions in the form data which are affected by the update. See the <code>sourceAreasStr</code> parameter for more details.</dd><dt><code>elementPath</code></dt><dd>A simple path into the form data, defining the scope of the update.</dd></dl><h2>requestUpdate</h2><p>Parameters:</p><dl><dt><code>url</code></dt><dd>The URL (which may be relative to the current page or resource) to which the update shall be sent. See the description of the <code>url</code> parameter for the <code>requestUpdateArea</code> function for more details.</dd><dt><code>fieldNamesStr</code></dt><dd>A comma-separated list of fields in the form data which affect the outcome of the update. For example:<br /><pre>'/package$1/name'</pre>Typically, one would use an <a href="../apidocs/public/XSLForms.Output-module.html">XSLT/template function</a> to provide such information. For example:<br /><pre>'{template:other-attributes('name', .)}'</pre>The above example causes the field associated with the <code>name</code> attribute on the current element to be included in the update.</dd><dt><code>targetName</code></dt><dd>The element identifier (specified by an HTML or XML <code>id</code> attribute) within which the outcome of the update shall appear.</dd><dt><code>targetFieldNamesStr</code></dt><dd>A comma-separated list of fields in the form data which are affected by the update. See the <code>fieldNamesStr</code> parameter for more details.</dd><dt><code>elementPath</code></dt><dd>A simple path into the form data, defining the scope of the update.</dd></dl></body></html>
1.12 \ No newline at end of file
2.1 --- a/docs/design.html Tue Nov 08 19:02:02 2005 +0000
2.2 +++ b/docs/design.html Tue Nov 08 19:04:00 2005 +0000
2.3 @@ -1,12 +1,9 @@
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: Design a Template</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: Design a Template</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: Design
2.19 a Template</h1>
2.20 @@ -24,7 +21,7 @@
2.21 <h2>The Template Outline</h2>
2.22 <p>In raw HTML - that is, the code which defines how a Web page is made
2.23 - we may wish to design the skeleton (or outline) of the page:</p>
2.24 -<pre><?xml version="1.0"?><br /><html xmlns="http://www.w3.org/1999/xhtml"><br /><head><br /> <title>Example</title><br /></head><br /><body><br /><form action="" method="POST"><br /><br /><!-- Template text between the start and the interesting part. --><br /><br /><!-- The interesting part which we will design below. --><br /><br /><!-- Template text between the interesting part and the end. --><br /><br /></form><br /></body><br /></html></pre>
2.25 +<pre><?xml version="1.0"?><br /><html xmlns="http://www.w3.org/1999/xhtml"><br /><head><br /> <title>Example</title><br /></head><br /><body><br /><form action="" method="post"><br /><br /><!-- Template text between the start and the interesting part. --><br /><br /><!-- The interesting part which we will design below. --><br /><br /><!-- Template text between the interesting part and the end. --><br /><br /></form><br /></body><br /></html></pre>
2.26 <p>Most visual editors for Web pages will add such details
2.27 automatically when creating a new page, but there are a few things to
2.28 remember to check:</p>
2.29 @@ -33,8 +30,7 @@
2.30 choose to create XHTML pages. We casually refer to our XHTML templates
2.31 as being "HTML" throughout this documentation, and the well-formed
2.32 stipulation is just assumed, but it should be noted that old-style
2.33 -ill-formed HTML, where start and end tags need not match, will <span
2.34 - style="font-style: italic;">not</span> work with XSL transformations
2.35 +ill-formed HTML, where start and end tags need not match, will <span style="font-style: italic;">not</span> work with XSL transformations
2.36 and will therefore <span style="font-style: italic;">not</span> work
2.37 with XSLForms.</li>
2.38 <li>We add a <code>form</code> element to the outline so that
2.39 @@ -46,11 +42,10 @@
2.40 label and a text field. Alongside these things, we may also wish to
2.41 have a button which can be pressed to remove that item from its list.
2.42 The visual representation of this might resemble the following:</p>
2.43 -<form method="post" action="" name="structure">
2.44 +
2.45 <p>Some
2.46 -item: <input name="value" value="some value" /><input name="remove"
2.47 - value="Remove" type="submit" /> </p>
2.48 -</form>
2.49 +item: <input name="value" value="some value" /><input name="remove" value="Remove" type="submit" /> </p>
2.50 +
2.51 <p>The HTML code which produces this representation might look like
2.52 this:</p>
2.53 <pre><div><br /> <p><br /> Some item: <input name="value" type="text" value="some value" /><br /> <input name="remove" type="submit" value="Remove" /><br /> </p><br /></div></pre>
2.54 @@ -67,13 +62,11 @@
2.55 the above design for the items by adding some additional text and a
2.56 similar label, field and button arrangement for each of the subitems.
2.57 For example:</p>
2.58 -<form method="post" action="" name="hierarchical">
2.59 - <p>Some item: <input name="value" value="some value" /><input
2.60 - name="remove" value="Remove" type="submit" /></p>
2.61 +
2.62 + <p>Some item: <input name="value" value="some value" /><input name="remove" value="Remove" type="submit" /></p>
2.63 <p>Itself containing more items:</p>
2.64 - <p>Sub-item: <input name="subvalue" value="some other value" /><input
2.65 - name="remove2" value="Remove" type="submit" /></p>
2.66 -</form>
2.67 + <p>Sub-item: <input name="subvalue" value="some other value" /><input name="remove2" value="Remove" type="submit" /></p>
2.68 +
2.69 <p>This representation might be expressed in HTML as follows:</p>
2.70 <pre><div><br /> <p><br /> Some item: <input name="value" type="text" value="some value" /><br /> <input name="remove" type="submit" value="Remove" /><br /> </p><br /> <p><br /> Itself containing more items:<br /> </p><br /> <p><br /> Sub-item: <input name="subvalue" type="text" value="some other value" /><br /> <input name="remove2" type="submit" value="Remove" /><br /> </p><br /></div><br /></pre>
2.71 <p>In the above example, the <code>div</code> element encloses the
2.72 @@ -90,15 +83,13 @@
2.73 We can thus extend our visual representation to incorporate such
2.74 details. For example:
2.75 </p>
2.76 -<form method="post" action="" name="hierarchical">
2.77 - <p>Some item: <input name="value" value="some value" /><input
2.78 - name="remove" value="Remove" type="submit" /></p>
2.79 +
2.80 + <p>Some item: <input name="value" value="some value" /><input name="remove" value="Remove" type="submit" /></p>
2.81 <p>Itself containing more items:</p>
2.82 - <p>Sub-item: <input name="subvalue" value="some other value" /><input
2.83 - name="remove2" value="Remove" type="submit" /></p>
2.84 + <p>Sub-item: <input name="subvalue" value="some other value" /><input name="remove2" value="Remove" type="submit" /></p>
2.85 <p><input name="add2" value="Add subitem" type="submit" /></p>
2.86 <p><input name="add" value="Add item" type="submit" /></p>
2.87 -</form>
2.88 +
2.89 <p>This representation might be expressed in HTML as follows:</p>
2.90 <pre><div><br /> <p><br /> Some item: <input name="value" type="text" value="some value" /><br /> <input name="remove" type="submit" value="Remove" /><br /> </p><br /> <p><br /> Itself containing more items:<br /> </p><br /> <p><br /> Sub-item: <input name="subvalue" type="text" value="some other value" /><br /> <input name="remove2" type="submit" value="Remove" /><br /> </p><br /> <p><br /> <input name="add2" type="submit" value="Add subitem" /><br /> </p><br /></div><br /><p><br /> <input name="add" type="submit" value="Add item" /><br /></p><br /></pre>
2.91 <p>In the above example, the new buttons have been added alongside the
2.92 @@ -112,12 +103,10 @@
2.93 <h2>Saving the Template</h2>
2.94 <p>Adding the above modifications to the outline, we end up with the
2.95 following HTML code:</p>
2.96 -<pre><?xml version="1.0"?><br /><html xmlns="http://www.w3.org/1999/xhtml"><br /><head><br /> <title>Example</title><br /></head><br /><body><br /><form action="" method="POST"><br /><br /><!-- Template text between the start and the interesting part. --><br /><br /><div><br /> <p><br /> Some item: <input name="value" type="text" value="some value" /><br /> <input name="remove" type="submit" value="Remove" /><br /> </p><br /> <p><br /> Itself containing more items:<br /> </p><br /> <p><br /> Sub-item: <input name="subvalue" type="text" value="some other value" /><br /> <input name="remove2" type="submit" value="Remove" /><br /> </p><br /> <p><br /> <input name="add2" type="submit" value="Add subitem" /><br /> </p><br /></div><br /><p><br /> <input name="add" type="submit" value="Add item" /><br /></p><br /><br /><!-- Template text between the interesting part and the end. --><br /><br /></form><br /></body><br /></html></pre>
2.97 +<pre><?xml version="1.0"?><br /><html xmlns="http://www.w3.org/1999/xhtml"><br /><head><br /> <title>Example</title><br /></head><br /><body><br /><form action="" method="post"><br /><br /><!-- Template text between the start and the interesting part. --><br /><br /><div><br /> <p><br /> Some item: <input name="value" type="text" value="some value" /><br /> <input name="remove" type="submit" value="Remove" /><br /> </p><br /> <p><br /> Itself containing more items:<br /> </p><br /> <p><br /> Sub-item: <input name="subvalue" type="text" value="some other value" /><br /> <input name="remove2" type="submit" value="Remove" /><br /> </p><br /> <p><br /> <input name="add2" type="submit" value="Add subitem" /><br /> </p><br /></div><br /><p><br /> <input name="add" type="submit" value="Add item" /><br /></p><br /><br /><!-- Template text between the interesting part and the end. --><br /><br /></form><br /></body><br /></html></pre>
2.98 <p>Once you are happy with the
2.99 design of the page, save it to the <a href="directory.html">directory</a>
2.100 created earlier (perhaps choosing the name <code>structure_template.xhtml</code>),
2.101 then proceed to <a href="structure.html">adding
2.102 -structure information</a> in the next stage of the <a
2.103 - href="overview.html">process</a>.</p>
2.104 -</body>
2.105 -</html>
2.106 +structure information</a> in the next stage of the <a href="overview.html">process</a>.</p>
2.107 +</body></html>
2.108 \ No newline at end of file
3.1 --- a/docs/multiple.html Tue Nov 08 19:02:02 2005 +0000
3.2 +++ b/docs/multiple.html Tue Nov 08 19:04:00 2005 +0000
3.3 @@ -30,7 +30,7 @@
3.4 <p>Taking the example HTML code from before, we can add a
3.5 definition of this new list to the template to produce something
3.6 like this:</p>
3.7 -<pre><html xmlns="http://www.w3.org/1999/xhtml"<br /> xmlns:template="http://www.boddie.org.uk/ns/xmltools/template"><br /><head><br /> <title>Example</title><br /></head><br /><body template:element="structure"><br /><form action="" method="POST"><br /><br /><!-- Template text between the start and the interesting part. --><br /><br /><div template:element="item"><br /> <p><br /> Some item: <input template:attribute-field="value" name="..." type="text" value="..." /><br /> <input name="..." template:selector-field="remove" type="submit" value="Remove" /><br /> </p><br /> <span style="font-weight: bold;"><p></span><br style="font-weight: bold;" /><span style="font-weight: bold;"> Item type:</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> <select template:multiple-choice-field="type,value" name="..."></span><br style="font-weight: bold;" /><span style="font-weight: bold;"> <option template:multiple-choice-value="type-enum,value,selected" value="..." /></span><br style="font-weight: bold;" /><span style="font-weight: bold;"> </select></span><br style="font-weight: bold;" /><span style="font-weight: bold;"> </p></span><br /> <p><br /> Itself containing more items:<br /> </p><br /> <p template:element="subitem"><br /> Sub-item: <input template:attribute-field="subvalue" name="..." type="text" value="..." /><br /> <input name="..." template:selector-field="remove2" type="submit" value="Remove" /><br /> </p><br /> <p><br /> <input name="..." template:selector-field="add2,subitem" type="submit" value="Add subitem" /><br /> </p><br /></div><br /><p><br /> <input name="..." template:selector-field="add,item" type="submit" value="Add item" /><br /></p><span style="font-weight: bold;"><br /><br /></span><!-- Template text between the interesting part and the end. --><br /><br /></form><br /></body><br /></html></pre>
3.8 +<pre><html xmlns="http://www.w3.org/1999/xhtml"<br /> xmlns:template="http://www.boddie.org.uk/ns/xmltools/template"><br /><head><br /> <title>Example</title><br /></head><br /><body template:element="structure"><br /><form action="" method="post"><br /><br /><!-- Template text between the start and the interesting part. --><br /><br /><div template:element="item"><br /> <p><br /> Some item: <input template:attribute-field="value" name="..." type="text" value="..." /><br /> <input name="..." template:selector-field="remove" type="submit" value="Remove" /><br /> </p><br /> <span style="font-weight: bold;"><p></span><br style="font-weight: bold;" /><span style="font-weight: bold;"> Item type:</span><br style="font-weight: bold;" /><span style="font-weight: bold;"> <select template:multiple-choice-field="type,value" name="..."></span><br style="font-weight: bold;" /><span style="font-weight: bold;"> <option template:multiple-choice-value="type-enum,value,selected" value="..." /></span><br style="font-weight: bold;" /><span style="font-weight: bold;"> </select></span><br style="font-weight: bold;" /><span style="font-weight: bold;"> </p></span><br /> <p><br /> Itself containing more items:<br /> </p><br /> <p template:element="subitem"><br /> Sub-item: <input template:attribute-field="subvalue" name="..." type="text" value="..." /><br /> <input name="..." template:selector-field="remove2" type="submit" value="Remove" /><br /> </p><br /> <p><br /> <input name="..." template:selector-field="add2,subitem" type="submit" value="Add subitem" /><br /> </p><br /></div><br /><p><br /> <input name="..." template:selector-field="add,item" type="submit" value="Add item" /><br /></p><span style="font-weight: bold;"><br /><br /></span><!-- Template text between the interesting part and the end. --><br /><br /></form><br /></body><br /></html></pre>
3.9 <p>There are a lot of details here that need to be explained. Here is
3.10 what was done:</p>
3.11 <ol>
4.1 --- a/docs/multivalue.html Tue Nov 08 19:02:02 2005 +0000
4.2 +++ b/docs/multivalue.html Tue Nov 08 19:04:00 2005 +0000
4.3 @@ -4,7 +4,6 @@
4.4
4.5 <title>Creating Applications: Adding Multivalued Fields</title><meta name="generator" content="amaya 8.1a, see http://www.w3.org/Amaya/" />
4.6 <link href="styles.css" rel="stylesheet" type="text/css" /></head>
4.7 -
4.8 <body>
4.9 <h1>Creating Applications: Adding Multivalued Fields</h1>
4.10 <p>Although some applications only require multiple-choice fields where
4.11 @@ -23,19 +22,19 @@
4.12 <p>We shall now take advantage of those HTML form fields which permit
4.13 users to select one
4.14 or many values presented in a list or menu.</p>
4.15 -<form method="post" action="" name="single">
4.16 +
4.17 <p>Some item: <input name="value" value="some value" /><input name="remove" value="Remove" type="submit" /></p>
4.18 <p>Item type:
4.19 <select multiple="multiple" name="type"><option>(Not selected)</option><option>Important</option><option>Not important</option><option>Personal</option></select>
4.20 </p>
4.21 <p>Itself containing more items:</p>
4.22 <p>Sub-item: <input name="subvalue" value="some other value" /><input name="remove2" value="Remove" type="submit" /></p>
4.23 -</form>
4.24 +
4.25 From the item type list many value may now be selected.
4.26 <p>Taking the example HTML code from before, we can add a
4.27 definition of this new list to the template to produce something
4.28 like this:</p>
4.29 -<pre><html xmlns="http://www.w3.org/1999/xhtml"<br /> xmlns:template="http://www.boddie.org.uk/ns/xmltools/template"><br /><head><br /> <title>Example</title><br /></head><br /><body template:element="structure"><br /><form action="" method="POST"><br /><br /><!-- Template text between the start and the interesting part. --><br /><br /><div template:element="item"><br /> <p><br /> Some item: <input template:attribute-field="value" name="..." type="text" value="..." /><br /> <input name="..." template:selector-field="remove" type="submit" value="Remove" /><br /> </p><br /> <p><br /> Item type:<br /> <select name="..." <span style="font-weight: bold;">template:multiple-choice-list-field="type,type-enum,value"</span> <span style="font-weight: bold;">multiple="multiple"</span>><br /> <option <span style="font-weight: bold;"><span style="font-family: monospace;">template:multiple-choice-list-value="type-enum,value,selected"</span></span> value="..." /><br /> </select><br /> </p><br /> <p><br /> Itself containing more items:<br /> </p><br /> <p template:element="subitem"><br /> Sub-item: <input template:attribute-field="subvalue" name="..." type="text" value="..." /><br /> <input name="..." template:selector-field="remove2" type="submit" value="Remove" /><br /> </p><br /> <p><br /> <input name="..." template:selector-field="add2,subitem" type="submit" value="Add subitem" /><br /> </p><br /></div><br /><p><br /> <input name="..." template:selector-field="add,item" type="submit" value="Add item" /><br /></p><span style="font-weight: bold;"><br /><br /></span><!-- Template text between the interesting part and the end. --><br /><br /></form><br /></body><br /></html></pre>
4.30 +<pre><html xmlns="http://www.w3.org/1999/xhtml"<br /> xmlns:template="http://www.boddie.org.uk/ns/xmltools/template"><br /><head><br /> <title>Example</title><br /></head><br /><body template:element="structure"><br /><form action="" method="post"><br /><br /><!-- Template text between the start and the interesting part. --><br /><br /><div template:element="item"><br /> <p><br /> Some item: <input template:attribute-field="value" name="..." type="text" value="..." /><br /> <input name="..." template:selector-field="remove" type="submit" value="Remove" /><br /> </p><br /> <p><br /> Item type:<br /> <select name="..." <span style="font-weight: bold;">template:multiple-choice-list-field="type,type-enum,value"</span> <span style="font-weight: bold;">multiple="multiple"</span>><br /> <option <span style="font-weight: bold;"><span style="font-family: monospace;">template:multiple-choice-list-value="type-enum,value,selected"</span></span> value="..." /><br /> </select><br /> </p><br /> <p><br /> Itself containing more items:<br /> </p><br /> <p template:element="subitem"><br /> Sub-item: <input template:attribute-field="subvalue" name="..." type="text" value="..." /><br /> <input name="..." template:selector-field="remove2" type="submit" value="Remove" /><br /> </p><br /> <p><br /> <input name="..." template:selector-field="add2,subitem" type="submit" value="Add subitem" /><br /> </p><br /></div><br /><p><br /> <input name="..." template:selector-field="add,item" type="submit" value="Add item" /><br /></p><span style="font-weight: bold;"><br /><br /></span><!-- Template text between the interesting part and the end. --><br /><br /></form><br /></body><br /></html></pre>
4.31 <p>From the previous <a href="multiple.html">single-valued case</a>,
4.32 some crucial changes have been made:</p>
4.33 <ol>
5.1 --- a/docs/overview.html Tue Nov 08 19:02:02 2005 +0000
5.2 +++ b/docs/overview.html Tue Nov 08 19:04:00 2005 +0000
5.3 @@ -20,5 +20,5 @@
5.4 <li><a href="multivalue.html">Adding multivalued fields</a></li>
5.5 <li><a href="advice.html">Recommendations and advice</a></li>
5.6 <li><a href="in-page-updates.html">Adding in-page updates</a></li>
5.7 -</ol><p>A topic-by-topic guide to XSLTools:</p><ul><li><a href="template-design.html">A guide to template design</a></li><li><a href="XSLForms-resource.html">Using the XSLFormsResource API</a></li></ul><p>Some other resources:</p><ul><li><a href="reference.html">A template attribute reference</a></li><li><a href="../apidocs/public/XSLForms.Output-module.html">An XSLT/template extension function reference</a></li><li>An in-page update JavaScript function reference</li></ul>
5.8 +</ol><p>A topic-by-topic guide to XSLTools:</p><ul><li><a href="template-design.html">A guide to template design</a></li><li><a href="XSLForms-resource.html">Using the XSLFormsResource API</a></li><li>Using Qt Designer to make templates <span style="font-style: italic;">(to be written)</span></li><li>Developing applications for PyQt and the Web <span style="font-style: italic;">(to be written)</span></li></ul><p>Some other resources:</p><ul><li><a href="reference.html">A template attribute reference</a></li><li><a href="../apidocs/public/XSLForms.Output-module.html">An XSLT/template extension function reference</a></li><li><a href="JavaScript-reference.html">An in-page update JavaScript function reference</a></li></ul>
5.9 </body></html>
5.10 \ No newline at end of file
6.1 --- a/docs/selectors.html Tue Nov 08 19:02:02 2005 +0000
6.2 +++ b/docs/selectors.html Tue Nov 08 19:04:00 2005 +0000
6.3 @@ -26,7 +26,7 @@
6.4 <p>Taking the example HTML code from before, we add some of these
6.5 selector annotations to the template to produce something
6.6 like this:</p>
6.7 -<pre><html xmlns="http://www.w3.org/1999/xhtml"<br /> xmlns:template="http://www.boddie.org.uk/ns/xmltools/template"><br /><head><br /> <title>Example</title><br /></head><br /><body template:element="structure"><br /><form action="" method="POST"><br /><br /><!-- Template text between the start and the interesting part. --><br /><br /><div template:element="item"><br /> <p><br /> Some item: <input template:attribute-field="value" name="..." type="text" value="..." /><br /> <input name="..." <span style="font-weight: bold;">template:selector-field="remove"</span> type="submit" value="Remove" /><br /> </p><br /> <p><br /> Itself containing more items:<br /> </p><br /> <p template:element="subitem"><br /> Sub-item: <input template:attribute="subvalue" name="{template:this-attribute()}" type="text" value="{$this-value}" /><br /> <input name="..." <span style="font-weight: bold;">template:selector-field="remove2"</span> type="submit" value="Remove" /><br /> </p><br /> <p><br /> <input name="..." <span style="font-weight: bold;">template:selector-field="add2,subitem"</span> type="submit" value="Add subitem" /><br /> </p><br /></div><br /><p><br /> <input name="..." <span style="font-weight: bold;">template:selector-field="add,item"</span> type="submit" value="Add item" /><br /></p><br /><br /><!-- Template text between the interesting part and the end. --><br /><br /></form><br /></body><br /></html></pre>
6.8 +<pre><html xmlns="http://www.w3.org/1999/xhtml"<br /> xmlns:template="http://www.boddie.org.uk/ns/xmltools/template"><br /><head><br /> <title>Example</title><br /></head><br /><body template:element="structure"><br /><form action="" method="post"><br /><br /><!-- Template text between the start and the interesting part. --><br /><br /><div template:element="item"><br /> <p><br /> Some item: <input template:attribute-field="value" name="..." type="text" value="..." /><br /> <input name="..." <span style="font-weight: bold;">template:selector-field="remove"</span> type="submit" value="Remove" /><br /> </p><br /> <p><br /> Itself containing more items:<br /> </p><br /> <p template:element="subitem"><br /> Sub-item: <input template:attribute="subvalue" name="{template:this-attribute()}" type="text" value="{$this-value}" /><br /> <input name="..." <span style="font-weight: bold;">template:selector-field="remove2"</span> type="submit" value="Remove" /><br /> </p><br /> <p><br /> <input name="..." <span style="font-weight: bold;">template:selector-field="add2,subitem"</span> type="submit" value="Add subitem" /><br /> </p><br /></div><br /><p><br /> <input name="..." <span style="font-weight: bold;">template:selector-field="add,item"</span> type="submit" value="Add item" /><br /></p><br /><br /><!-- Template text between the interesting part and the end. --><br /><br /></form><br /></body><br /></html></pre>
6.9 <h3>The Remove Buttons</h3>
6.10 <p>Some of the attributes in the previous HTML code have been
6.11 changed:</p>
7.1 --- a/docs/structure.html Tue Nov 08 19:02:02 2005 +0000
7.2 +++ b/docs/structure.html Tue Nov 08 19:04:00 2005 +0000
7.3 @@ -4,7 +4,6 @@
7.4
7.5 <title>Creating Applications: Add Structure</title><meta name="generator" content="amaya 8.1a, see http://www.w3.org/Amaya/" />
7.6 <link href="styles.css" rel="stylesheet" type="text/css" /></head>
7.7 -
7.8 <body>
7.9 <h1>Creating Applications: Add Structure</h1>
7.10 <p>Earlier, we defined the <a href="data.html">structure of the form
7.11 @@ -42,7 +41,7 @@
7.12 document correctly.</p>
7.13 <h2>Completing the Template</h2>
7.14 <p>The template in full should now look something like this:</p>
7.15 -<pre><?xml version="1.0"?><br /><html xmlns="http://www.w3.org/1999/xhtml"<br /> <span style="font-weight: bold;">xmlns:template="http://www.boddie.org.uk/ns/xmltools/template"</span>><br /><head><br /> <title>Example</title><br /></head><br /><body template:element="structure"><br /><form action="" method="POST"><br /><br /><!-- Template text between the start and the interesting part. --><br /><br /><div template:element="item"><br /> <p><br /> Some item: <input template:attribute-field="value" name="..." type="text" value="..." /><br /> <input name="remove" type="submit" value="Remove" /><br /> </p><br /> <p><br /> Itself containing more items:<br /> </p><br /> <p template:element="subitem"><br /> Sub-item: <input template:attribute-field="subvalue" name="..." type="text" value="..." /><br /> <input name="remove2" type="submit" value="Remove" /><br /> </p><br /> <p><br /> <input name="add2" type="submit" value="Add subitem" /><br /> </p><br /></div><br /><p><br /> <input name="add" type="submit" value="Add item" /><br /></p><br /><br /><!-- Template text between the interesting part and the end. --><br /><br /></form><br /></body><br /></html></pre>
7.16 +<pre><?xml version="1.0"?><br /><html xmlns="http://www.w3.org/1999/xhtml"<br /> <span style="font-weight: bold;">xmlns:template="http://www.boddie.org.uk/ns/xmltools/template"</span>><br /><head><br /> <title>Example</title><br /></head><br /><body template:element="structure"><br /><form action="" method="post"><br /><br /><!-- Template text between the start and the interesting part. --><br /><br /><div template:element="item"><br /> <p><br /> Some item: <input template:attribute-field="value" name="..." type="text" value="..." /><br /> <input name="remove" type="submit" value="Remove" /><br /> </p><br /> <p><br /> Itself containing more items:<br /> </p><br /> <p template:element="subitem"><br /> Sub-item: <input template:attribute-field="subvalue" name="..." type="text" value="..." /><br /> <input name="remove2" type="submit" value="Remove" /><br /> </p><br /> <p><br /> <input name="add2" type="submit" value="Add subitem" /><br /> </p><br /></div><br /><p><br /> <input name="add" type="submit" value="Add item" /><br /></p><br /><br /><!-- Template text between the interesting part and the end. --><br /><br /></form><br /></body><br /></html></pre>
7.17 <p>Note also that a namespace declaration is required for the <code>template</code>
7.18 attributes, and it is usually best to put this declaration on the
7.19 top-level <code>html</code> element in the template, as shown in
8.1 --- a/docs/styles.css Tue Nov 08 19:02:02 2005 +0000
8.2 +++ b/docs/styles.css Tue Nov 08 19:04:00 2005 +0000
8.3 @@ -75,3 +75,8 @@
8.4 background-color: rgb(153, 153, 255);
8.5 }
8.6
8.7 + dt { padding: 0.25em;
8.8 + margin-top: 1em;
8.9 + margin-bottom: 1em;
8.10 + background-color: rgb(238, 238, 238);
8.11 + }
9.1 --- a/docs/template-design.html Tue Nov 08 19:02:02 2005 +0000
9.2 +++ b/docs/template-design.html Tue Nov 08 19:04:00 2005 +0000
9.3 @@ -46,10 +46,13 @@
9.4 and to request that some operation be performed on those selected
9.5 elements. Two common selector types are those concerning the addition
9.6 and removal of elements.</p><h4>Selectors as Buttons</h4><p>In the collection elements example above, we saw the usage of a selector which could be used to add elements to a document:</p><pre><input template:selector-field="add-hard-disk,hard-disk" type="submit" name="..." value="Add hard disk"/></pre><p>This would produce the following HTML form control:</p><p><input name="..." value="Add hard disk" type="submit" /> </p><p>As described in the <a href="XSLForms-resource.html">"Using the XSLFormsResource API"</a> document, the above selector (with the name <code>add-hard-disk</code>)
9.7 -could be obtained and the associated collection of elements used to
9.8 -insert new elements within the specified elements. Similarly, a
9.9 +could be obtained in the application itself, and the collection of
9.10 +elements associated with the selector used as a collection of places to
9.11 +insert new elements into the form data document. Similarly, a
9.12 selector which could be used to remove elements from a document could
9.13 -be specified as follows:</p><pre><input template:selector-field="remove-hard-disk" type="submit" name="..." value="Remove hard disk"/></pre><p>This would produce the following HTML form control:</p><p><input name="..." value="Remove hard disk" type="submit" /></p><p>Again, such a selector could be obtained and its associated elements removed from the document.</p><h4>Selectors as Checkboxes</h4><p>Whilst
9.14 +be specified as follows:</p><pre><input template:selector-field="remove-hard-disk" type="submit" name="..." value="Remove hard disk"/></pre><p>This would produce the following HTML form control:</p><p><input name="..." value="Remove hard disk" type="submit" /></p><p>Again,
9.15 +such a selector could be obtained in the application, and the
9.16 +associated elements could then be removed from the document.</p><h4>Selectors as Checkboxes</h4><p>Whilst
9.17 selectors can be modelled conveniently with buttons, since they may
9.18 cause an immediate update to the form data with feedback from the
9.19 operation occurring immediately, other form controls can be used to
9.20 @@ -58,7 +61,7 @@
9.21 document as being selected, with the application left to determine what
9.22 kind of operation should be applied to the selection.</p><h3>Attribute Values</h3><p>A
9.23 simple attribute value is defined to be a value, freely editable set in
9.24 -an attribute on some element in a document. For example, in an XML document:</p><pre><element attribute="value"/></pre><p>The
9.25 +an attribute on some element in a document. For example, in the form data document:</p><pre><element attribute="value"/></pre><p>The
9.26 following sections describe ways in which the value can be viewed,
9.27 edited or changed through the presentation of the attribute in the
9.28 template.</p><h4>Editable Fields</h4><p>If we are to permit an attribute value to be edited, we might choose the following template representation:</p><pre><input template:attribute-field="attribute" name="..." value="..." type="text"/></pre><p>This would produce the following HTML form control:</p><p><input name="..." value="..." /></p><p>Note