Author: cziegeler
Date: Wed Feb  9 10:05:23 2005
New Revision: 153096

URL: http://svn.apache.org/viewcvs?view=rev&rev=153096
Log:
Remove dependency to xsp and fix samples

Added:
    cocoon/trunk/src/blocks/chaperon/samples/misc/mathexp.jx   (with props)
Modified:
    cocoon/trunk/gump.xml
    cocoon/trunk/src/blocks/chaperon/samples/misc/wiki.js
    cocoon/trunk/src/blocks/chaperon/samples/sitemap.xmap

Modified: cocoon/trunk/gump.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/gump.xml?view=diff&r1=153095&r2=153096
==============================================================================
--- cocoon/trunk/gump.xml (original)
+++ cocoon/trunk/gump.xml Wed Feb  9 10:05:23 2005
@@ -215,7 +215,6 @@
     <depend project="cocoon" inherit="all"/>
     <depend project="chaperon"/>
     <depend project="castor"/>
-    <depend project="cocoon-block-xsp" type="samples"/>
 
     <library name="chaperon"/>
     <library name="castor"/>

Added: cocoon/trunk/src/blocks/chaperon/samples/misc/mathexp.jx
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/chaperon/samples/misc/mathexp.jx?view=auto&rev=153096
==============================================================================
--- cocoon/trunk/src/blocks/chaperon/samples/misc/mathexp.jx (added)
+++ cocoon/trunk/src/blocks/chaperon/samples/misc/mathexp.jx Wed Feb  9 
10:05:23 2005
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- @version $Id$ -->
+<document xmlns:jx="http://apache.org/cocoon/templates/jx/1.0";>
+  <header>
+   <title>Chaperon examples</title>
+   <tab title="back" href="."/>
+  </header>
+  <body>
+   <row>
+    <column title="Mathematical expression">
+
+     <text xmlns="http://chaperon.sourceforge.net/schema/text/1.0"; source="" 
line="1" column="1">${value}</text>
+
+     <p>
+      <form action="mathexp.html" method="post">
+        <input name="text" type="text" size="80" maxlength="110" 
value="${value}"/>
+        <input type="submit"/>
+      </form>
+     </p>
+    </column>
+   </row>
+  </body>
+</document>

Propchange: cocoon/trunk/src/blocks/chaperon/samples/misc/mathexp.jx
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/src/blocks/chaperon/samples/misc/mathexp.jx
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/trunk/src/blocks/chaperon/samples/misc/wiki.js
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/chaperon/samples/misc/wiki.js?view=diff&r1=153095&r2=153096
==============================================================================
--- cocoon/trunk/src/blocks/chaperon/samples/misc/wiki.js (original)
+++ cocoon/trunk/src/blocks/chaperon/samples/misc/wiki.js Wed Feb  9 10:05:23 
2005
@@ -1,5 +1,5 @@
 /*
-* Copyright 1999-2004 The Apache Software Foundation
+* Copyright 1999-2005 The Apache Software Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -13,10 +13,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-importPackage(Packages.org.apache.excalibur.source);
-//importPackage(Packages.java.io);
-
-var resolver = cocoon.getComponent(SourceResolver.ROLE);
+var resolver = 
cocoon.getComponent(Packages.org.apache.excalibur.source.SourceResolver.ROLE);
 
 function view() {
 
@@ -136,3 +133,11 @@
     return exists;
 }
 
+function mathexp() {
+    var value;
+    if ( cocoon.request.getParameter("text") != null )
+        value = cocoon.request.getParameter("text");
+    else
+        value = "3*a-5*6/7 + ( b-c)*5- b";
+    cocoon.sendPage("mathexp-view.html", {"value" : value});
+}

Modified: cocoon/trunk/src/blocks/chaperon/samples/sitemap.xmap
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/chaperon/samples/sitemap.xmap?view=diff&r1=153095&r2=153096
==============================================================================
--- cocoon/trunk/src/blocks/chaperon/samples/sitemap.xmap (original)
+++ cocoon/trunk/src/blocks/chaperon/samples/sitemap.xmap Wed Feb  9 10:05:23 
2005
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!--
-  Copyright 1999-2004 The Apache Software Foundation
+  Copyright 1999-2005 The Apache Software Foundation
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-
+<!-- @version $Id$ -->
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>
 
 <!-- =========================== Components ================================ 
-->
@@ -198,9 +198,11 @@
    </map:match>
 
 <!-- ========================= Chaperon ================================ -->
-
    <map:match pattern="mathexp.html">
-    <map:generate type="serverpages" src="misc/mathexp.xsp"/>
+     <map:call function="mathexp"/>
+   </map:match>
+   <map:match pattern="mathexp-view.html">
+    <map:generate type="jx" src="misc/mathexp.jx"/>
     <map:transform type="lexer"   src="grammars/mathexp.xlex"/>
     <map:transform type="parser"  src="grammars/mathexp.xgrm"/>
     <map:transform                src="stylesheets/mathexp2html.xsl"/>


Reply via email to