coliver 2003/07/19 22:48:18
Modified: src/documentation/xdocs/userdocs/flow api.xml jxforms.xml
jxtemplate.xml sitemap.xml velocity.xml
Log:
Improve docs
Revision Changes Path
1.20 +5 -5 cocoon-2.1/src/documentation/xdocs/userdocs/flow/api.xml
Index: api.xml
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/documentation/xdocs/userdocs/flow/api.xml,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- api.xml 20 Jul 2003 03:02:20 -0000 1.19
+++ api.xml 20 Jul 2003 05:48:18 -0000 1.20
@@ -98,31 +98,31 @@
<s3 title="request">
<p>The current Cocoon request:</p>
<p>
- <em>Property</em> [<link href="#request">Request</link>] request
+ <em>Property</em> [<link href="#request">Request</link>]
<code>request</code>
</p>
</s3>
<s3 title="response">
<p>The current Cocoon response:</p>
<p>
- <em>Property</em> [<link href="#response">Response</link>] response
+ <em>Property</em> [<link href="#response">Response</link>]
<code>response</code>
</p>
</s3>
<s3 title="session">
<p>The current Cocoon session:</p>
<p>
- <em>Property</em> [<link href="#session">Session</link>] session
+ <em>Property</em> [<link href="#session">Session</link>]
<code>session</code>
</p>
</s3>
<s3 title="context">
<p>The current Cocoon application context:</p>
<p>
- <em>Property</em> [<link href="#context">Context</link>] context
+ <em>Property</em> [<link href="#context">Context</link>]
<code>context</code>
</p>
</s3>
<s3 title="log">
<p>A reference to the current logger:</p>
<p>
- <em>Property</em> [<link href="#log">Log</link>] log
+ <em>Property</em> [<link href="#log">Log</link>] <code>log</code>
</p>
</s3>
1.6 +74 -27
cocoon-2.1/src/documentation/xdocs/userdocs/flow/jxforms.xml
Index: jxforms.xml
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/documentation/xdocs/userdocs/flow/jxforms.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- jxforms.xml 20 Jul 2003 03:02:20 -0000 1.5
+++ jxforms.xml 20 Jul 2003 05:48:18 -0000 1.6
@@ -25,7 +25,7 @@
<p><link href="#HTML">Conversion to HTML</link></p>
</s2>
</s1>
- <s1 title="Overview"><anchor id="Overview"/>
+ <anchor id="Overview"/><s1 title="Overview">
<p>W3C XForms defines a device-neutral, platform-independent set of
form controls suitable for general-purpose use. JXForms supports a subset of
these controls. The controls are
@@ -96,7 +96,7 @@
</p>
</s1>
- <s1 title="Form Controls"><anchor id="Controls"/>
+ <anchor id="Controls"/><s1 title="Form Controls">
<p>The JXForms tags are defined in the following namespace:</p>
<source>http://apache.org/cocoon/jxforms/1.0</source>
<p>JXForms supports the following controls:</p>
@@ -104,17 +104,17 @@
<p>The JXForms <code><form></code> element represents the overall
form. It also corresponds to a validation <em>phase</em> in your <link
href="#Validation">validation</link> rules. It has no direct counterpart in W3C
XForms.</p>
<p>Example:</p>
<source><![CDATA[
- <xf:form id="form-feedback" view="userIdentity">
- <xf:label>Personal Information</xf:label>
+ <form id="form-feedback" view="userIdentity">
+ <label>Personal Information</label>
<error>
- <xf:violations class="error"/>
+ <violations class="error"/>
</error>
- <xf:input ref="/firstName">
- <xf:label>First Name</xf:label>
- <xf:violations class="error"/>
- </xf:input>
+ <input ref="/firstName">
+ <label>First Name</label>
+ <violations class="error"/>
+ </input>
...
- </xf:form>
+ </form>
]]></source>
<p></p>
<p>It supports the following attributes:</p>
@@ -130,19 +130,66 @@
<p>The JXForms <code><error></code> element has no counterpart in W3C
XForms. If present under the <code>form</code> element it serves as a
placeholder for validation error messages associated with the entire form.
</p>
</s2>
+ <anchor id="label"/><s2 title="label">
+ <p>JXForms <code><label></code> element is based on the W3C XForms
<link
href="http://www.w3.org/TR/xforms/slice8.html#ui-commonelems-label">label</link>
element. This required element labels the containing form control with a
descriptive label.</p>
+ <p>Example:</p>
+ <source><![CDATA[
+ <input ref="/firstName">
+ <label>First Name</label>
+ </input>
+ ]]></source>
+ <p></p>
+ </s2>
+ <s2 title="help">
+ <p>JXForms <code><help></code> is based on the W3C XForms <link
href="http://www.w3.org/TR/xforms/slice8.html#ui-commonelems-help">help</link>
element. The optional element <code>help</code> provides a convenient way to
attach help information to a form control. </p>
+ <p>Example:</p>
+ <source><![CDATA[
+ <input ref="/email">
+ <label>Email</label>
+ <help>Please check this carefully</help>
+ </input>
+ ]]></source>
+ <p></p>
+ </s2>
+ <s2 title="hint">
+ <p>JXForms <code><hint></code> is based on the W3C XForms <link
href="http://www.w3.org/TR/xforms/slice8.html#ui-commonelems-hint">hint</link>
element.The optional element <code>hint</code> provides a convenient way to
attach hint information to a form control.</p>
+ <p>Example:</p>
+ <source><![CDATA[
+ <submit id="next" phase="userIdentity" continuation="forward"
class="button">
+ <label>Next</label>
+ <hint>Go to next page</hint>
+ </submit>
+ ]]></source>
+ <p></p>
+ </s2>
+ <anchor id="value"/><s2 title="value">
+ <p>JXForms <code><value></code> element is based on the W3C XForms
<link
href="http://www.w3.org/TR/xforms/slice8.html#ui-common-choices-value">value</link>
element. This element provides a storage value to be used when an item is
selected.</p>
+ <p>Example:</p>
+ <source><![CDATA[
+ ]]></source>
+ <p></p>
+ </s2>
+ <anchor id="item"/><s2 title="item">
+ <p>JXForms <code><item></code> element is based on the W3C XForms
<link
href="http://www.w3.org/TR/xforms/slice8.html#ui-common-elements-item">item</link>
element. This element specifies the storage <link href="#value">value</link>
and <link href="#label">label</link> to represent an item in a list. It is
found within elements <link href="#select1">select1</link> and <link
href="#select">select</link>.</p>
+
+ <p>Example:</p>
+ <source><![CDATA[
+ ]]></source>
+ <p></p>
+ </s2>
<s2 title="violations">
- <p>The JXForms <code><violations></code> element has no counterpart
in W3C XForms. It is a placeholder used by the JXForms generator. For each
validation error that occur with respect to its containing element, the JXForms
generator inserts a <link href="violation">violation</link> element containing
the validation error message.</p>
+ <p>The JXForms <code><violations></code> element has no counterpart
in W3C XForms. It is a placeholder used by the JXForms generator. For each
validation error that occur with respect to its containing element, the JXForms
generator inserts a <link href="violation"><code>violation</code></link>
element containing the validation error message.</p>
<p>Example:</p>
<source><![CDATA[
- <xf:input ref="/age">
- <xf:label>Age</xf:label>
- <xf:violations class="error"/>
- </xf:input>
+ <input ref="/age">
+ <label>Age</label>
+ <violations class="error"/>
+ </input>
]]></source>
<p></p>
</s2>
<anchor id="violation"/><s2 title="violation">
- <p>The JXForms <code><violation></code> element has no counterpart in
W3C XForms. The JXForms generator inserts a <code>violation</code> element for
each validation error that occurs with respect to a <code>violations</code>
element.</p>
+ <p>The JXForms <code><violation></code> element has no counterpart in
W3C XForms. The JXForms generator inserts a <code>violation</code> element for
each validation error that occurs into the corresponding
<code><violations></code> element.</p>
<p>Example:</p>
<p>Assuming you had a Schematron validation rule such as:</p>
<source><![CDATA[
@@ -155,22 +202,22 @@
<p>
And a JXForms element such as:</p>
<source><![CDATA[
- <xf:input ref="/age">
- <xf:label>Age</xf:label>
- <xf:violations class="error"/>
- </xf:input>
+ <input ref="/age">
+ <label>Age</label>
+ <violations class="error"/>
+ </input>
]]></source>
<p>
After executing the JXForms generator the element would be transformed
into the following:</p>
<source><![CDATA[
- <xf:input ref="/age">
- <xf:label>Age</xf:label>
- <xf:violations class="error">
- <xf:violation>
+ <input ref="/age">
+ <label>Age</label>
+ <violations class="error">
+ <violation>
Age should be a reasonably big positive number.
- </xf:violation>
- </xf:violations>
- </xf:input>
+ </violation>
+ </violations>
+ </input>
]]></source>
<p></p>
</s2>
1.17 +14 -4
cocoon-2.1/src/documentation/xdocs/userdocs/flow/jxtemplate.xml
Index: jxtemplate.xml
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/documentation/xdocs/userdocs/flow/jxtemplate.xml,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- jxtemplate.xml 14 Jul 2003 01:00:15 -0000 1.16
+++ jxtemplate.xml 20 Jul 2003 05:48:18 -0000 1.17
@@ -21,6 +21,7 @@
src="org.apache.cocoon.generation.JXTemplateGenerator"/>
</map:generators>
</source>
+ <p/>
</s1>
<s1 title="Expression Languages">
<p>
@@ -38,16 +39,16 @@
from a Flowscript. In addition the following implicit objects are available
as
both JXPath and Jexl variables in a template:</p>
<dl>
-<dt><link
href="../../apidocs/java/org/apache/cocoon/environment/Request.html"><code>org.apache.cocoon.environment.Request</code></link><code>
request</code></dt>
+<dt><link
href="../../../api/java/org/apache/cocoon/environment/Request.html"><code>org.apache.cocoon.environment.Request</code></link><code>
request</code></dt>
<dd><br/>The current Cocoon request<br/></dd>
-<dt><br/><link
href="../../apidocs/java/org/apache/cocoon/environment/Response.html"><code>org.apache.cocoon.environment.Response</code></link><code>
response</code></dt>
+<dt><br/><link
href="../../../api/java/org/apache/cocoon/environment/Response.html"><code>org.apache.cocoon.environment.Response</code></link><code>
response</code></dt>
<dd><br/>The Cocoon response associated with the current request<br/></dd>
-<dt><br/><link
href="../../apidocs/java/org/apache/cocoon/environment/Session.html"><code>org.apache.cocoon.environment.Session</code></link><code>
session</code></dt>
+<dt><br/><link
href="../../../api/java/org/apache/cocoon/environment/Session.html"><code>org.apache.cocoon.environment.Session</code></link><code>
session</code></dt>
<dd><br/>The Cocoon session associated with the current request<br/></dd>
-<dt><br/><link
href="../../apidocs/java/org/apache/cocoon/environment/Context.html"><code>org.apache.cocoon.environment.Context</code></link><code>
context</code></dt>
+<dt><br/><link
href="../../../api/java/org/apache/cocoon/environment/Context.html"><code>org.apache.cocoon.environment.Context</code></link><code>
context</code></dt>
<dd><br/>The Cocoon context associated with the current request<br/></dd>
<dt><br/><code>org.apache.avalon.framework.parameter.Parameter[]</code><code>
parameters</code></dt>
@@ -90,6 +91,7 @@
body
</t:template>
</source>
+ <p/>
</s2>
<s2 title ="import"/>
<p>The <code>import</code> tag allows you to include another template within
the current template. The content of the imported template is compiled and will
be executed in place of the <code>import</code> tag:</p><source>
@@ -111,6 +113,7 @@
<set var="greeting" value="Hello #{user}"/>
The value of greeting is #{$greeting}
</source>
+ <p/>
</s2>
<s2 title ="if">
<p>The <code>if</code> tag allows the conditional execution of its body
@@ -126,12 +129,14 @@
Your cart is empty
</if>
</source>
+<p/>
<p>JXPath Example:</p>
<source>
<if test="#{cart/numberOfItems = 0}">
Your cart is empty
</if>
</source>
+ <p/>
</s2>
<s2 title ="choose">
<p>The <code>choose</code> tag performs conditional block execution by its
@@ -161,6 +166,7 @@
</otherwise>
</choose>
</source>
+ <p/>
<p>JXPath Example:</p>
<source>
<choose>
@@ -172,6 +178,7 @@
</otherwise>
</choose>
</source>
+ <p/>
</s2>
<s2 title="out">
<p>The <code>out</code> tag evaluates an expression and outputs
@@ -187,6 +194,7 @@
<source>
<out value="#{cart/numberOfItems}">
</source>
+ <p/>
</s2>
<s2 title="forEach">
<p>The <code>forEach</code> tag allows you to iterate over a collection
@@ -216,12 +224,14 @@
<td>${item.productId}</td>
</forEach>
</source>
+ <p/>
<p>JXPath Example:</p>
<source>
<forEach select="#{cart/cartItems[position() &lt;= $count]}}>
<td>#{./productId}</td>
</forEach>
</source>
+ <p/>
</s2>
<s2 title="macro">
<p>The <code>macro</code> tag allows you define a new custom tag.</p><source>
1.16 +2 -2
cocoon-2.1/src/documentation/xdocs/userdocs/flow/sitemap.xml
Index: sitemap.xml
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/documentation/xdocs/userdocs/flow/sitemap.xml,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- sitemap.xml 20 Jul 2003 03:02:20 -0000 1.15
+++ sitemap.xml 20 Jul 2003 05:48:18 -0000 1.16
@@ -12,8 +12,8 @@
<body>
<s1 title="Sitemap">
- <p>The Cocoon <link href="../concepts/sitemap.html">Sitemap</link>
provides two elements to specify interactions with your Flowscripts.</p>
- <s2 title="flow">
+ <p>The Cocoon <link href="../concepts/sitemap.html">Sitemap</link>
provides two elements to specify interactions with your Flowscripts: <link
href="#flow">flow</link>, and <link href="#call">call</link>.</p>
+ <anchor id="flow"/> <s2 title="flow">
<p>The <code>flow</code> element defines a Flowscript interpreter for a
sitemap. The <code>language</code> attribute specifies the target programming
language. Currently the only supported language is <code>"javascript"</code>.
Its embedded <code>script</code> elements allow you to specify the files that
make up the flow for this sitemap. Each <code>script</code> element specifies
the URI of a script that will be compiled and executed when this Sitemap is
created. The <code>src</code> attribute specifies the URI of the script.</p>
<source><![CDATA[
<map:flow language="Language">
1.18 +4 -4
cocoon-2.1/src/documentation/xdocs/userdocs/flow/velocity.xml
Index: velocity.xml
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/documentation/xdocs/userdocs/flow/velocity.xml,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- velocity.xml 20 Jul 2003 03:02:20 -0000 1.17
+++ velocity.xml 20 Jul 2003 05:48:18 -0000 1.18
@@ -28,13 +28,13 @@
</source>
<p>In addition the following implicit objects are always available in the
Velocity context:</p>
<dl>
- <dt><link
href="../../apidocs/java/org/apache/cocoon/environment/Request.html">Request</link>
<code>$request</code> </dt>
+ <dt><link
href="../../../api/java/org/apache/cocoon/environment/Request.html">Request</link>
<code>$request</code> </dt>
<dd>The current Cocoon request</dd>
- <dt><link
href="../../apidocs/java/org/apache/cocoon/environment/Response.html">Response</link>
<code>$response</code> </dt>
+ <dt><link
href="../../../api/java/org/apache/cocoon/environment/Response.html">Response</link>
<code>$response</code> </dt>
<dd>The Cocoon response associated with the current request</dd>
- <dt><link
href="../../apidocs/java/org/apache/cocoon/environment/Session.html">Session</link>
<code>$session</code> </dt>
+ <dt><link
href="../../../api/java/org/apache/cocoon/environment/Session.html">Session</link>
<code>$session</code> </dt>
<dd>The Cocoon session associated with the current request</dd>
- <dt><link
href="../../apidocs/java/org/apache/cocoon/environment/Context.html">Context</link>
<code>$context</code> </dt>
+ <dt><link
href="../../../api/java/org/apache/cocoon/environment/Context.html">Context</link>
<code>$context</code> </dt>
<dd>The Cocoon context associated with the current request</dd>
<dt><code>org.apache.avalon.framework.parameters.Parameters</code>
<code>$parameters</code> </dt>
<dd>Any parameters passed to the generator in the pipeline</dd>