1.1 --- a/docs/selectors.html Mon Oct 03 23:04:48 2005 +0000
1.2 +++ b/docs/selectors.html Mon Oct 03 23:05:27 2005 +0000
1.3 @@ -1,12 +1,9 @@
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">
1.6 -<head>
1.7 +<html xmlns="http://www.w3.org/1999/xhtml"><head>
1.8 <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type" />
1.9 - <title>Creating Applications: Add Selectors</title>
1.10 - <meta name="generator"
1.11 - content="amaya 8.1a, see http://www.w3.org/Amaya/" />
1.12 - <link href="styles.css" rel="stylesheet" type="text/css" />
1.13 -</head>
1.14 +
1.15 + <title>Creating Applications: Add Selectors</title><meta name="generator" content="amaya 8.1a, see http://www.w3.org/Amaya/" />
1.16 + <link href="styles.css" rel="stylesheet" type="text/css" /></head>
1.17 <body>
1.18 <h1>Creating Applications: Add Selectors</h1>
1.19 <p>In the previous activity we annotated the template
1.20 @@ -29,23 +26,19 @@
1.21 <p>Taking the example HTML code from before, we add some of these
1.22 selector annotations to the template to produce something
1.23 like this:</p>
1.24 -<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="value" name="{template:this-attribute()}" type="text" value="{$this-value}" /><br /> <input name="<span
1.25 - style="font-weight: bold;">remove={template:this-element()}</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
1.26 - style="font-weight: bold;">remove2={template:this-element()}</span>" type="submit" value="Remove" /><br /> </p><br /> <p><br /> <input name="<span
1.27 - style="font-weight: bold;">add2={template:this-element()}</span>" type="submit" value="Add subitem" /><br /> </p><br /></div><br /><p><br /> <input name="<span
1.28 - style="font-weight: bold;">add={template:this-element()}</span>" type="submit" value="Add item" /><br /></p><span
1.29 - style="font-weight: bold;" /><br /><br /><!-- Template text between the interesting part and the end. --><br /><br /></form><br /></body><br /></html></pre>
1.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="..." <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>
1.31 <h3>The Remove Buttons</h3>
1.32 <p>Some of the attributes in the previous HTML code have been
1.33 changed:</p>
1.34 <ul>
1.35 <li>The <code>input</code> element for the
1.36 -first <code>Remove</code> button has a modified <code>name</code>
1.37 -attribute,
1.38 -containing a special value.</li>
1.39 +first <code>Remove</code> button has a new <code>template:selector-field</code> attribute (and a modified <code>name</code>
1.40 +attribute
1.41 +containing a value that will be replaced).</li>
1.42 <li>The <code>input</code> element for the second <code>Remove</code>
1.43 -button has a modified <code>name</code>
1.44 -attribute, containing a special value.</li>
1.45 +button has a new <code>template:selector-field</code> attribute (and a modified <code>name</code>
1.46 +attribute
1.47 +containing a value that will be replaced).</li>
1.48 </ul>
1.49 <p>What these amendments provide is a means for the XSLForms
1.50 framework
1.51 @@ -69,12 +62,13 @@
1.52 code:</p>
1.53 <ul>
1.54 <li>The <code>input</code> element for the
1.55 -first <code>Add</code> button has a modified <code>name</code>
1.56 -attribute,
1.57 -containing a special value.</li>
1.58 +first <code>Add</code> button has a new <code>template:selector-field</code> attribute (and a modified <code>name</code>
1.59 +attribute
1.60 +containing a value that will be replaced).</li>
1.61 <li>The <code>input</code> element for the second <code>Add</code>
1.62 -button has a modified <code>name</code>
1.63 -attribute, containing a special value.</li>
1.64 +button has a new <code>template:selector-field</code> attribute (and a modified <code>name</code>
1.65 +attribute
1.66 +containing a value that will be replaced).</li>
1.67 </ul>
1.68 <ul>
1.69 </ul>
1.70 @@ -100,11 +94,8 @@
1.71 </ul>
1.72 <p>We define the names of the selectors in the above cases to be <code>add2</code>
1.73 and <code>add</code> respectively, since the special values begin with
1.74 -these identifiers.</p>
1.75 +these identifiers. Moreover, we mention that the selectors are intended to add <code>subitem</code> and <code>item</code> elements respectively - this has certain implications for the behaviour of the application that will be <a href="advice.html">considered later</a>.</p>
1.76 <p>We should now have a template that is sufficiently complete to be
1.77 -used in a real application, and the writing of the <a
1.78 - href="Web-resource.html">application code</a> itself will be
1.79 -investigated in the next activity in the development <a
1.80 - href="overview.html">process</a>.</p>
1.81 -</body>
1.82 -</html>
1.83 +used in a real application, and the writing of the <a href="Web-resource.html">application code</a> itself will be
1.84 +investigated in the next activity in the development <a href="overview.html">process</a>.</p>
1.85 +</body></html>
1.86 \ No newline at end of file