Author: vgritsenko
Date: Sun Nov 14 11:56:06 2004
New Revision: 65618
Added:
cocoon/trunk/src/blocks/taglib/conf/taglib.xsamples (props changed)
- copied unchanged from rev 65617,
cocoon/branches/BRANCH_2_1_X/src/blocks/taglib/conf/taglib.xsamples
cocoon/trunk/src/blocks/taglib/samples/samples.xml (props changed)
- copied unchanged from rev 65617,
cocoon/branches/BRANCH_2_1_X/src/blocks/taglib/samples/samples.xml
Removed:
cocoon/trunk/src/blocks/taglib/samples/TaglibTest.xhtml
cocoon/trunk/src/blocks/taglib/samples/variable-s.xhtml
Modified:
cocoon/trunk/src/blocks/taglib/conf/jxpath.xconf
cocoon/trunk/src/blocks/taglib/samples/parent.xhtml
cocoon/trunk/src/blocks/taglib/samples/sitemap.xmap
cocoon/trunk/src/blocks/taglib/samples/variable-p.xhtml
cocoon/trunk/src/blocks/taglib/samples/variable-r.xhtml
cocoon/trunk/src/blocks/taglib/samples/variable.xhtml
Log:
samples cleanup
Modified: cocoon/trunk/src/blocks/taglib/conf/jxpath.xconf
==============================================================================
--- cocoon/trunk/src/blocks/taglib/conf/jxpath.xconf (original)
+++ cocoon/trunk/src/blocks/taglib/conf/jxpath.xconf Sun Nov 14 11:56:06 2004
@@ -17,7 +17,7 @@
<xconf xpath="/cocoon" unless="[EMAIL
PROTECTED]'org.apache.cocoon.jxpath.JXPathCocoonContexts']">
- <component role="org.apache.cocoon.jxpath.JXPathCocoonContexts"
- class="org.apache.cocoon.jxpath.JXPathCocoonContexts"
- logger="core.jxpath"/>
+ <component role="org.apache.cocoon.jxpath.JXPathCocoonContexts"
+ class="org.apache.cocoon.jxpath.JXPathCocoonContexts"
+ logger="core.jxpath"/>
</xconf>
Modified: cocoon/trunk/src/blocks/taglib/samples/parent.xhtml
==============================================================================
--- cocoon/trunk/src/blocks/taglib/samples/parent.xhtml (original)
+++ cocoon/trunk/src/blocks/taglib/samples/parent.xhtml Sun Nov 14 11:56:06 2004
@@ -14,104 +14,100 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
+
<html xmlns:core="urn:apache:taglib:core" xmlns:dt="urn:apache:taglib:datetime"
- xmlns:i18n="urn:apache:taglib:i18n"
xmlns:jxpath="urn:apache:taglib:jxpath:core"
- xmlns:string="urn:apache:taglib:string"
xmlns:test="urn:apache:taglib:test">
+ xmlns:i18n="urn:apache:taglib:i18n"
xmlns:jxpath="urn:apache:taglib:jxpath:core"
+ xmlns:string="urn:apache:taglib:string"
xmlns:test="urn:apache:taglib:test">
+
+ <title>Tag Test</title>
+ <h2>tag test</h2>
+ <i18n:locale localeRef="$session/locale" >
- <title>Tag Test</title>
- <h2>tag test</h2>
- <i18n:locale localeRef="$session/locale" >
-
- <h3>forEach</h3>
- <p>
-
- <table border="1" cellspaceing="0" cellpadding="5">
- <tr>
- <td>
- <ul>
- <jxpath:forEach varStatus="n" var="i" begin="2" end="10" step="2">
- <li><jxpath:out value="$n/count" />. that's number <jxpath:out
value="i" /></li>
- </jxpath:forEach>
- </ul>
- </td>
- <td>
- <ul><br/>
- <jxpath:forEach varStatus="n" var="i" begin="2" end="10"
step="2">
-<br/>       <li><jxpath:out
value="$n/count"
-/>. that's number <jxpath:out value="i" /></li>
-<br/></jxpath:forEach><br/>
- </ul>
- </td>
- </tr>
- </table>
- </p>
-
- <ul>
- <jxpath:forEach varStatus="n" var="i"
items="$request/BrowserLocales" >
- <li><jxpath:out value="$n/count" />. <jxpath:out
value="$i/language" /></li>
- </jxpath:forEach>
- </ul>
-
-
- <ul>
- <jxpath:forEach varStatus="n" var="j"
items="$session/RequestInfo" >
- <li><jxpath:out value="$n/count" />. <jxpath:out value="j"
/></li>
- </jxpath:forEach>
- </ul>
-
- <jxpath:out value="$session/RequestInfo[5]/language" />
-
- <h3>locale</h3>
- <i18n:locale language="en">
- <p>
- <form>
- <table border="1" >
- <tr>
- <i18n:locale>
- <td>session language</td>
- <td>
- <select size="1" name="month">
- <dt:months var="mon">
- <option><jxpath:out value="$mon/month"
/></option>
- </dt:months>
- </select>
- </td>
- </i18n:locale>
- </tr>
- <tr>
- <i18n:locale language="de" country="DE">
- <td>german</td>
- <td>
- <select size="1" name="month">
- <dt:months var="mon">
- <option><jxpath:out value="$mon/month"
/></option>
- </dt:months>
- </select>
- </td>
- </i18n:locale>
- </tr>
- <tr>
- <td colspan="2">
- <i18n:locale><br/>
- <td><br/>
- <select size="1" name="month"><br/>
- <dt:months var="mon"><br/>
- <option><jxpath:out value="$mon/month"
/></option><br/>
- </dt:months><br/>
- </select><br/>
- </td><br/>
- </i18n:locale><br/>
- </td>
- </tr>
- </table>
- </form>
- </p>
- </i18n:locale>
+ <h3>forEach</h3>
+ <p>
+ <table border="1" cellspaceing="0" cellpadding="5">
+ <tr>
+ <td>
+ <ul>
+ <jxpath:forEach varStatus="n" var="i" begin="2" end="10" step="2">
+ <li><jxpath:out value="$n/count" />. that's number <jxpath:out
value="i" /></li>
+ </jxpath:forEach>
+ </ul>
+ </td>
+ <td>
+ <ul><br/>
+ <jxpath:forEach varStatus="n" var="i" begin="2" end="10"
step="2">
+ <br/>       <li><jxpath:out
value="$n/count"
+ />. that's number <jxpath:out value="i" /></li>
+ <br/></jxpath:forEach><br/>
+ </ul>
+ </td>
+ </tr>
+ </table>
+ </p>
+ <ul>
+ <jxpath:forEach varStatus="n" var="i" items="$request/BrowserLocales" >
+ <li><jxpath:out value="$n/count" />. <jxpath:out value="$i/language"
/></li>
+ </jxpath:forEach>
+ </ul>
+
+ <ul>
+ <jxpath:forEach varStatus="n" var="j" items="$session/RequestInfo">
+ <li><jxpath:out value="$n/count" />. <jxpath:out value="j" /></li>
+ </jxpath:forEach>
+ </ul>
+
+ <jxpath:out value="$session/RequestInfo[5]/language" />
+ <h3>locale</h3>
+ <i18n:locale language="en">
+ <p>
+ <form>
+ <table border="1" >
+ <tr>
+ <i18n:locale>
+ <td>session language</td>
+ <td>
+ <select size="1" name="month">
+ <dt:months var="mon">
+ <option><jxpath:out value="$mon/month" /></option>
+ </dt:months>
+ </select>
+ </td>
+ </i18n:locale>
+ </tr>
+ <tr>
+ <i18n:locale language="de" country="DE">
+ <td>german</td>
+ <td>
+ <select size="1" name="month">
+ <dt:months var="mon">
+ <option><jxpath:out value="$mon/month" /></option>
+ </dt:months>
+ </select>
+ </td>
+ </i18n:locale>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <i18n:locale><br/>
+ <td><br/>
+ <select size="1" name="month"><br/>
+ <dt:months var="mon"><br/>
+ <option><jxpath:out value="$mon/month"
/></option><br/>
+ </dt:months><br/>
+ </select><br/>
+ </td><br/>
+ </i18n:locale><br/>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </p>
+ </i18n:locale>
</i18n:locale>
<p>
- <a href="TaglibTest.xhtml">Back</a>
+ <a href="welcome">Back</a>
</p>
-
</html>
Modified: cocoon/trunk/src/blocks/taglib/samples/sitemap.xmap
==============================================================================
--- cocoon/trunk/src/blocks/taglib/samples/sitemap.xmap (original)
+++ cocoon/trunk/src/blocks/taglib/samples/sitemap.xmap Sun Nov 14 11:56:06 2004
@@ -14,16 +14,17 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
+
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:components>
- <map:transformers>
+ <map:transformers default="xslt">
<!-- FIXME: pool-min="0" because of recursive lookup & some problem in
Avalon -->
<map:transformer name="tag"
src="org.apache.cocoon.transformation.TagTransformer" pool-max="64"
pool-min="0" pool-grow="2" logger="sitemap.transformer.newtag">
<transformer-hint>tag</transformer-hint>
</map:transformer>
- </map:transformers>
- <map:actions>
+ </map:transformers>
+ <map:actions>
<map:action name="tagtest" logger="sitemap.action.locale"
src="org.apache.cocoon.taglib.test.acting.TagtestAction" />
<map:action name="locale" logger="sitemap.action.locale"
src="org.apache.cocoon.acting.LocaleAction">
<store-in-session>true</store-in-session>
@@ -34,12 +35,24 @@
<map:pipelines>
<map:pipeline>
+ <map:match pattern="">
+ <map:redirect-to uri="welcome"/>
+ </map:match>
+
+ <map:match pattern="welcome">
+ <map:generate src="samples.xml"/>
+ <map:transform
src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ <map:serialize/>
+ </map:match>
+
<map:match pattern="**.xhtml">
- <map:act type="locale" />
- <map:act type="tagtest" />
+ <map:act type="locale"/>
+ <map:act type="tagtest"/>
<map:generate src="{1}.xhtml"/>
- <map:transform type="tag" label="tag" />
- <map:serialize />
+ <map:transform type="tag" label="tag"/>
+ <map:serialize/>
</map:match>
</map:pipeline>
</map:pipelines>
Modified: cocoon/trunk/src/blocks/taglib/samples/variable-p.xhtml
==============================================================================
--- cocoon/trunk/src/blocks/taglib/samples/variable-p.xhtml (original)
+++ cocoon/trunk/src/blocks/taglib/samples/variable-p.xhtml Sun Nov 14
11:56:06 2004
@@ -14,40 +14,44 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<html xmlns:core="urn:apache:taglib:core" xmlns:dt="urn:apache:taglib:datetime"
- xmlns:i18n="urn:apache:taglib:i18n"
xmlns:jxpath="urn:apache:taglib:jxpath:core"
- xmlns:string="urn:apache:taglib:string"
xmlns:test="urn:apache:taglib:test">
-
- <title>Tag Test</title>
- <h2>tag test</h2>
- <string:trim var="p">pipeline</string:trim>
- <string:trim var="$request/r">request</string:trim>
- <string:trim var="$session/s">session</string:trim>
- <string:trim var="$application/a">application</string:trim>
-
- <h3>variables in pipeline</h3>
- <p>
- <table>
- <tr>
- <td>pipeline: </td><td><jxpath:out value="p" /></td>
- </tr>
- <tr>
- <td>request: </td><td><jxpath:out value="$request/r" /></td>
+
+<html xmlns:core="urn:apache:taglib:core"
+ xmlns:string="urn:apache:taglib:string"
+ xmlns:jxpath="urn:apache:taglib:jxpath:core">
+
+ <title>Taglib Test: Setting and getting variables</title>
+ <h2>Taglib Test: Setting and getting variables</h2>
+
+ <!-- string:trim var="p">Variable pipeline</string:trim -->
+ <string:trim var="$request/r">Variable declared in request</string:trim>
+ <string:trim var="$session/s">Variable declared in session</string:trim>
+ <string:trim var="$application/a">Variable declared in
application</string:trim>
+
+ <p>
+ <table cellpadding="5" border="1">
+ <!-- tr>
+ <td>pipeline:</td>
+ <td><jxpath:out value="p" /></td>
+ </tr -->
+ <tr>
+ <td>Get variable from request:</td>
+ <td><jxpath:out value="$request/r" /></td>
</tr>
- <tr>
- <td>session: </td><td><jxpath:out value="$session/s" /></td>
+ <tr>
+ <td>Get variable from session:</td>
+ <td><jxpath:out value="$session/s" /></td>
</tr>
- <tr>
- <td>application: </td><td><jxpath:out value="$application/a"
/></td>
+ <tr>
+ <td>Get variable from application:</td>
+ <td><jxpath:out value="$application/a" /></td>
</tr>
- </table>
- </p>
+ </table>
+ </p>
+
+ <a href="variable-p.xhtml">Variables</a>
+ <a href="variable-r.xhtml">Include</a>
- <a href="variable-p.xhtml">pipeline</a>
- <a href="variable-r.xhtml">request</a>
- <a href="variable-s.xhtml">session & application</a>
- <p>
- <a href="TaglibTest.xhtml">Back</a>
- </p>
-
+ <p>
+ <a href="welcome">Back</a>
+ </p>
</html>
Modified: cocoon/trunk/src/blocks/taglib/samples/variable-r.xhtml
==============================================================================
--- cocoon/trunk/src/blocks/taglib/samples/variable-r.xhtml (original)
+++ cocoon/trunk/src/blocks/taglib/samples/variable-r.xhtml Sun Nov 14
11:56:06 2004
@@ -14,24 +14,25 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<html xmlns:core="urn:apache:taglib:core" xmlns:dt="urn:apache:taglib:datetime"
- xmlns:i18n="urn:apache:taglib:i18n"
xmlns:jxpath="urn:apache:taglib:jxpath:core"
- xmlns:string="urn:apache:taglib:string"
xmlns:test="urn:apache:taglib:test">
-
- <title>Tag Test</title>
- <h2>tag test</h2>
- <string:trim var="p">pipeline</string:trim>
- <string:trim var="$request/r">request</string:trim>
-
- <h3>variables in request</h3>
- <p>
- <core:source src="variable.xhtml" />
- </p>
-
- <a href="variable-p.xhtml">pipeline</a>
- <a href="variable-r.xhtml">request</a>
- <a href="variable-s.xhtml">session & application</a>
- <p>
- <a href="TaglibTest.xhtml">Back</a>
- </p>
+
+<html xmlns:core="urn:apache:taglib:core"
+ xmlns:string="urn:apache:taglib:string">
+
+ <title>Taglib Test: Include Source</title>
+ <h2>Taglib Test: Include Source</h2>
+
+ <!-- string:trim var="p">pipeline</string:trim -->
+ <string:trim var="$request/r">request</string:trim>
+
+ <h3>Included Content</h3>
+ <p>
+ <core:source src="variable.xhtml"/>
+ </p>
+
+ <a href="variable-p.xhtml">Variables</a>
+ <a href="variable-r.xhtml">Include</a>
+
+ <p>
+ <a href="welcome">Back</a>
+ </p>
</html>
Modified: cocoon/trunk/src/blocks/taglib/samples/variable.xhtml
==============================================================================
--- cocoon/trunk/src/blocks/taglib/samples/variable.xhtml (original)
+++ cocoon/trunk/src/blocks/taglib/samples/variable.xhtml Sun Nov 14
11:56:06 2004
@@ -14,23 +14,26 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
+
<html xmlns:core="urn:apache:taglib:core" xmlns:dt="urn:apache:taglib:datetime"
- xmlns:i18n="urn:apache:taglib:i18n"
xmlns:jxpath="urn:apache:taglib:jxpath:core"
- xmlns:string="urn:apache:taglib:string"
xmlns:test="urn:apache:taglib:test">
+ xmlns:i18n="urn:apache:taglib:i18n"
xmlns:jxpath="urn:apache:taglib:jxpath:core"
+ xmlns:string="urn:apache:taglib:string"
xmlns:test="urn:apache:taglib:test">
- <table>
- <!-- tr>
- <td>pipeline: </td><td><jxpath:out value="p" /></td>
- </tr -->
- <tr>
- <td>request: </td><td><jxpath:out value="$request/r" /></td>
- </tr>
- <tr>
- <td>session: </td><td><jxpath:out value="$session/s" /></td>
- </tr>
- <tr>
- <td>application: </td><td><jxpath:out value="$application/a"
/></td>
- </tr>
- </table>
-
+ <table cellpadding="5" border="1">
+ <!-- tr>
+ <td>pipeline: </td><td><jxpath:out value="p" /></td>
+ </tr -->
+ <tr>
+ <td>request:</td>
+ <td><jxpath:out value="$request/r" /></td>
+ </tr>
+ <tr>
+ <td>session:</td>
+ <td><jxpath:out value="$session/s" /></td>
+ </tr>
+ <tr>
+ <td>application:</td>
+ <td><jxpath:out value="$application/a" /></td>
+ </tr>
+ </table>
</html>