1.1 --- a/docs/reference.html Fri Dec 02 14:51:55 2005 +0000
1.2 +++ b/docs/reference.html Fri Dec 02 23:30:28 2005 +0000
1.3 @@ -4,7 +4,7 @@
1.4 <body><h1>Template Attribute Reference</h1>
1.5 <p>This document presents each of the attributes used in
1.6 templates to annotate the structure of the XML documents being
1.7 -presented and to modify the final output of the presented document.</p><h2>Basic Annotations</h2><p>The annotation attributes in this section are the most basic of those available. Apart from <code>template:element</code>, it is usually preferable to use the annotations listed in the "Convenience Annotations" section below.</p><h3><a name="element"></a>template:element</h3><p>This
1.8 +presented and to modify the final output of the presented document.</p><h2>Basic Annotations</h2><p>The annotation attributes in this section are the most basic of those available. Apart from <code>template:element</code> and <code>template:i18n</code>, it is usually preferable to use the annotations listed in the "Convenience Annotations" section below.</p><h3><a name="element"></a>template:element</h3><p>This
1.9 attribute associates the template element on which it is used with an
1.10 element from the XML document being presented. Matching elements are
1.11 found from the current position (or context), where the position
1.12 @@ -12,7 +12,11 @@
1.13 attribute permits the inclusion of a section of the template document
1.14 according to a test performed on the XML document being presented.</p><p>Example:</p><pre><p template:if="@value = 'true'"><br /> If the value attribute is set to the string value 'true', include this section.<br /></p></pre><p>Syntax:</p><pre>XPath-expression</pre><p>Here,
1.15 the underlying XPath mechanisms are exposed, and any XPath expression
1.16 -which tests aspects of the XML document can be written.</p><h2>Initialisation Annotations</h2><p>The annotation attributes in this section control the initialisation of documents where this is done by the XSLForms toolkit.</p><h3><a name="init"></a>template:init</h3><p>This attribute controls the creation of elements in the initialisation process and is used together with <code>template:element</code>. For each element name listed in a <code>template:element</code> annotation, the corresponding value in a <code>template:init</code> annotation states whether or how such elements are to be initialised.</p><p>Example:</p><pre><p template:element="item" template:init="no"><br /> Such item elements will not be created automatically when the document is initialised.<br /></p></pre><p>Example:</p><pre><p template:element="first,second,third" template:init="yes,yes,no"><br /> The first and second elements will be created automatically when the document is initialised.<br /> No third elements will be created automatically when the document is initialised.<br /></p></pre><p>Syntax:</p><pre><span style="font-weight: bold;">yes</span>|<span style="font-weight: bold;">no</span>|<span style="font-weight: bold;">auto</span>[,<span style="font-weight: bold;">yes</span>|<span style="font-weight: bold;">no</span>|<span style="font-weight: bold;">auto</span>[,...]]</pre><p>Here, <code>yes</code> means that an element will be created automatically, <code>no</code> means that an element will not be created automatically (relying on the existence of such elements from before), and <code>auto</code>
1.17 +which tests aspects of the XML document can be written.</p><h3><a name="template:i18n"></a>template:i18n</h3><p>This
1.18 +attribute is used to translate the textual contents of an element to
1.19 +another language where additional parameters specifying the language
1.20 +and the whereabouts of the translations have been provided to the
1.21 +stylesheet in the output generation process.</p><p>Example:</p><pre><span template:i18n="-">Hello</span></pre><p>In this example, the contents of the <code>span</code> element would be replaced with an appropriate translation for the text <code>Hello</code><span></span>.</p><p>Example:</p><pre><span template:i18n="hello">Hello</span></pre><p>In this example, the contents of the <code>span</code> element would be replaced with an appropriate translation using the token <code>hello</code><span></span> as a key in the translation dictionary.</p><p>Syntax:</p><pre><span style="font-weight: bold;">-</span>|token</pre><p>See the <a href="internationalisation.html">"Internationalisation"</a> document for more information on this attribute.</p><h2>Initialisation Annotations</h2><p>The annotation attributes in this section control the initialisation of documents where this is done by the XSLForms toolkit.</p><h3><a name="init"></a>template:init</h3><p>This attribute controls the creation of elements in the initialisation process and is used together with <code>template:element</code>. For each element name listed in a <code>template:element</code> annotation, the corresponding value in a <code>template:init</code> annotation states whether or how such elements are to be initialised.</p><p>Example:</p><pre><p template:element="item" template:init="no"><br /> Such item elements will not be created automatically when the document is initialised.<br /></p></pre><p>Example:</p><pre><p template:element="first,second,third" template:init="yes,yes,no"><br /> The first and second elements will be created automatically when the document is initialised.<br /> No third elements will be created automatically when the document is initialised.<br /></p></pre><p>Syntax:</p><pre><span style="font-weight: bold;">yes</span>|<span style="font-weight: bold;">no</span>|<span style="font-weight: bold;">auto</span>[,<span style="font-weight: bold;">yes</span>|<span style="font-weight: bold;">no</span>|<span style="font-weight: bold;">auto</span>[,...]]</pre><p>Here, <code>yes</code> means that an element will be created automatically, <code>no</code> means that an element will not be created automatically (relying on the existence of such elements from before), and <code>auto</code>
1.22 means that the initialisation process will attempt to guess whether an
1.23 element should be created automatically (by looking for selectors which
1.24 use the element's name and only creating elements where no such