1.1 --- a/docs/reference.html Wed Nov 30 18:02:28 2005 +0000
1.2 +++ b/docs/reference.html Wed Nov 30 18:02:43 2005 +0000
1.3 @@ -54,7 +54,10 @@
1.4 involved. Where the optional parameter <code>new</code> is given, the attribute is assumed not to already exist on the element.</p><p>Related attributes:</p><ul><li><code>template:multiple-choice-value</code></li><li><code>template:multiple-choice-list-field</code></li></ul><p>Implementing attributes:</p><ul><li><code>template:element</code></li><li><code>template:attribute</code></li></ul><h3><a name="multiple-choice-value"></a>template:multiple-choice-value</h3><p>This
1.5 attribute associates the template element on which it is used with an
1.6 element in the XML document being presented whose purpose is to hold
1.7 -one of a list of selectable values (as described above).</p><p>Example:</p><pre><select template:multiple-choice-field="base-system,value" name="..."><br /> <option template:multiple-choice-value="base-system-enum,value,selected" value="..."/><br /></select></pre><p>This presents the following document fragment:</p><pre><base-system value="c"><br /> <base-system-enum value="a"/><br /> <base-system-enum value="b"/><br /> <base-system-enum value="c"/><br /></base-system></pre><p>The output from the combination of the above would be as follows:</p><pre><select name="path-to-base-system"><br /> <option value="a">a</option><br /> <option value="b">b</option><br /> <option value="c" selected="selected">c</option><br /></select></pre><p>Syntax:</p><pre>list-element-name,list-attribute-name,attribute-to-create-when-selected</pre><p>Related attributes:</p><ul><li><code>template:multiple-choice-field</code></li><li><code>template:multiple-choice-list-value</code></li></ul><p>Implementing attributes:</p><ul><li><code>template:element</code></li><li><code>template:expr</code></li><li><code>template:expr-attr</code></li><li><code>template:value</code></li></ul><h3><a name="multiple-choice-list-field"></a>template:multiple-choice-list-field</h3><p>This attribute is similar to <code>template:multiple-choice-field</code>
1.8 +one of a list of selectable values (as described above).</p><p>Example:</p><pre><select template:multiple-choice-field="base-system,value" name="..."><br /> <option template:multiple-choice-value="base-system-enum,value,selected" value="..."/><br /></select></pre><p>This presents the following document fragment:</p><pre><base-system value="c"><br /> <base-system-enum value="a"/><br /> <base-system-enum value="b"/><br /> <base-system-enum value="c"/><br /></base-system></pre><p>The output from the combination of the above would be as follows:</p><pre><select name="path-to-base-system"><br /> <option value="a">a</option><br /> <option value="b">b</option><br /> <option value="c" selected="selected">c</option><br /></select></pre><h4>Values and Labels</h4><p>Labels different from the actual values employed can be specified using an extra parameter in the annotation:</p><pre><select template:multiple-choice-field="base-system,value" name="..."><br /> <option template:multiple-choice-value="base-system-enum,value,selected,text()" value="..."/><br /></select></pre><p>This
1.9 +additional parameter is an XPath expression whose context is the
1.10 +current value-bearing element. The above example selects the text from
1.11 +inside each <code>base-system-enum</code> element in the modified document fragment presented below.</p><p>A modified document fragment providing the labels can be written as follows:</p><pre><base-system value="c"><br /> <base-system-enum value="a">A</base-system-enum><br /> <base-system-enum value="b">B</base-system-enum><br /> <base-system-enum value="c">C</base-system-enum><br /></base-system></pre><p>The output from the modified combination would be as follows:</p><pre><select name="path-to-base-system"><br /> <option value="a">A</option><br /> <option value="b">B</option><br /> <option value="c" selected="selected">C</option><br /></select></pre><p>Syntax:</p><pre>list-element-name,list-attribute-name,attribute-to-create-when-selected[,content-expression]</pre><p>Related attributes:</p><ul><li><code>template:multiple-choice-field</code></li><li><code>template:multiple-choice-list-value</code></li></ul><p>Implementing attributes:</p><ul><li><code>template:element</code></li><li><code>template:expr</code></li><li><code>template:expr-attr</code></li><li><code>template:value</code></li></ul><h3><a name="multiple-choice-list-field"></a>template:multiple-choice-list-field</h3><p>This attribute is similar to <code>template:multiple-choice-field</code>
1.12 except that it associates the template element on which it is used with
1.13 an element in the XML document being presented containing a list
1.14 of elements whose values have been selected. This list of selected
1.15 @@ -65,7 +68,9 @@
1.16 in that it associates the template element on which it is used with an
1.17 element holding a value in a list of selectable values, with the
1.18 principal difference that potentially many such values may be selected
1.19 -in this case.</p><p>Example:</p><pre><select template:multiple-choice-list-field="question-types,question-type-enum,question-type" multiple="multiple"><br /> <option template:multiple-choice-list-value="question-type-enum,question-type,selected" value="..."/><br /></select></pre><p>This presents the following document fragment:</p><pre><question-types><br /> <question-type-enum question-type="text"/><br /> <question-type-enum question-type="choice" value-is-set="true"/><br /> <question-type-enum question-type="special" value-is-set="true"/><br /></question-types></pre><p>The output from the combination of the above would be as follows:</p><pre><select name="path-to-question-types" multiple="multiple"><br /> <option value="text">text</option><br /> <option value="choice" selected="selected">choice</option><br /> <option value="special" selected="selected">special</option><br /></select></pre><p>Syntax:</p><pre>list-element-name,list-attribute-name,attribute-to-create-when-selected</pre><p>Related attributes:</p><ul><li><code>template:multiple-choice-list-field</code></li><li><code>template:multiple-choice-value</code></li></ul><p>Implementing attributes:</p><ul><li><code>template:element</code></li><li><code>template:expr</code></li><li><code>template:expr-attr</code></li><li><code>template:value</code></li></ul><h3><a name="multiple-choice-list-element"></a>template:multiple-choice-list-element</h3><p>This attribute works in much the same way as <code>template:multiple-choice-list-field</code> except that it does not add a <code>name</code> attribute to the template element on which it is used. The purpose of this attribute, along with <code>template:attribute-list-button</code>, is to provide an alternative approach to presenting lists of selectable values.</p><p>Example:</p><pre><p template:multiple-choice-list-element="question,question-types,question-type"><br /> ...<br /></p></pre><p>See below for an example combining this attribute with the <code>template:attribute-list-button</code> attribute.</p><p>Syntax:</p><pre>element-name|<span style="font-weight: bold;">-</span>,list-element-name,list-attribute-name</pre><p>Here, <code>element-name</code> is the element in the document being presented which contains the selected value elements; if the special value <code>-</code> is given then the context element is the element containing the selected value elements. The <code>list-element-name</code> and <code>list-attribute-name</code> indicate the details of the elements providing the list of selectable values.</p><p>Related attributes:</p><ul><li><code>template:multiple-choice-list-field</code></li><li><code>template:attribute-list-button</code></li></ul><p>Implementing attributes:</p><ul><li><code>template:element</code></li></ul><h3><a name="attribute-list-button"></a>template:attribute-list-button</h3><p>This attribute works in much the same way as <code>template:attribute-button</code>
1.20 +in this case.</p><p>Example:</p><pre><select template:multiple-choice-list-field="question-types,question-type-enum,question-type" multiple="multiple"><br /> <option template:multiple-choice-list-value="question-type-enum,question-type,selected" value="..."/><br /></select></pre><p>This presents the following document fragment:</p><pre><question-types><br /> <question-type-enum question-type="text"/><br /> <question-type-enum question-type="choice" value-is-set="true"/><br /> <question-type-enum question-type="special" value-is-set="true"/><br /></question-types></pre><p>The output from the combination of the above would be as follows:</p><pre><select name="path-to-question-types" multiple="multiple"><br /> <option value="text">text</option><br /> <option value="choice" selected="selected">choice</option><br /> <option value="special" selected="selected">special</option><br /></select></pre><h4>Values and Labels</h4><p>Labels different from the actual values employed can be specified using an extra parameter in the annotation:</p><pre><select template:multiple-choice-list-field="question-types,question-type-enum,question-type" multiple="multiple"><br /> <option template:multiple-choice-list-value="question-type-enum,question-type,selected,text()" value="..."/><br /></select></pre><p>This additional parameter is an XPath expression whose context is
1.21 +the current value-bearing element. The above example selects the text
1.22 +from inside each <code>base-system-enum</code> element in the modified document fragment presented below.</p><p>A modified document fragment providing the labels can be written as follows:</p><pre><question-types><br /> <question-type-enum question-type="text">Text</question-type-enum><br /> <question-type-enum question-type="choice" value-is-set="true">Choice</question-type-enum><br /> <question-type-enum question-type="special" value-is-set="true">Special</question-type-enum><br /></question-types></pre><p>The output from the modified combination would be as follows:</p><pre><select name="path-to-question-types" multiple="multiple"><br /> <option value="text">Text</option><br /> <option value="choice" selected="selected">Choice</option><br /> <option value="special" selected="selected">Special</option><br /></select></pre><p>Syntax:</p><pre>list-element-name,list-attribute-name,attribute-to-create-when-selected[,content-expression]</pre><p>Related attributes:</p><ul><li><code>template:multiple-choice-list-field</code></li><li><code>template:multiple-choice-value</code></li></ul><p>Implementing attributes:</p><ul><li><code>template:element</code></li><li><code>template:expr</code></li><li><code>template:expr-attr</code></li><li><code>template:value</code></li></ul><h3><a name="multiple-choice-list-element"></a>template:multiple-choice-list-element</h3><p>This attribute works in much the same way as <code>template:multiple-choice-list-field</code> except that it does not add a <code>name</code> attribute to the template element on which it is used. The purpose of this attribute, along with <code>template:attribute-list-button</code>, is to provide an alternative approach to presenting lists of selectable values.</p><p>Example:</p><pre><p template:multiple-choice-list-element="question,question-types,question-type"><br /> ...<br /></p></pre><p>See below for an example combining this attribute with the <code>template:attribute-list-button</code> attribute.</p><p>Syntax:</p><pre>element-name|<span style="font-weight: bold;">-</span>,list-element-name,list-attribute-name</pre><p>Here, <code>element-name</code> is the element in the document being presented which contains the selected value elements; if the special value <code>-</code> is given then the context element is the element containing the selected value elements. The <code>list-element-name</code> and <code>list-attribute-name</code> indicate the details of the elements providing the list of selectable values.</p><p>Related attributes:</p><ul><li><code>template:multiple-choice-list-field</code></li><li><code>template:attribute-list-button</code></li></ul><p>Implementing attributes:</p><ul><li><code>template:element</code></li></ul><h3><a name="attribute-list-button"></a>template:attribute-list-button</h3><p>This attribute works in much the same way as <code>template:attribute-button</code>
1.23 does, but instead presents a button or related user interface control
1.24 whose state reflects the presence of an attribute on an element in a
1.25 collection of elements.</p><p>Example:</p><pre><p template:multiple-choice-list-element="question,question-types,question-type"><br /> <input template:attribute-list-button="question-type,checked" name="..." value="..." type="checkbox"/><br /></p></pre><p>Given an XML document like this...</p><pre><question><br /> <question-types question-type="text" value-is-set="true"/><br /> <question-types question-type="choice"/><br /></question></pre><p>...the following would be produced as output:</p><pre><p><br /> <input name="path-to-question-type" value="text" type="checkbox" checked="checked"/><br /></p><br /><p><br /> <input name="path-to-question-type" value="choice" type="checkbox"/><br /></p></pre><p>Syntax:</p><pre>attribute-name,attribute-to-create-when-set</pre><p>Related attributes:</p><ul><li><code>template:multiple-choice-list-element</code></li><li><code>template:attribute-button</code></li></ul><p>Implementing attributes:</p><ul><li><code>template:attribute</code></li><li><code>template:expr</code></li><li><code>template:expr-attr</code></li></ul><h2>Internal Annotations</h2><p>The special annotations <code>template:expr</code> and <code>template:expr-attr</code>