cvs commit: cocoon-2.1/src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test LinkerContinuable.java PrimitivesFlow.java InnerContinuable.java JavaFlowTestCase.xtest

2004-06-28 Thread stephan
stephan 2004/06/28 01:28:38

  Modified:src/test/org/apache/cocoon SitemapComponentTestCase.java
   src/blocks/javaflow/java/org/apache/cocoon/components/flow/java
ContinuationClassLoader.java
   
src/blocks/javaflow/java/org/apache/cocoon/components/flow/javascript
JavaScriptHelper.java
   
src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test
InnerContinuable.java JavaFlowTestCase.xtest
  Added:   
src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test
LinkerContinuable.java PrimitivesFlow.java
  Log:
  Further investigation into the LinkageError, no cause found until now.
  
  Revision  ChangesPath
  1.8   +7 -1  
cocoon-2.1/src/test/org/apache/cocoon/SitemapComponentTestCase.java
  
  Index: SitemapComponentTestCase.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/test/org/apache/cocoon/SitemapComponentTestCase.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SitemapComponentTestCase.java 23 Jun 2004 09:16:31 -  1.7
  +++ SitemapComponentTestCase.java 28 Jun 2004 08:28:38 -  1.8
  @@ -178,6 +178,8 @@
* @param parameters Action parameters.
*/
   public final Map act(String type, String source, Parameters parameters) 
throws Exception {
  +
  +redirector.reset();
   
   ComponentSelector selector = null;
   Action action = null;
  @@ -410,6 +412,8 @@
   
   public String callFunction(String type, String source, String function, 
Map params) throws Exception {
   
  +redirector.reset();
  +
   ComponentSelector selector = null;
   Interpreter interpreter = null;
   SourceResolver resolver = null;
  @@ -450,6 +454,8 @@
   }
   
   public String callContinuation(String type, String source, String id, 
Map params) throws Exception {
  +
  +redirector.reset();
   
   ComponentSelector selector = null;
   Interpreter interpreter = null;
  
  
  
  1.13  +18 -2 
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationClassLoader.java
  
  Index: ContinuationClassLoader.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationClassLoader.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ContinuationClassLoader.java  26 Jun 2004 18:29:30 -  1.12
  +++ ContinuationClassLoader.java  28 Jun 2004 08:28:38 -  1.13
  @@ -113,6 +113,9 @@
   
   protected synchronized Class loadClass(String name, boolean resolve)
   throws ClassNotFoundException {
  +
  +   System.out.println(load class +name);
  + 
   // this finds also classes, which are already transformed, via 
findLoadedClass
if (debug)
System.out.println(load class +name);
  @@ -141,6 +144,8 @@
   private byte[] transform(JavaClass javaclazz) throws 
ClassNotFoundException {

   // make all methods of java class continuable
  + System.out.println(transforming flow class  + 
javaclazz.getClassName());
  + 
   ClassGen clazz = new ClassGen(javaclazz);
   ConstantPoolGen cp = clazz.getConstantPool();
   
  @@ -169,6 +174,7 @@
   if (isValid(method)) {
   // analyse the code of the method to create the frame
   // information about every instruction
  + 
System.out.println(analyse  + methods[i].getName());
   ControlFlowGraph cfg = new ControlFlowGraph(method);
   
   if (debug)
  @@ -180,7 +186,6 @@
System.out.println(rewriting  + methods[i].getName());
   rewrite(method, cfg);
   
  -// make last optional check for consistency
   clazz.replaceMethod(methods[i], method.getMethod());
   }
   }
  @@ -206,6 +211,17 @@
   }
   
   clazz.addInterface(CONTINUATIONCAPABLE_CLASS);
  +
  +byte[] changed = clazz.getJavaClass().getBytes();
  +try {
  +java.io.FileOutputStream out = new 
java.io.FileOutputStream(clazz.getClassName() + .rewritten);
  + out.write(changed);
  + out.flush();
  + out.close();
  + } catch (java.io.IOException ioe) {
  + ioe.printStackTrace

cvs commit: cocoon-2.1/src/blocks/javaflow/test/org/apache/cocoon/components/flow/javascript JavaScriptFlowTestCase.xtest

2004-06-26 Thread stephan
stephan 2004/06/26 11:29:31

  Modified:src/blocks/javaflow/java/org/apache/cocoon/components/flow/java
AbstractContinuable.java Continuation.java
ContinuationClassLoader.java
DecompilingVisitor.java JavaInterpreter.java
   
src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser
ControlFlowGraph.java Subroutines.java
   
src/blocks/javaflow/java/org/apache/cocoon/components/flow/javascript
JavaScriptHelper.java JavaScriptInterpreter.java
   
src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test
JavaFlowTestCase.java JavaFlowTestCase.xtest
SimpleFlow.java
   
src/blocks/javaflow/test/org/apache/cocoon/components/flow/javascript
JavaScriptFlowTestCase.xtest
  Added:   src/blocks/javaflow/java/org/apache/cocoon/components/flow/java
ContinuationHelper.java
   
src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test
InnerContinuable.java
  Log:
  Fixing problem with Class c = xxx.class, was caused due a strange 
combination
  of dup_x1 and swap.
  Fixing problem with instantiated but unsed objects.
  The current problem is a
  java.lang.LinkageError: loader constraints violated when linking
  org/mozilla/javascript/IdFunction class
  
  Revision  ChangesPath
  1.7   +22 -19
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/AbstractContinuable.java
  
  Index: AbstractContinuable.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/AbstractContinuable.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AbstractContinuable.java  24 Jun 2004 16:48:53 -  1.6
  +++ AbstractContinuable.java  26 Jun 2004 18:29:30 -  1.7
  @@ -39,37 +39,39 @@
*/
   public abstract class AbstractContinuable implements Continuable {
   
  -private ContinuationContext getContext() {
  +private static ContinuationContext getContext() {
   if (Continuation.currentContinuation()==null)
   throw new IllegalStateException(No continuation is running);
   return (ContinuationContext) 
Continuation.currentContinuation().getContext();
   }
 
  -public Logger getLogger() {
  +public static Logger getLogger() {
   return getContext().getLogger();
   }
   
  -public Context getAvalonContext() {
  +public static Context getAvalonContext() {
   return getContext().getAvalonContext();
   }
   
  -public ServiceManager getServiceManager() {
  +public static ServiceManager getServiceManager() {
   return getContext().getServiceManager();
   }

  -public Redirector getRedirector() {
  +public static Redirector getRedirector() {
   return getContext().getRedirector();
   }
   
  -public void sendPageAndWait(String uri) {
  +public static void sendPageAndWait(String uri) {
   sendPageAndWait(uri, new VarMap());
   }
   
  -public void sendPageAndWait(String uri, Object bizdata) {
  +public static void sendPageAndWait(String uri, Object bizdata) {
  + 
  + System.out.println(sendPageAndWait(+uri+, +bizdata+));
   
   ContinuationContext context = getContext();
   
  - if (context.getLogger()!=null)
  + if (context.getLogger()!=null)
   context.getLogger().debug(send page and wait ' + uri + ');
   
   
FlowHelper.setContextObject(ContextHelper.getObjectModel(context.getAvalonContext()),
 bizdata);
  @@ -91,11 +93,11 @@
   Continuation.suspend();
   }
   
  -public void sendPage(String uri) {
  +public static void sendPage(String uri) {
   sendPage(uri, new VarMap());
   }
   
  -public void sendPage(String uri, Object bizdata) {
  +public static void sendPage(String uri, Object bizdata) {
   
   ContinuationContext context = getContext();
   
  @@ -119,19 +121,20 @@
   }
   }
   
  -public Request getRequest() {
  +public static Request getRequest() {
  + System.out.println(getRequest());
   return ContextHelper.getRequest(getContext().getAvalonContext());
   }
   
  -public Map getObjectModel() {
  +public static Map getObjectModel() {
   return ContextHelper.getObjectModel(getContext().getAvalonContext());
   }
   
  -public Parameters getParameters() {
  +public static Parameters getParameters() {
return getContext().getParameters();
   }
   
  -public void processPipelineTo(String uri, Object bizdata, OutputStream 
out

cvs commit: cocoon-2.1/src/blocks/javaflow/test/org/apache/cocoon/components/flow/javascript JavaScriptFlowTestCase.java JavaScriptFlowTestCase.xtest

2004-06-24 Thread stephan
stephan 2004/06/24 09:48:54

  Modified:src/blocks/javaflow/java/org/apache/cocoon/components/flow/java
AbstractContinuable.java
ContinuationClassLoader.java JavaInterpreter.java
   
src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser
Subroutines.java
   
src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test
JavaFlowTestCase.java JavaFlowTestCase.xtest
SimpleFlow.java
   
src/blocks/javaflow/test/org/apache/cocoon/components/flow/javascript
JavaScriptFlowTestCase.java
JavaScriptFlowTestCase.xtest
  Added:   src/blocks/javaflow/java/org/apache/cocoon/components/flow/java
DecompilingVisitor.java
   
src/blocks/javaflow/java/org/apache/cocoon/components/flow/javascript
JavaScriptHelper.java JavaScriptInterpreter.java
ScriptHelper.java
  Log:
  Using a ScriptHelper to encapsulate the instrumented JavaScript interpreter.
  Add a decompiler to debug the bytecode based on Torsten's work.
  The current problem is the usage of xxx.class, which were
  translated to Class.forName(..).
  
  Revision  ChangesPath
  1.6   +16 -1 
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/AbstractContinuable.java
  
  Index: AbstractContinuable.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/AbstractContinuable.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractContinuable.java  23 Jun 2004 09:16:31 -  1.5
  +++ AbstractContinuable.java  24 Jun 2004 16:48:53 -  1.6
  @@ -16,11 +16,14 @@
   package org.apache.cocoon.components.flow.java;
   
   import org.apache.avalon.framework.CascadingRuntimeException;
  +import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.cocoon.components.ContextHelper;
   import org.apache.cocoon.components.flow.FlowHelper;
   import org.apache.cocoon.components.flow.util.PipelineUtil;
  +import org.apache.cocoon.environment.Redirector;
   import org.apache.cocoon.environment.Request;
   import org.apache.excalibur.source.SourceUtil;
   
  @@ -44,6 +47,18 @@
 
   public Logger getLogger() {
   return getContext().getLogger();
  +}
  +
  +public Context getAvalonContext() {
  +return getContext().getAvalonContext();
  +}
  +
  +public ServiceManager getServiceManager() {
  +return getContext().getServiceManager();
  +}
  + 
  +public Redirector getRedirector() {
  +return getContext().getRedirector();
   }
   
   public void sendPageAndWait(String uri) {
  
  
  
  1.11  +68 -13
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationClassLoader.java
  
  Index: ContinuationClassLoader.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationClassLoader.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ContinuationClassLoader.java  14 Jun 2004 15:08:35 -  1.10
  +++ ContinuationClassLoader.java  24 Jun 2004 16:48:53 -  1.11
  @@ -15,6 +15,7 @@
*/
   package org.apache.cocoon.components.flow.java;
   
  +import java.io.FileOutputStream;
   import java.util.*;
   
   import org.apache.bcel.*;
  @@ -57,6 +58,8 @@
   
   private static boolean currentMethodStatic;
   
  +private boolean debug = false;
  + 
   private List includes = new ArrayList();
   
   public ContinuationClassLoader(ClassLoader parent) {
  @@ -64,6 +67,10 @@
   Repository.setRepository(new ClassLoaderRepository(parent));
   }
   
  +public void setDebug(boolean debug) {
  + this.debug = debug;
  +}
  +
   public void addIncludeClass(String pattern) {
   
   StringBuffer buffer = new StringBuffer();
  @@ -106,12 +113,16 @@
   protected synchronized Class loadClass(String name, boolean resolve)
   throws ClassNotFoundException {
   // this finds also classes, which are already transformed, via 
findLoadedClass
  + if (debug)
  + System.out.println(load class +name);
   Class c = super.loadClass(name, resolve);
   
   // transform class if class is continuable and not continuation 
capable
   if (isContinuable(c

cvs commit: cocoon-2.1/src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test JavaFlowTestCase.java SimpleFlow.java

2004-06-23 Thread stephan
stephan 2004/06/23 02:16:32

  Modified:src/test/org/apache/cocoon SitemapComponentTestCase.java
   src/blocks/javaflow/java/org/apache/cocoon/components/flow/java
AbstractContinuable.java ContinuationContext.java
JavaInterpreter.java
   
src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test
JavaFlowTestCase.java SimpleFlow.java
  Log:
  Add support for parameters within JavaFlow.
  
  Revision  ChangesPath
  1.7   +27 -9 
cocoon-2.1/src/test/org/apache/cocoon/SitemapComponentTestCase.java
  
  Index: SitemapComponentTestCase.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/test/org/apache/cocoon/SitemapComponentTestCase.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SitemapComponentTestCase.java 14 Jun 2004 14:49:25 -  1.6
  +++ SitemapComponentTestCase.java 23 Jun 2004 09:16:31 -  1.7
  @@ -17,10 +17,11 @@
   package org.apache.cocoon;
   
   import java.io.ByteArrayOutputStream;
  -import java.io.InputStream;
   import java.io.IOException;
  -import java.util.*;
  +import java.io.InputStream;
  +import java.util.ArrayList;
   import java.util.HashMap;
  +import java.util.Iterator;
   import java.util.Map;
   
   import javax.xml.transform.TransformerException;
  @@ -36,7 +37,8 @@
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.cocoon.acting.Action;
   import org.apache.cocoon.components.ContextHelper;
  -import org.apache.cocoon.components.flow.*;
  +import org.apache.cocoon.components.flow.AbstractInterpreter;
  +import org.apache.cocoon.components.flow.FlowHelper;
   import org.apache.cocoon.components.flow.Interpreter;
   import org.apache.cocoon.components.source.SourceResolverAdapter;
   import org.apache.cocoon.environment.ObjectModelHelper;
  @@ -46,9 +48,9 @@
   import org.apache.cocoon.environment.mock.MockResponse;
   import org.apache.cocoon.generation.Generator;
   import org.apache.cocoon.matching.Matcher;
  -import org.apache.cocoon.transformation.Transformer;
   import org.apache.cocoon.serialization.Serializer;
   import org.apache.cocoon.sitemap.PatternException;
  +import org.apache.cocoon.transformation.Transformer;
   import org.apache.cocoon.xml.WhitespaceFilter;
   import org.apache.cocoon.xml.dom.DOMBuilder;
   import org.apache.cocoon.xml.dom.DOMStreamer;
  @@ -406,7 +408,7 @@
   return document.toByteArray();
   }
   
  -public String callFunction(String type, String source, String function, 
List params) throws Exception {
  +public String callFunction(String type, String source, String function, 
Map params) throws Exception {
   
   ComponentSelector selector = null;
   Interpreter interpreter = null;
  @@ -424,7 +426,15 @@
   assertNotNull(Test lookup of interpreter, interpreter);
   
   ((AbstractInterpreter)interpreter).register(source);
  -interpreter.callFunction(function, params, getRedirector());
  +
  +ArrayList parameters = new ArrayList();
  +for (Iterator i = params.keySet().iterator(); i.hasNext();) {
  +String name = (String)i.next();
  +String value = (String)params.get(name);
  +parameters.add(new Interpreter.Argument(name, value));
  +}
  +
  +interpreter.callFunction(function, parameters, getRedirector());
   
   } catch (ComponentException ce) {
   getLogger().error(Could not retrieve interpeter, ce);
  @@ -439,7 +449,7 @@
   return FlowHelper.getWebContinuation(getObjectModel()).getId();
   }
   
  -public String callContinuation(String type, String source, String id, 
List params) throws Exception {
  +public String callContinuation(String type, String source, String id, 
Map params) throws Exception {
   
   ComponentSelector selector = null;
   Interpreter interpreter = null;
  @@ -457,7 +467,15 @@
   assertNotNull(Test lookup of interpreter, interpreter);
   
   ((AbstractInterpreter)interpreter).register(source);
  -interpreter.handleContinuation(id, params, getRedirector());
  +
  +ArrayList parameters = new ArrayList();
  +for (Iterator i = params.keySet().iterator(); i.hasNext();) {
  +String name = (String)i.next();
  +String value = (String)params.get(name);
  +parameters.add(new Interpreter.Argument(name, value));
  +}
  +
  +interpreter.handleContinuation(id, parameters, getRedirector());
   
   } catch (ComponentException ce) {
   getLogger().error(Could not retrieve interpreter, ce

cvs commit: cocoon-2.1/src/blocks/javaflow/samples/forms form1.xml

2004-06-23 Thread stephan
stephan 2004/06/23 03:53:41

  Modified:src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java
FormInstance.java
   src/blocks/javaflow/samples/forms form1.xml
  Log:
  Fixing CForms sample because of recent changes of CForms.
  
  Revision  ChangesPath
  1.11  +286 -261  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java/FormInstance.java
  
  Index: FormInstance.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java/FormInstance.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- FormInstance.java 7 May 2004 17:47:55 -   1.10
  +++ FormInstance.java 23 Jun 2004 10:53:41 -  1.11
  @@ -16,12 +16,22 @@
   
   package org.apache.cocoon.forms.flow.java;
   
  +import java.io.OutputStream;
   import java.util.Locale;
   
  +import javax.xml.transform.OutputKeys;
  +import javax.xml.transform.Transformer;
  +import javax.xml.transform.TransformerFactory;
  +import javax.xml.transform.sax.SAXTransformerFactory;
  +import javax.xml.transform.sax.TransformerHandler;
  +import javax.xml.transform.stream.StreamResult;
  +
   import org.apache.avalon.framework.CascadingRuntimeException;
  +import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.flow.FlowHelper;
   import org.apache.cocoon.components.flow.java.AbstractContinuable;
   import org.apache.cocoon.components.flow.java.VarMap;
  +import org.apache.cocoon.components.source.SourceUtil;
   import org.apache.cocoon.forms.FormContext;
   import org.apache.cocoon.forms.FormManager;
   import org.apache.cocoon.forms.binding.Binding;
  @@ -29,275 +39,290 @@
   import org.apache.cocoon.forms.formmodel.Form;
   import org.apache.cocoon.forms.formmodel.Widget;
   import org.apache.cocoon.forms.transformation.FormsPipelineConfig;
  +import org.apache.cocoon.forms.util.XMLAdapter;
  +import org.apache.excalibur.source.ModifiableSource;
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.source.SourceResolver;
   import org.w3c.dom.Element;
   
   /**
* Implementation of the Cocoon Forms/Java Flow integration.
  - *
  - * @author a href=http://www.apache.org/~sylvain/;Sylvain Wallez/a
  - * @author a href=mailto:[EMAIL PROTECTED]Stephan Michels/a
  + * 
  + * @author a href=http://www.apache.org/~sylvain/;Sylvain Wallez /a
  + * @author a href=mailto:[EMAIL PROTECTED]Stephan Michels /a
* @version CVS $Id$
*/
   public class FormInstance extends AbstractContinuable {
   
  -private Form form;
  -private Binding binding;
  -private Locale locale;
  -private boolean isValid;
  -private Object validator; // Used?
  -  
  -/**
  - * Create a form, given the URI of its definition file
  - */
  -public FormInstance(String uri) {
  -FormManager formMgr = null;
  -SourceResolver resolver = null;
  -Source src = null;
  -try {
  -formMgr = (FormManager)getComponent(FormManager.ROLE);
  -resolver = (SourceResolver)getComponent(SourceResolver.ROLE);
  -src = resolver.resolveURI(uri);
  -this.form = formMgr.createForm(src);
  -this.binding = null;
  -// this.validator = null;
  -// TODO : do we keep this ?
  -// this.formWidget = new Widget(this.form); could not create 
instance
  -} catch (Exception e) {
  -throw new CascadingRuntimeException(Could not create form 
instance, e);
  -} finally {
  -releaseComponent(formMgr);
  -if (src != null) resolver.release(src);
  -releaseComponent(resolver);
  -}
  -}
  -
  -/**
  - * Create a form, given the URI of its definition file, the
  - * binding file.
  - */
  -public FormInstance(String definitionFile, String bindingFile) {
  -this(definitionFile);
  -createBinding(bindingFile);
  -}
  -
  -/**
  - * Create a form of an fd:form element in the form of a 
org.w3c.dom.Element
  - */
  -public FormInstance(Element formDefinition) {
  -FormManager formMgr = null;
  -SourceResolver resolver = null;
  -Source src = null;
  -try {
  -formMgr = (FormManager)getComponent(FormManager.ROLE);
  -resolver = (SourceResolver)getComponent(SourceResolver.ROLE);
  -this.form = formMgr.createForm(formDefinition);
  -this.binding = null;
  -} catch (Exception e) {
  -throw new CascadingRuntimeException(Could not create form 
instance, e);
  -} finally {
  -releaseComponent(formMgr);
  -if (src != null) resolver.release(src);
  -releaseComponent(resolver);
  -}
  -}
  -
  -public Widget getModel

cvs commit: cocoon-2.1/src/blocks/javaflow/test/org/apache/cocoon/components/flow/javascript JavaScriptFlowTestCase.java

2004-06-14 Thread stephan
stephan 2004/06/14 07:53:57

  Modified:src/blocks/javaflow/java/org/apache/cocoon/components/flow/java
ContinuationClassLoader.java JavaInterpreter.java
   
src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test
ExtendedContinuable.java SimpleContinuable.java
SimpleFlow.java WrapperContinuable.java
   
src/blocks/javaflow/test/org/apache/cocoon/components/flow/javascript
JavaScriptFlowTestCase.java
  Added:   
src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test
FooException.java JavaFlowTestCase.java
JavaFlowTestCase.xtest
  Removed: 
src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test
FlowTest.java InheritanceFlowTest.java
  Log:
  Fixing bug, which occur in some combinations of long/double and SWAP.
  Refactor the flow tests using some higher grad test routines.
  
  Revision  ChangesPath
  1.9   +27 -7 
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationClassLoader.java
  
  Index: ContinuationClassLoader.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationClassLoader.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ContinuationClassLoader.java  3 Jun 2004 14:30:39 -   1.8
  +++ ContinuationClassLoader.java  14 Jun 2004 14:53:56 -  1.9
  @@ -168,7 +168,7 @@
   }
   }
   
  -/*byte[] changed = clazz.getJavaClass().getBytes();
  +byte[] changed = clazz.getJavaClass().getBytes();
   try {
   java.io.FileOutputStream out = new 
java.io.FileOutputStream(clazz.getClassName() + .rewritten.class);
   out.write(changed);
  @@ -176,7 +176,7 @@
   out.close();
   } catch (java.io.IOException ioe) {
   ioe.printStackTrace();
  -}*/
  +}
   
   clazz.addInterface(CONTINUATIONCAPABLE_CLASS);
   return clazz.getJavaClass().getBytes();
  @@ -459,13 +459,23 @@
   // pop all arguments for the constructor from the stack
   for (int i = arguments.length - 1; i = 0; i--) {
   Type type = arguments[i];
  -insList.append(InstructionFactory.createLoad(STACK_TYPE, 
method.getMaxLocals()+1));
  -insList.append(new SWAP());
  +// check for types with two words on stack
  +if (type.equals(Type.LONG) || type.equals(Type.DOUBLE)) {
  +insList.append(new ACONST_NULL()); // create dummy stack 
entry
  +insList.append(InstructionFactory.createLoad(STACK_TYPE, 
method.getMaxLocals()+1));
  +insList.append(new DUP2_X2()); // swap ContinuationStack 
object and long/float
  +insList.append(new POP2());
  +} else {
  +insList.append(InstructionFactory.createLoad(STACK_TYPE, 
method.getMaxLocals()+1));
  +insList.append(new SWAP());
  +}
   if (type instanceof BasicType) {
   if (type.getSize()  2  !type.equals(Type.FLOAT)) {
   type = Type.INT;
   }
   insList.append(insFactory.createInvoke(STACK_CLASS, 
getPushMethod(type), Type.VOID, new Type[]{type}, Constants.INVOKEVIRTUAL));
  +if (type.equals(Type.LONG) || type.equals(Type.DOUBLE))
  +insList.append(new POP()); // remove dummy stack entry
   } else if (type instanceof ReferenceType) {
   insList.append(insFactory.createInvoke(STACK_CLASS, 
getPushMethod(Type.OBJECT), Type.VOID, new Type[]{Type.OBJECT}, 
Constants.INVOKEVIRTUAL));
   }
  @@ -538,9 +548,19 @@
   if (type.getSize()  2  !type.equals(Type.FLOAT)) {
   type = Type.INT;
   }
  -insList.append(InstructionFactory.createLoad(STACK_TYPE, 
method.getMaxLocals()+1));
  -insList.append(new SWAP()); // TODO: check for types with 
two words on stack
  +// check for types with two words on stack
  +if (type.equals(Type.LONG) || type.equals(Type.DOUBLE)) {
  +insList.append(new ACONST_NULL()); // create dummy stack 
entry
  +insList.append(InstructionFactory.createLoad(STACK_TYPE, 
method.getMaxLocals()+1));
  +insList.append(new DUP2_X2()); // swap ContinuationStack 
object and long/float
  +insList.append(new POP2());
  +} else {
  +insList.append(InstructionFactory.createLoad(STACK_TYPE, 
method.getMaxLocals()+1

cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java ContinuationClassLoader.java

2004-06-14 Thread stephan
stephan 2004/06/14 08:08:35

  Modified:src/blocks/javaflow/java/org/apache/cocoon/components/flow/java
ContinuationClassLoader.java
  Log:
  Disable debug code.
  
  Revision  ChangesPath
  1.10  +3 -3  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationClassLoader.java
  
  Index: ContinuationClassLoader.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationClassLoader.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ContinuationClassLoader.java  14 Jun 2004 14:53:56 -  1.9
  +++ ContinuationClassLoader.java  14 Jun 2004 15:08:35 -  1.10
  @@ -168,7 +168,7 @@
   }
   }
   
  -byte[] changed = clazz.getJavaClass().getBytes();
  +/*byte[] changed = clazz.getJavaClass().getBytes();
   try {
   java.io.FileOutputStream out = new 
java.io.FileOutputStream(clazz.getClassName() + .rewritten.class);
   out.write(changed);
  @@ -176,7 +176,7 @@
   out.close();
   } catch (java.io.IOException ioe) {
   ioe.printStackTrace();
  -}
  +}*/
   
   clazz.addInterface(CONTINUATIONCAPABLE_CLASS);
   return clazz.getJavaClass().getBytes();
  
  
  


cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/javascript - New directory

2004-06-04 Thread stephan
stephan 2004/06/04 06:59:41

  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/javascript
 - New directory


cvs commit: cocoon-2.1/src/blocks/javaflow/test/org/apache/cocoon/components/flow/javascript - New directory

2004-06-04 Thread stephan
stephan 2004/06/04 06:59:41

  
cocoon-2.1/src/blocks/javaflow/test/org/apache/cocoon/components/flow/javascript
 - New directory


cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser - New directory

2004-06-03 Thread stephan
stephan 2004/06/03 05:35:38

  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser
 - New directory


cvs commit: cocoon-2.1/src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test FlowTest.java InheritanceFlowTest.java SimpleFlow.java

2004-06-03 Thread stephan
stephan 2004/06/03 05:43:28

  Modified:src/blocks/javaflow/java/org/apache/cocoon/components/flow/java
ContinuationClassLoader.java JavaInterpreter.java
   
src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test
FlowTest.java InheritanceFlowTest.java
SimpleFlow.java
  Added:   
src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser
ControlFlowGraph.java ExceptionHandler.java
ExceptionHandlers.java ExecutionVisitor.java
Frame.java InstructionContext.java
LocalVariables.java OperandStack.java
Subroutine.java Subroutines.java
UninitializedObjectType.java
  Log:
  Add test case to verify the BUG in cases of mixing instrumented and
  uninstrumented inner classes.
  Add facility to declare class as Continuable without using the marker
  interface.
  Add a fork of the bcel verifer classes to bypass problems, which exists
  if people have another version of xalan in the classpath.
  Removed the InstConstraintVisitor, which more annoy than help.
  
  Revision  ChangesPath
  1.7   +55 -57
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationClassLoader.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationClassLoader.java.diff?r1=1.6r2=1.7
  
  
  1.6   +8 -4  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/JavaInterpreter.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/JavaInterpreter.java.diff?r1=1.5r2=1.6
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/ControlFlowGraph.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/ControlFlowGraph.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/ExceptionHandler.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/ExceptionHandler.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/ExceptionHandlers.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/ExceptionHandlers.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/ExecutionVisitor.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/ExecutionVisitor.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/Frame.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/Frame.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/InstructionContext.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/InstructionContext.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/LocalVariables.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/LocalVariables.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/OperandStack.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/OperandStack.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/Subroutine.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/Subroutine.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/Subroutines.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/Subroutines.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/UninitializedObjectType.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/analyser/UninitializedObjectType.java?rev=1.1
  
  
  1.4   +3 -1  
cocoon-2.1/src/blocks/javaflow/test/org

cvs commit: cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl WebDAVSource.java

2004-04-13 Thread stephan
stephan 2004/04/13 07:20:35

  Modified:src/blocks/webdav/java/org/apache/cocoon/components/source/impl
WebDAVSource.java
  Log:
  Make getParent available for directories.
  tab2spaces
  
  Revision  ChangesPath
  1.27  +38 -57
cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSource.java
  
  Index: WebDAVSource.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSource.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- WebDAVSource.java 29 Mar 2004 10:52:46 -  1.26
  +++ WebDAVSource.java 13 Apr 2004 14:20:35 -  1.27
  @@ -189,30 +189,27 @@
* @throws SourceNotFoundException
*/
   private void initResource(int action, int depth) throws SourceException, 
SourceNotFoundException {
  - try {
  +try {
   boolean update = false;
   if (action != WebdavResource.NOACTION) {
   if (action  this.action) {
   this.action = action;
   update = true;
  -}
  -else {
  +} else {
   action = this.action;
   }
   }
   if (depth  this.depth) {
   this.depth = depth;
   update = true;
  -}
  -else {
  +} else {
   depth = this.depth;
   }
  - if (this.resource == null) {
  - this.resource = new WebdavResource(this.url, 
action, depth);
  - }
  - else if (update) {
  - this.resource.setProperties(action, depth);
  - }
  +if (this.resource == null) {
  +this.resource = new WebdavResource(this.url, action, depth);
  +} else if (update) {
  +this.resource.setProperties(action, depth);
  +}
   if (this.action  WebdavResource.NOACTION) {
   if (this.resource.isCollection()) {
   String path = this.url.getPath();
  @@ -221,18 +218,16 @@
   }
   }
   }
  - }
  - catch (HttpException e) {
  +   } catch (HttpException e) {
   if (e.getReasonCode() == HttpStatus.SC_NOT_FOUND) {
   throw new SourceNotFoundException(Not found:  + 
getSecureURI(), e);
   }
   final String msg = Could not initialize webdav resource. Server 
responded  
   + e.getReasonCode() +  ( + e.getReason() + ) -  + 
e.getMessage();
   throw new SourceException(msg, e);
  - }
  - catch (IOException e) {
  +   } catch (IOException e) {
   throw new SourceException(Could not initialize webdav 
resource, e);
  - }
  +   }
   }
   
   /**
  @@ -282,8 +277,7 @@
   final String userinfo = this.url.getEscapedUserinfo();
   if (userinfo != null) {
   uri = this.protocol + :// + userinfo + @ + uri;
  -}
  -else {
  +} else {
   uri = this.protocol + :// + uri;
   }
   this.uri = uri;
  @@ -366,8 +360,7 @@
   public String getMimeType() {
   try {
   initResource(WebdavResource.BASIC, DepthSupport.DEPTH_0);
  -}
  -catch (IOException e) {
  +} catch (IOException e) {
   return null;
   }
   return this.resource.getGetContentType();
  @@ -398,8 +391,7 @@
   public long getLastModified() {
   try {
   initResource(WebdavResource.BASIC, DepthSupport.DEPTH_0);
  -}
  -catch(IOException e) {
  +} catch(IOException e) {
   return 0;
   }
   return this.resource.getGetLastModified();
  @@ -413,11 +405,9 @@
   public boolean exists() {
   try {
   initResource(WebdavResource.BASIC, DepthSupport.DEPTH_0);
  -}
  -catch (SourceNotFoundException e) {
  +} catch (SourceNotFoundException e) {
   return false;
  -}
  -catch(IOException e) {
  +} catch(IOException e) {
   return true;
   }
   return this.resource.getExistence();
  @@ -540,13 +530,11 @@
   HttpURL childURL;
   if (this.url instanceof HttpsURL) {
   childURL = new HttpsURL((HttpsURL) this.url, childName);
  -}
  -else {
  +} else {
   childURL = new HttpURL(this.url, childName);
   }
   return

cvs commit: cocoon-2.1/src/blocks/slide/samples/styles content2html.xsl

2004-04-13 Thread stephan
stephan 2004/04/13 07:25:24

  Modified:src/blocks/slide/WEB-INF slide.xconf
   src/blocks/slide/conf slide-servlet.xweb
   src/blocks/slide/samples flow.js sitemap.xmap
   src/blocks/slide/samples/screens locks.jx permissions.jx
users.jx
   src/blocks/slide/samples/styles content2html.xsl
  Added:   src/blocks/slide/java/org/apache/cocoon/components/source
SourceDTO.java
   src/blocks/slide/samples/screens content.jx properties.jx
  Log:
  Using jx templates instead of a
  TraversableSourceGenerator and Stylesheet combo
  
  Revision  ChangesPath
  1.11  +17 -4 cocoon-2.1/src/blocks/slide/WEB-INF/slide.xconf
  
  Index: slide.xconf
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/slide/WEB-INF/slide.xconf,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- slide.xconf   6 Mar 2004 02:26:19 -   1.10
  +++ slide.xconf   13 Apr 2004 14:25:23 -  1.11
  @@ -226,13 +226,26 @@
   /objectnode
   /objectnode
   objectnode 
classname=org.apache.slide.structure.SubjectNode uri=/files
  +permission action=all subject=unauthenticated 
inheritable=true/
   permission action=/actions/write 
subject=/roles/user inheritable=true/
   permission action=/actions/read-acl subject=owner 
inheritable=true/
   /objectnode
   !-- DeltaV: default history and workspace paths --
  -objectnode 
classname=org.apache.slide.structure.SubjectNode uri=/history/
  -objectnode 
classname=org.apache.slide.structure.SubjectNode uri=/workspace/
  -objectnode 
classname=org.apache.slide.structure.SubjectNode uri=/workingresource/
  +objectnode 
classname=org.apache.slide.structure.SubjectNode uri=/history
  +permission action=all subject=unauthenticated 
inheritable=true/
  +permission action=/actions/write 
subject=/roles/user inheritable=true/
  +permission action=/actions/read-acl subject=owner 
inheritable=true/
  +/objectnode
  +objectnode 
classname=org.apache.slide.structure.SubjectNode uri=/workspace
  +permission action=all subject=unauthenticated 
inheritable=true/
  +permission action=/actions/write 
subject=/roles/user inheritable=true/
  +permission action=/actions/read-acl subject=owner 
inheritable=true/
  +/objectnode
  +objectnode 
classname=org.apache.slide.structure.SubjectNode uri=/workingresource
  +permission action=all subject=unauthenticated 
inheritable=true/
  +permission action=/actions/write 
subject=/roles/user inheritable=true/
  +permission action=/actions/read-acl subject=owner 
inheritable=true/
  +/objectnode
   /objectnode
   /data
   /namespace
  @@ -298,7 +311,7 @@
   parameter name=workspacepath/workspace/parameter
   parameter name=workingresourcepath/workingresource/parameter
   parameter name=auto-versioncheckout-checkin/parameter
  -parameter name=auto-version-controlfalse/parameter
  +parameter name=auto-version-controltrue/parameter
   parameter name=versioncontrol-exclude/
   parameter name=checkout-forkforbidden/parameter
   parameter name=checkin-forkforbidden/parameter
  
  
  
  1.9   +1 -3  cocoon-2.1/src/blocks/slide/conf/slide-servlet.xweb
  
  Index: slide-servlet.xweb
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/slide/conf/slide-servlet.xweb,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- slide-servlet.xweb6 Mar 2004 06:16:52 -   1.8
  +++ slide-servlet.xweb13 Apr 2004 14:25:23 -  1.9
  @@ -19,7 +19,6 @@
 insert-after=servlet[servlet-name = 'Cocoon']
   
   !-- Definition and configuration of Slide's WebDAV servlet. --
  -!--
   servlet
   servlet-nameSlide/servlet-name
   display-nameSlide DAV Server/display-name
  @@ -167,6 +166,5 @@
   servlet-nameSlide/servlet-name
   url-pattern/webdav/*/url-pattern
   /servlet-mapping
  ---
   
  -/xweb
  \ No newline at end of file
  +/xweb
  
  
  
  1.1  
cocoon-2.1/src/blocks/slide/java/org/apache/cocoon/components/source/SourceDTO.java
  
  Index: SourceDTO.java
  ===
  /*
   * Copyright 1999-2004 The Apache Software Foundation.
   * 
   * Licensed under the Apache License, Version 2.0 (the License);
   * you

cvs commit: cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl WebDAVSource.java WebDAVSourceFactory.java

2004-04-13 Thread stephan
stephan 2004/04/13 10:13:29

  Modified:src/blocks/webdav/java/org/apache/cocoon/components/source/impl
WebDAVSource.java WebDAVSourceFactory.java
  Log:
  Add methods to move and copy WebDAV sources.
  
  Revision  ChangesPath
  1.28  +50 -2 
cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSource.java
  
  Index: WebDAVSource.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSource.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- WebDAVSource.java 13 Apr 2004 14:20:35 -  1.27
  +++ WebDAVSource.java 13 Apr 2004 17:13:29 -  1.28
  @@ -45,10 +45,12 @@
   import org.apache.commons.httpclient.URIException;
   import org.apache.excalibur.source.ModifiableSource;
   import org.apache.excalibur.source.ModifiableTraversableSource;
  +import org.apache.excalibur.source.MoveableSource;
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.source.SourceException;
   import org.apache.excalibur.source.SourceNotFoundException;
   import org.apache.excalibur.source.SourceParameters;
  +import org.apache.excalibur.source.SourceUtil;
   import org.apache.excalibur.source.SourceValidity;
   import org.apache.excalibur.source.TraversableSource;
   import org.apache.excalibur.source.impl.validity.TimeStampValidity;
  @@ -86,7 +88,7 @@
* @version $Id$
   */
   public class WebDAVSource extends AbstractLogEnabled 
  -implements Source, TraversableSource, ModifiableSource, 
ModifiableTraversableSource, InspectableSource {
  +implements Source, TraversableSource, ModifiableSource, 
ModifiableTraversableSource, InspectableSource, MoveableSource {
   
   private static final String NAMESPACE = 
http://apache.org/cocoon/webdav/1.0;;
   
  @@ -924,4 +926,50 @@
   //refresh();
   //}
   //}
  +
  +//  MoveableSource
  +
  +/**
  + * Move the current source to a specified destination.
  + *
  + * @param source
  + *
  + * @throws SourceException If an exception occurs during the move.
  + */
  +public void moveTo(Source source) throws SourceException {
  +if (source instanceof WebDAVSource) {
  +WebDAVSource destination = (WebDAVSource)source;
  +try {
  + 
this.resource.moveMethod(destination.resource.getHttpURL().getPath());
  +} catch (HttpException e) {
  +throw new SourceException(Cannot move source 
'+getSecureURI()+', e);
  +} catch (IOException e) {
  +throw new SourceException(Cannot move source 
'+getSecureURI()+', e);
  +}
  +} else {
  +SourceUtil.move(this,source);
  +}
  +}
  +
  +/**
  + * Copy the current source to a specified destination.
  + *
  + * @param source
  + *
  + * @throws SourceException If an exception occurs during the copy.
  + */
  +public void copyTo(Source source) throws SourceException {
  +if (source instanceof WebDAVSource) {
  +WebDAVSource destination = (WebDAVSource)source;
  +try {
  +
this.resource.copyMethod(destination.resource.getHttpURL().getPath());
  +} catch (HttpException e) {
  +throw new SourceException(Cannot copy source 
'+getSecureURI()+', e);
  +} catch (IOException e) {
  +throw new SourceException(Cannot copy source 
'+getSecureURI()+', e);
  +}
  +} else {
  +SourceUtil.copy(this,source);
  +}
  +}
   }
  
  
  
  1.10  +7 -10 
cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSourceFactory.java
  
  Index: WebDAVSourceFactory.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSourceFactory.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- WebDAVSourceFactory.java  27 Mar 2004 15:51:21 -  1.9
  +++ WebDAVSourceFactory.java  13 Apr 2004 17:13:29 -  1.10
  @@ -69,13 +69,12 @@
   location = location.substring(index+3);
   }
   
  - HttpURL url;
  - if (this.secure) {
  - url = new HttpsURL(https://; + location);
  - }
  - else {
  - url = new HttpURL(http://; + location);
  - }
  +HttpURL url;
  +if (this.secure) {
  +url = new HttpsURL(https://; + location);
  +} else {
  +url = new HttpURL(http://; + location);
  +}
   
   return

cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java CalculatorFlow.java

2004-04-06 Thread stephan
stephan 2004/04/06 03:40:03

  Modified:src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java
CalculatorFlow.java
  Log:
  Catch also NPEs.
  
  Revision  ChangesPath
  1.5   +1 -1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java/CalculatorFlow.java
  
  Index: CalculatorFlow.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java/CalculatorFlow.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CalculatorFlow.java   4 Apr 2004 06:35:08 -   1.4
  +++ CalculatorFlow.java   6 Apr 2004 10:40:03 -   1.5
  @@ -51,7 +51,7 @@
   float value = 0f;
   try {
   value = Float.parseFloat(getRequest().getParameter(name));
  -} catch (NumberFormatException nfe) {
  +} catch (Exception e) {
   sendMessage(Error: \+getRequest().getParameter(name)+\ is 
not a correct number!);
   }
   return value;
  
  
  


cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java FormInstance.java

2004-04-04 Thread stephan
stephan 2004/04/04 10:16:17

  Modified:src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java
FormInstance.java
  Log:
  Using CascadingRunetimeException.
  
  Revision  ChangesPath
  1.5   +8 -7  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java/FormInstance.java
  
  Index: FormInstance.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java/FormInstance.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FormInstance.java 4 Apr 2004 06:35:08 -   1.4
  +++ FormInstance.java 4 Apr 2004 17:16:17 -   1.5
  @@ -15,9 +15,10 @@
*/
   
   package org.apache.cocoon.forms.flow.java;
  - 

  
  +
   import java.util.Locale;
   
  +import org.apache.avalon.framework.CascadingRuntimeException;
   import org.apache.cocoon.components.flow.FlowHelper;
   import org.apache.cocoon.components.flow.java.AbstractContinuable;
   import org.apache.cocoon.components.flow.java.VarMap;
  @@ -66,7 +67,7 @@
   // TODO : do we keep this ?
   // this.formWidget = new Widget(this.form); could not create 
instance
   } catch (Exception e) {
  -throw new RuntimeException(e.toString());
  +throw new CascadingRuntimeException(Could not create form 
instance, e);
   } finally {
   releaseComponent(formMgr);
   if (src != null) resolver.release(src);
  @@ -98,7 +99,7 @@
   // this.formWidget = new Widget(form);  could not create instance
   // this.local = cocoon.createPageLocal(); PageLocal ?
   } catch (Exception e) {
  -throw new RuntimeException(e.toString());
  +throw new CascadingRuntimeException(Could not create form 
instance, e);
   } finally {
   releaseComponent(formMgr);
   if (src != null) resolver.release(src);
  @@ -258,7 +259,7 @@
   source = resolver.resolveURI(bindingURI);
   this.binding = bindingManager.createBinding(source);
   } catch (Exception e) {
  -throw new RuntimeException(e.toString());
  +throw new CascadingRuntimeException(Could not create bindinh, 
e);
   } finally {
   if (source != null)
   resolver.release(source);
  @@ -274,7 +275,7 @@
   try {
   this.binding.loadFormFromModel(this.form, object);
   } catch (Exception e) {
  -throw new RuntimeException(e.toString());
  +throw new CascadingRuntimeException(Could not load form from 
model, e);
   }
   }
   
  @@ -285,7 +286,7 @@
   try {
   this.binding.saveFormToModel(this.form, object);
   } catch (Exception e) {
  -throw new RuntimeException(e.toString());
  +throw new CascadingRuntimeException(Could not save form into 
model, e);
   }
   }
   
  
  
  


cvs commit: cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel AbstractWidget.java

2004-04-02 Thread stephan
stephan 2004/04/02 01:50:35

  Modified:src/blocks/forms/java/org/apache/cocoon/forms/formmodel
AbstractWidget.java
  Log:
  Fixed typo.
  
  Revision  ChangesPath
  1.5   +2 -1  
cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/AbstractWidget.java
  
  Index: AbstractWidget.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/AbstractWidget.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbstractWidget.java   2 Apr 2004 08:00:03 -   1.4
  +++ AbstractWidget.java   2 Apr 2004 09:50:35 -   1.5
  @@ -205,6 +205,7 @@
   return this.attributes.get(name);
   } else{
   return null;
  + }
   }
   
   public void setAttribute(String name, Object value) {
  
  
  


cvs commit: cocoon-2.1/src/blocks/javaflow/samples/screens calculator-a.xml calculator-b.xml calculator-message.xml calculator-operator.xml calculator-result.xml employee-result.xml form1-result.xml form2-result.xml

2004-04-02 Thread stephan
stephan 2004/04/02 03:08:55

  Modified:src/blocks/javaflow/conf javaflow.xsamples
   src/blocks/javaflow/samples sitemap.xmap
   src/blocks/javaflow/samples/forms employee-template.xml
form1-template.xml form2-template.xml
   src/blocks/javaflow/samples/screens calculator-a.xml
calculator-b.xml calculator-message.xml
calculator-operator.xml calculator-result.xml
employee-result.xml form1-result.xml
form2-result.xml
  Added:   src/blocks/javaflow/samples samples.xml
  Log:
  Rewrote samples navigation. Make own samples page.
  
  Revision  ChangesPath
  1.3   +2 -11 cocoon-2.1/src/blocks/javaflow/conf/javaflow.xsamples
  
  Index: javaflow.xsamples
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/javaflow/conf/javaflow.xsamples,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- javaflow.xsamples 1 Apr 2004 19:01:03 -   1.2
  +++ javaflow.xsamples 2 Apr 2004 11:08:54 -   1.3
  @@ -3,17 +3,8 @@
   xsamples xpath=/samples unless=[EMAIL PROTECTED]'Java Flow']
   
 group name=Java Flow
  -sample name=Java Flow Block: Calculator href=javaflow/calculator.do
  -  Example for the Java Flow implementation
  -/sample
  -sample name=Java Flow Block: Cocoon Forms 
href=javaflow/editForm1.do
  -  Example for the Cocoon Forms and Java Flow.
  -/sample
  -sample name=Java Flow Block: Cocoon Forms Binding 
href=javaflow/editForm2.do
  -  Example for the Cocoon Forms Binding and Java Flow.
  -/sample
  -sample name=Java Flow Block: Apache OJB 
href=javaflow/showEmployee.do
  -  Example for the Cocoon Forms and Java Flow and Apache OJB.
  +sample name=Java Flow Block href=javaflow/
  +  Cocoon Java Flow examples.
   /sample
 /group
   
  
  
  
  1.2   +27 -4 cocoon-2.1/src/blocks/javaflow/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/javaflow/samples/sitemap.xmap,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sitemap.xmap  29 Mar 2004 17:47:22 -  1.1
  +++ sitemap.xmap  2 Apr 2004 11:08:54 -   1.2
  @@ -1,4 +1,19 @@
   ?xml version=1.0?
  +!--
  +  Copyright 1999-2004 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.
  +--
   
   map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0;
   
  @@ -6,8 +21,8 @@
 map:transformers default=xalan
  map:transformer name=i18n 
src=org.apache.cocoon.transformation.I18nTransformer
   catalogues default=other
  - catalogue id=other name=OtherMessages 
location=context://samples/forms/messages/
  - catalogue id=forms name=FormsMessages 
location=context://samples/forms/messages/
  + catalogue id=other name=OtherMessages 
location=context://samples/blocks/forms/messages/
  + catalogue id=forms name=FormsMessages 
location=context://samples/blocks/forms/messages/
   /catalogues
   cache-at-startuptrue/cache-at-startup
  /map:transformer
  @@ -43,13 +58,21 @@
   map:transform 
src=context://samples/common/style/xsl/html/complex-page2html.xsl
map:parameter name=contextPath value={request:contextPath}/
   /map:transform
  -map:transform 
src=context://samples/forms/resources/forms-samples-styling.xsl/
  +map:transform 
src=context://samples/blocks/forms/resources/forms-samples-styling.xsl/
   map:serialize/
  /map:match
   
 /map:pipeline
   
 map:pipeline
  +   map:match pattern=
  +map:generate src=samples.xml/
  +map:transform 
src=context://samples/common/style/xsl/html/simple-samples2html.xsl

cvs commit: cocoon-2.1/src/blocks/forms/samples welcome.xml

2004-04-02 Thread stephan
stephan 2004/04/02 03:13:21

  Modified:src/blocks/forms/samples welcome.xml
  Log:
  Fix back link.
  
  Revision  ChangesPath
  1.3   +8 -7  cocoon-2.1/src/blocks/forms/samples/welcome.xml
  
  Index: welcome.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/samples/welcome.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- welcome.xml   9 Mar 2004 15:07:50 -   1.2
  +++ welcome.xml   2 Apr 2004 11:13:20 -   1.3
  @@ -18,15 +18,16 @@
   samples
   
group name=Main examples page.
  -   sample name=Back href=../blocksto Cocoon examples main page/sample
  +  sample name=Back href=..to Cocoon examples main page/sample
 note
  -Cocoon Forms is the upcoming forms framework for Cocoon.
  -Although it is marked as unstable it is the *only* supported solution - 
all
  -other similar approaches will be deprecated soon.
  -Of course, your feedback is very much welcome on the Cocoon mailing 
lists.
  +   Cocoon Forms is the upcoming forms framework for Cocoon.
  +   Although it is marked as unstable it is the *only* supported solution - 
all
  +   other similar approaches will be deprecated soon.
  +   Of course, your feedback is very much welcome on the Cocoon mailing lists.
 /note
 sample name=Cocoon Forms Documentation 
href=http://wiki.cocoondev.org/Wiki.jsp?page=Woody;
  -Documentation is available on the Cocoon Wiki./sample
  +   Documentation is available on the Cocoon Wiki.
  +  /sample
/group
   
group name=Basic Samples
  
  
  


cvs commit: cocoon-2.1/src/webapp/samples/blocks gump2samples.xsl

2004-04-02 Thread stephan
stephan 2004/04/02 04:58:01

  Modified:src/webapp/samples/blocks gump2samples.xsl
  Log:
  Back link...
  
  Revision  ChangesPath
  1.2   +2 -2  cocoon-2.1/src/webapp/samples/blocks/gump2samples.xsl
  
  Index: gump2samples.xsl
  ===
  RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/blocks/gump2samples.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- gump2samples.xsl  1 Apr 2004 19:05:42 -   1.1
  +++ gump2samples.xsl  2 Apr 2004 12:58:01 -   1.2
  @@ -26,7 +26,7 @@
 xsl:template match=/
   samples name=Blocks Samples
 group name=Back
  -sample href=./ name=Back
  +sample href=.. name=Back
 Back to the samples home page.
   /sample
 /group
  
  
  


cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java CalculatorFlow.java FormFlow.java PersistenceFlow.java

2004-04-01 Thread stephan
stephan 2004/04/01 04:40:40

  Modified:src/blocks/javaflow/java/org/apache/cocoon/components/flow/java
ContinuationClassLoader.java
   src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java
FormInstance.java
   src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java
CalculatorFlow.java FormFlow.java
PersistenceFlow.java
  Added:   src/blocks/javaflow/java/org/apache/cocoon/components/flow/java
AbstractContinuable.java
  Removed: src/blocks/javaflow/java/org/apache/cocoon/components/flow/java
AbstractCocoonFlow.java
  Log:
  AbstractCocoonFlow - AbstractContinuable
  This name is more meaningful for peripheral classes.
  
  Revision  ChangesPath
  1.3   +6 -10 
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationClassLoader.java
  
  Index: ContinuationClassLoader.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationClassLoader.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ContinuationClassLoader.java  29 Mar 2004 19:02:23 -  1.2
  +++ ContinuationClassLoader.java  1 Apr 2004 12:40:40 -   1.3
  @@ -71,19 +71,20 @@
   public ContinuationClassLoader(ClassLoader parent) {
   super(parent);
   
  -if (parent instanceof ContinuationClassLoader)
  -throw new IllegalArgumentException(Cannot cascade 
ContinuationClassLoader);
  -
   Repository.setRepository(new ClassLoaderRepository(parent));
   }
   
   protected synchronized Class loadClass(String name, boolean resolve)
   throws ClassNotFoundException {
   
  -//System.out.println(load class +name+ classloader=+this);
  +//System.out.println(load class +name);
   
  +// this finds also classes, which are already transformed, 
  +// via findLoadedClass
   Class c = super.loadClass(name, resolve);
   
  +// transform class if class is continuable 
  +// and not continuation capable
   if ((Continuable.class.isAssignableFrom(c))  
   (!ContinuationCapable.class.isAssignableFrom(c))  
   (!c.isInterface())) {
  @@ -144,11 +145,6 @@
   // add intercepting code 
   //System.out.println(rewriting  + methods[i].getName());
   rewrite(method, cfg);
  -
  -/*InstructionHandle handle = 
method.getInstructionList().getStart();
  -do {
  -  System.out.println(handle);
  -} while ((handle = handle.getNext()) != null);*/
   
   // make last optional check for consistency
   //System.out.println(check  + methods[i].getName());
  
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/AbstractContinuable.java
  
  Index: AbstractContinuable.java
  ===
  /*
   * Copyright 1999-2004 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.
   */
  package org.apache.cocoon.components.flow.java;
  
  import org.apache.avalon.framework.CascadingRuntimeException;
  import org.apache.avalon.framework.logger.Logger;
  import org.apache.cocoon.components.ContextHelper;
  import org.apache.cocoon.components.flow.FlowHelper;
  import org.apache.cocoon.components.flow.util.PipelineUtil;
  import org.apache.cocoon.environment.Request;
  import org.apache.excalibur.source.SourceUtil;
  
  import java.io.OutputStream;
  
  /**
   * Abstract class to add basic methods for flow handling.
   *
   * @author a href=mailto:[EMAIL PROTECTED]Torsten Curdt/a
   * @author a href=mailto:[EMAIL PROTECTED]Stephan Michels/a
   * @version CVS $Id: AbstractContinuable.java,v 1.1 2004/04/01 12:40:40 
stephan Exp $
   */
  public abstract class AbstractContinuable implements Continuable {
  
  private ContinuationContext getContext() {
  if (Continuation.currentContinuation()==null)
  throw new IllegalStateException(No continuation is running);
  return (ContinuationContext) 
Continuation.currentContinuation

cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java PersistenceFlow.java

2004-03-31 Thread stephan
stephan 2004/03/31 02:20:01

  Modified:src/blocks/javaflow/java/org/apache/cocoon/components/flow/java
JavaInterpreter.java
   src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java
PersistenceFlow.java
  Log:
  Make continuation context also available for the constructor.
  Note: the contructor cannot supend the continuation.
  
  Revision  ChangesPath
  1.3   +8 -9  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/JavaInterpreter.java
  
  Index: JavaInterpreter.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/JavaInterpreter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JavaInterpreter.java  30 Mar 2004 11:10:53 -  1.2
  +++ JavaInterpreter.java  31 Mar 2004 10:20:00 -  1.3
  @@ -135,14 +135,6 @@
   
   Continuable flow = (Continuable) 
userScopes.get(method.getDeclaringClass());
   
  -if (flow == null) {
  -if (getLogger().isDebugEnabled()) 
  -getLogger().debug(create new instance of 
\+method.getDeclaringClass()+\);
  -
  -flow = (Continuable) method.getDeclaringClass().newInstance();
  -userScopes.put(method.getDeclaringClass(), flow);
  -}
  -
   ContinuationContext context = new ContinuationContext();
   context.setObject(flow);
   context.setMethod(method);
  @@ -159,6 +151,13 @@
   
   continuation.registerThread();
   try {
  +if (flow == null) {
  +if (getLogger().isDebugEnabled())
  +getLogger().debug(create new instance of 
\+method.getDeclaringClass()+\);
  +
  +flow = (Continuable) 
method.getDeclaringClass().newInstance();
  +context.setObject(flow);
  +}
   
   method.invoke(flow, new Object[0]);
   
  
  
  
  1.5   +8 -12 
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java/PersistenceFlow.java
  
  Index: PersistenceFlow.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java/PersistenceFlow.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PersistenceFlow.java  30 Mar 2004 11:10:53 -  1.4
  +++ PersistenceFlow.java  31 Mar 2004 10:20:00 -  1.5
  @@ -31,9 +31,15 @@
   
   public class PersistenceFlow extends AbstractFormFlow {
   
  -public void doInsertEmployee() throws BindingException {
  +private transient PersistenceBroker broker = null;
  +
  +public PersistenceFlow() {
  +PBFactory factory = (PBFactory)getComponent(PBFactory.ROLE);
  +broker = factory.defaultPersistenceBroker();
  +releaseComponent(factory);
  +}
   
  -PersistenceBroker broker = getPersistenceBroker();
  +public void doInsertEmployee() throws BindingException {
   
   // Create a empty Bean
   Employee employee = new Employee();
  @@ -64,8 +70,6 @@
   else
   throw new IllegalStateException(No parameter 'id');
   
  -PersistenceBroker broker = getPersistenceBroker();
  -
   // Create a empty Bean
   Employee employee = new Employee();
   // Fill some initial data to the bean
  @@ -99,8 +103,6 @@
   else
   throw new IllegalStateException(No parameter 'id');
   
  -PersistenceBroker broker = getPersistenceBroker();
  -
   // Create a empty Bean
   Employee employee = new Employee();
   // Fill some initial data to the bean
  @@ -115,8 +117,6 @@
   
   public void doShowEmployee() {
   
  -PersistenceBroker broker = getPersistenceBroker();
  -
   // Query all objects
   ArrayList results = new ArrayList();
   QueryByCriteria query = new QueryByCriteria(Employee.class, new 
Criteria());
  @@ -127,10 +127,6 @@
   Collections.sort(results, new EmployeeComparator());
   // Send response to the user
   sendPage(page/employee-result, new VarMap().add(employee, 
results));
  -}
  -
  -public PersistenceBroker getPersistenceBroker() {
  -return 
((PBFactory)getComponent(PBFactory.ROLE)).defaultPersistenceBroker();
   }
   
   public class EmployeeComparator implements Comparator, Continuable {
  
  
  


cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java FormFlow.java PersistenceFlow.java

2004-03-31 Thread stephan
stephan 2004/03/31 05:32:57

  Modified:src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java
FormFlow.java PersistenceFlow.java
  Added:   src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java
FormInstance.java
  Removed: src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java
AbstractFormFlow.java
  Log:
  Using the same OO structure for Forms.
  
  Revision  ChangesPath
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java/FormInstance.java
  
  Index: FormInstance.java
  ===
  /*
   * Copyright 1999-2004 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.
   */
  
  package org.apache.cocoon.forms.flow.java;


 
  import java.util.Locale;


 
  import org.apache.cocoon.components.flow.FlowHelper;
  import org.apache.cocoon.components.flow.java.*;
  import org.apache.cocoon.forms.flow.javascript.FormsFlowHelper;
  import org.apache.cocoon.forms.*;
  import org.apache.cocoon.forms.binding.*;
  import org.apache.cocoon.forms.formmodel.*;
  import org.apache.cocoon.forms.transformation.FormsPipelineConfig;
  import org.apache.excalibur.source.*;
  
  import org.w3c.dom.Element;
  
  /**
   * Implementation of the Cocoon Forms/Java Flow integration.
   *
   * @author a href=http://www.apache.org/~sylvain/;Sylvain Wallez/a
   * @author a href=mailto:[EMAIL PROTECTED]Stephan Michels/a
   * @version CVS $Id: FormInstance.java,v 1.1 2004/03/31 13:32:57 stephan Exp $
   */
  public class FormInstance extends AbstractCocoonFlow {
  
  private Form form;
private Binding binding;
  private Widget formWidget;
private Locale locale;
private boolean isValid;
private String submitId;
private Object validator; // Used?

  /**
   * Create a form, given the URI of its definition file
   */
  public FormInstance(String uri) {
  FormManager formMgr = null;
  SourceResolver resolver = null;
  Source src = null;
  try {
  formMgr = (FormManager)getComponent(FormManager.ROLE);
  resolver = (SourceResolver)getComponent(SourceResolver.ROLE);
  src = resolver.resolveURI(uri);
  this.form = formMgr.createForm(src);
  this.binding = null;
  // this.validator = null;
  // TODO : do we keep this ?
  // this.formWidget = new Widget(this.form); could not create 
instance
  } catch (Exception e) {
  throw new RuntimeException(e.toString());
  } finally {
  releaseComponent(formMgr);
  if (src != null) resolver.release(src);
  releaseComponent(resolver);
  }
}
  
/**
   * Create a form, given the URI of its definition file, the
 * binding file.
   */
public FormInstance(String definitionFile, String bindingFile) {
  this(definitionFile);
createBinding(bindingFile);
}
  
  /**
   * Create a form of an fd:form element in the form of a 
org.w3c.dom.Element
   */
  public FormInstance(Element formDefinition) {
  FormManager formMgr = null;
  SourceResolver resolver = null;
Source src = null;
try {
  formMgr = 
(FormManager)getComponent(FormManager.ROLE);
  resolver = (SourceResolver)getComponent(SourceResolver.ROLE);
Form form = 
formMgr.createForm(formDefinition);
this.binding = null;
// this.formWidget = new Widget(form);  could not 
create instance
// this.local = cocoon.createPageLocal(); PageLocal

cvs commit: cocoon-2.1/src/blocks/javaflow/test - New directory

2004-03-31 Thread stephan
stephan 2004/03/31 06:09:29

  cocoon-2.1/src/blocks/javaflow/test - New directory


cvs commit: cocoon-2.1/src/blocks/javaflow/test/org - New directory

2004-03-31 Thread stephan
stephan 2004/03/31 06:09:41

  cocoon-2.1/src/blocks/javaflow/test/org - New directory


cvs commit: cocoon-2.1/src/blocks/javaflow/test/org/apache - New directory

2004-03-31 Thread stephan
stephan 2004/03/31 06:09:53

  cocoon-2.1/src/blocks/javaflow/test/org/apache - New directory


cvs commit: cocoon-2.1/src/blocks/javaflow/test/org/apache/cocoon - New directory

2004-03-31 Thread stephan
stephan 2004/03/31 06:10:10

  cocoon-2.1/src/blocks/javaflow/test/org/apache/cocoon - New directory


cvs commit: cocoon-2.1/src/blocks/javaflow/test/org/apache/cocoon/components - New directory

2004-03-31 Thread stephan
stephan 2004/03/31 06:10:24

  cocoon-2.1/src/blocks/javaflow/test/org/apache/cocoon/components - New 
directory


cvs commit: cocoon-2.1/src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test - New directory

2004-03-31 Thread stephan
stephan 2004/03/31 06:11:05

  
cocoon-2.1/src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test 
- New directory


cvs commit: cocoon-2.1/src/blocks/javaflow - New directory

2004-03-29 Thread stephan
stephan 2004/03/29 09:15:22

  cocoon-2.1/src/blocks/javaflow - New directory


cvs commit: cocoon-2.1/src/blocks/javaflow/samples - New directory

2004-03-29 Thread stephan
stephan 2004/03/29 09:15:49

  cocoon-2.1/src/blocks/javaflow/samples - New directory


cvs commit: cocoon-2.1/src/blocks/javaflow/java - New directory

2004-03-29 Thread stephan
stephan 2004/03/29 09:15:48

  cocoon-2.1/src/blocks/javaflow/java - New directory


cvs commit: cocoon-2.1/src/blocks/javaflow/samples/forms - New directory

2004-03-29 Thread stephan
stephan 2004/03/29 09:16:12

  cocoon-2.1/src/blocks/javaflow/samples/forms - New directory


cvs commit: cocoon-2.1/src/blocks/javaflow/java/org - New directory

2004-03-29 Thread stephan
stephan 2004/03/29 09:16:12

  cocoon-2.1/src/blocks/javaflow/java/org - New directory


cvs commit: cocoon-2.1/src/blocks/javaflow/samples/screens - New directory

2004-03-29 Thread stephan
stephan 2004/03/29 09:16:12

  cocoon-2.1/src/blocks/javaflow/samples/screens - New directory


cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache - New directory

2004-03-29 Thread stephan
stephan 2004/03/29 09:16:44

  cocoon-2.1/src/blocks/javaflow/java/org/apache - New directory


cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon - New directory

2004-03-29 Thread stephan
stephan 2004/03/29 09:16:57

  cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon - New directory


cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components - New directory

2004-03-29 Thread stephan
stephan 2004/03/29 09:17:17

  cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components - New 
directory


cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/samples/flow - New directory

2004-03-29 Thread stephan
stephan 2004/03/29 09:17:30

  cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/samples/flow - New 
directory


cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow - New directory

2004-03-29 Thread stephan
stephan 2004/03/29 09:17:30

  cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow - New 
directory


cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java - New directory

2004-03-29 Thread stephan
stephan 2004/03/29 09:17:42

  cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java - 
New directory


cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java - New directory

2004-03-29 Thread stephan
stephan 2004/03/29 09:17:42

  cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java - New 
directory


cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/forms - New directory

2004-03-29 Thread stephan
stephan 2004/03/29 09:18:51

  cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/forms - New directory


cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/forms/flow - New directory

2004-03-29 Thread stephan
stephan 2004/03/29 09:19:02

  cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/forms/flow - New 
directory


cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java - New directory

2004-03-29 Thread stephan
stephan 2004/03/29 09:19:14

  cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java - New 
directory


cvs commit: cocoon-2.1/src/blocks/javaflow/samples/screens calculator-a.xml calculator-b.xml calculator-message.xml calculator-operator.xml calculator-result.xml employee-result.xml form1-result.xml form2-result.xml

2004-03-29 Thread stephan
stephan 2004/03/29 09:47:23

  Modified:.gump.xml
   lib  jars.xml
   lib/endorsed xalan-2.6.0.jar
  Added:   lib/core jakarta-bcel-20040329.jar
   src/blocks/javaflow TODO.txt
   src/blocks/javaflow/conf javaflow.xconf javaflow.xsamples
   src/blocks/javaflow/java/org/apache/cocoon/components/flow/java
AbstractCocoonFlow.java Continuable.java
Continuation.java ContinuationCapable.java
ContinuationClassLoader.java
ContinuationContext.java ContinuationStack.java
JavaInterpreter.java VarMap.java VarMapHandler.java
   src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java
AbstractFormFlow.java
   src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java
CalculatorFlow.java FormFlow.java
PersistenceFlow.java
   src/blocks/javaflow/samples sitemap.xmap
   src/blocks/javaflow/samples/forms a-choices.xml
employee-binding.xml employee-template.xml
employee.xml form1-template.xml form1.xml
form2-binding.xml form2-template.xml form2.xml
   src/blocks/javaflow/samples/screens calculator-a.xml
calculator-b.xml calculator-message.xml
calculator-operator.xml calculator-result.xml
employee-result.xml form1-result.xml
form2-result.xml
  Log:
  Intial import of the javaflow block.
  Remove the bcel classes from the xalan.jar and
  create an extra jar for those.
  
  Revision  ChangesPath
  1.137 +21 -1 cocoon-2.1/gump.xml
  
  http://cvs.apache.org/viewcvs/cocoon-2.1/gump.xml.diff?r1=1.136r2=1.137
  
  
  1.196 +11 -1 cocoon-2.1/lib/jars.xml
  
  http://cvs.apache.org/viewcvs/cocoon-2.1/lib/jars.xml.diff?r1=1.195r2=1.196
  
  
  1.1  cocoon-2.1/lib/core/jakarta-bcel-20040329.jar
  
Binary file
  
  
  1.2   +133 -1837 cocoon-2.1/lib/endorsed/xalan-2.6.0.jar
  
Binary file
  
  
  1.1  cocoon-2.1/src/blocks/javaflow/TODO.txt
  
  http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/TODO.txt?rev=1.1
  
  
  1.1  cocoon-2.1/src/blocks/javaflow/conf/javaflow.xconf
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/conf/javaflow.xconf?rev=1.1
  
  
  1.1  cocoon-2.1/src/blocks/javaflow/conf/javaflow.xsamples
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/conf/javaflow.xsamples?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/AbstractCocoonFlow.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/AbstractCocoonFlow.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/Continuable.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/Continuable.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/Continuation.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/Continuation.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationCapable.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationCapable.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationClassLoader.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationClassLoader.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationContext.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationContext.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationStack.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationStack.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/JavaInterpreter.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/JavaInterpreter.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon

cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java CalculatorFlow.java FormFlow.java PersistenceFlow.java

2004-03-29 Thread stephan
stephan 2004/03/29 12:56:14

  Modified:src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java
AbstractFormFlow.java
   src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java
CalculatorFlow.java FormFlow.java
PersistenceFlow.java
  Log:
  Tabs2Spaces, I didn't get VIM to work properly under Debian.
  
  Revision  ChangesPath
  1.2   +14 -14
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java/AbstractFormFlow.java
  
  Index: AbstractFormFlow.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java/AbstractFormFlow.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractFormFlow.java 29 Mar 2004 17:47:22 -  1.1
  +++ AbstractFormFlow.java 29 Mar 2004 20:56:14 -  1.2
  @@ -35,16 +35,16 @@
   //if (localeStr != null)
   //locale = I18nUtils.parseLocale(localeStr, locale);
   
  - SourceResolver resolver = null;
  - FormManager formManager = null;
  +SourceResolver resolver = null;
  +FormManager formManager = null;
   Source source = null;
   Form form = null;
   try {
   resolver = (SourceResolver) getComponent(SourceResolver.ROLE);
  - 
  +  
   source = resolver.resolveURI(formSource);
   
  - formManager = (FormManager) 
getComponent(FormManager.ROLE);
  +formManager = (FormManager) getComponent(FormManager.ROLE);
   form = formManager.createForm(source);
   
   /*if (formHandler != null) {
  @@ -66,8 +66,8 @@
   } finally {
   if (source != null)
   resolver.release(source);
  - releaseComponent(resolver);
  - releaseComponent(formManager);
  +releaseComponent(resolver);
  +releaseComponent(formManager);
   }
   return form;
   }
  @@ -131,26 +131,26 @@
   return widget == null ? null : widget.getId();
   }
   
  - protected String showForm(Form form, String uri) {
  -   return showForm(form, uri, new VarMap());
  - }
  +protected String showForm(Form form, String uri) {
  +return showForm(form, uri, new VarMap());
  +}
   
   protected Binding loadBinding(String bindingURI) {
  -   SourceResolver resolver = null;
  -   BindingManager bindingManager = null;
  +SourceResolver resolver = null;
  +BindingManager bindingManager = null;
   Source source = null;
   Binding binding = null;
   try {
  -   resolver = (SourceResolver) 
getComponent(SourceResolver.ROLE);
  +resolver = (SourceResolver) getComponent(SourceResolver.ROLE);
   source = resolver.resolveURI(bindingURI);
  - bindingManager = 
(BindingManager) getComponent(BindingManager.ROLE);
  +bindingManager = (BindingManager) 
getComponent(BindingManager.ROLE);
   binding = bindingManager.createBinding(source);
   } catch (Exception e) {
   throw new RuntimeException(Cannot load form binding from 
'+bindingURI+', e);
   } finally {
   if (source != null)
   resolver.release(source);
  - releaseComponent(resolver);
  +releaseComponent(resolver);
   releaseComponent(bindingManager);
   }
   return binding;
  
  
  
  1.2   +8 -8  
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java/CalculatorFlow.java
  
  Index: CalculatorFlow.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java/CalculatorFlow.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CalculatorFlow.java   29 Mar 2004 17:47:22 -  1.1
  +++ CalculatorFlow.java   29 Mar 2004 20:56:14 -  1.2
  @@ -33,8 +33,8 @@
   } else if (op.equals(multiply)) {
   sendResult(a, b, op, a * b);
   } else if (op.equals(divide)) {
  -   if (b==0f)
  - sendMessage(Error: 
Cannot divide by zero!);
  +if (b==0f)
  +sendMessage(Error: Cannot divide by zero!);
   sendResult(a, b, op, a / b);
   } else

cvs commit: cocoon-2.1/src/blocks/ojb/java/org/apache/cocoon/ojb/broker/components PBFactoryImpl.java

2004-03-23 Thread stephan
stephan 2004/03/23 11:21:33

  Modified:src/blocks/ojb/java/org/apache/cocoon/ojb/broker/components
PBFactoryImpl.java
  Log:
  Correct indention.
  
  Revision  ChangesPath
  1.3   +24 -31
cocoon-2.1/src/blocks/ojb/java/org/apache/cocoon/ojb/broker/components/PBFactoryImpl.java
  
  Index: PBFactoryImpl.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/ojb/java/org/apache/cocoon/ojb/broker/components/PBFactoryImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PBFactoryImpl.java5 Mar 2004 13:02:01 -   1.2
  +++ PBFactoryImpl.java23 Mar 2004 19:21:33 -  1.3
  @@ -33,47 +33,40 @@
* @author a href=mailto:[EMAIL PROTECTED]Antonio Gallardo/a
* @version CVS $Id$
   */
  -public class PBFactoryImpl extends AbstractOjbImpl implements PBFactory, 
Configurable, Initializable,
  -Disposable, ThreadSafe
  -{
  +public class PBFactoryImpl extends AbstractOjbImpl implements PBFactory, 
Configurable, Initializable, Disposable, ThreadSafe {
  + 
   /* (non-Javadoc)
* @see 
org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
*/
  -public void configure(Configuration myconf) throws ConfigurationException
  -{
  - if (this.getLogger().isDebugEnabled())
  - this.getLogger().debug(OJB-JDO: configuration);
  +public void configure(Configuration myconf) throws 
ConfigurationException {
  +if (this.getLogger().isDebugEnabled())
  +this.getLogger().debug(OJB-JDO: configuration);
   }
   
   /* (non-Javadoc)
* @see org.apache.avalon.framework.activity.Disposable#dispose()
*/
  -public void dispose()
  -{
  +public void dispose() {
   super.dispose();
  - if (this.getLogger().isDebugEnabled())
  - this.getLogger().debug(OJB-PB: Disposed OK!);
  +if (this.getLogger().isDebugEnabled())
  +this.getLogger().debug(OJB-PB: Disposed OK!);
   }
   
  - /* (non-Javadoc)
  -  * @see org.apache.avalon.framework.activity.Initializable#initialize()
  -  */
  - public void initialize() throws Exception
  - {
  -super.initialize();
  - try
  - {
  - if (this.getLogger().isDebugEnabled()) {
  - this.getLogger().debug(OJB-PB: Started OK!);
  -}
  - }
  - catch (Throwable t)
  - {
  - if (this.getLogger().isFatalErrorEnabled()) {
  - this.getLogger().fatalError(OJB-PB: Started 
failed: Cannot create a Persistence Broker Factory.,t);
  - }
  - }
  - }
  +/* (non-Javadoc)
  + * @see org.apache.avalon.framework.activity.Initializable#initialize()
  + */
  +public void initialize() throws Exception {
  +  super.initialize();
  +  try {
  +  if (this.getLogger().isDebugEnabled()) {
  +  this.getLogger().debug(OJB-PB: Started OK!);
  +  }
  +  } catch (Throwable t) {
  +  if (this.getLogger().isFatalErrorEnabled()) {
  +  this.getLogger().fatalError(OJB-PB: Started failed: 
Cannot create a Persistence Broker Factory.,t);
  +  }
  +  }
  +}
   
   /* (non-Javadoc)
* @see 
org.apache.cocoon.ojb.broker.components.PBFactory#defaultPersistenceBroker()
  
  
  


cvs commit: cocoon-2.1/tools/src blocks-build.xsl

2004-03-23 Thread stephan
stephan 2004/03/23 11:23:07

  Modified:tools/src blocks-build.xsl
  Log:
  Allow to share codebase to other blocks.
  
  Revision  ChangesPath
  1.59  +2 -0  cocoon-2.1/tools/src/blocks-build.xsl
  
  Index: blocks-build.xsl
  ===
  RCS file: /home/cvs/cocoon-2.1/tools/src/blocks-build.xsl,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- blocks-build.xsl  20 Mar 2004 17:29:49 -  1.58
  +++ blocks-build.xsl  23 Mar 2004 19:23:06 -  1.59
  @@ -527,6 +527,8 @@
 include name=lib/*.jar/
   /fileset
   pathelement location=${{build.blocks}}/{$block-name}/mocks/
  +pathelement location=${{build.blocks}}/{$block-name}/dest/
  +pathelement location=${{build.blocks}}/{$block-name}/samples/
   xsl:for-each select=$cocoon-block-dependencies
 path 
refid={substring-after(@project,'cocoon-block-')}.classpath/
   /xsl:for-each
  
  
  


cvs commit: cocoon-2.1/src/blocks/profiler/java/org/apache/cocoon/components/profiler ProfilingCachingProcessingPipeline.java ProfilingNonCachingProcessingPipeline.java

2004-03-23 Thread stephan
stephan 2004/03/23 11:48:43

  Modified:src/blocks/profiler/java/org/apache/cocoon/components/profiler
ProfilingCachingProcessingPipeline.java
ProfilingNonCachingProcessingPipeline.java
  Log:
  Add support for internal pipelines, see
  http://issues.apache.org/bugzilla/show_bug.cgi?id=27875
  
  Revision  ChangesPath
  1.7   +49 -1 
cocoon-2.1/src/blocks/profiler/java/org/apache/cocoon/components/profiler/ProfilingCachingProcessingPipeline.java
  
  Index: ProfilingCachingProcessingPipeline.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/profiler/java/org/apache/cocoon/components/profiler/ProfilingCachingProcessingPipeline.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ProfilingCachingProcessingPipeline.java   5 Mar 2004 13:02:20 -   
1.6
  +++ ProfilingCachingProcessingPipeline.java   23 Mar 2004 19:48:43 -  
1.7
  @@ -278,6 +278,54 @@
   }
   
   /**
  + * Process the SAX event pipeline
  + */
  +protected boolean processXMLPipeline(Environment environment) throws 
ProcessingException {
  +this.index = 0;
  +if (this.data!=null) {
  +// Capture environment info
  +this.data.setEnvironmentInfo(new EnvironmentInfo(environment));
  +
  +// Execute pipeline
  +long time = System.currentTimeMillis();
  +boolean result = super.processXMLPipeline(environment);
  +
  +this.data.setTotalTime(System.currentTimeMillis()-time);
  +
  +// Report
  +profiler.addResult(environment.getURI(), this.data);
  +return result;
  +} else {
  +getLogger().warn(Profiler Data havn't any components to 
measure);
  +return super.processXMLPipeline(environment);
  +}
  +}
  +
  +/**
  + * Process the pipeline using a reader.
  + */
  +protected boolean processReader(Environment environment) throws 
ProcessingException {
  +this.index = 0;
  + if (this.data!=null) {
  + // Capture environment info
  + this.data.setEnvironmentInfo(new EnvironmentInfo(environment));
  +
  + // Execute pipeline
  + long time = System.currentTimeMillis();
  + boolean result = super.processReader(environment);
  +
  + this.data.setTotalTime(System.currentTimeMillis()-time);
  +
  + // Report
  + profiler.addResult(environment.getURI(), this.data);
  + return result;
  + } else {
  + getLogger().warn(Profiler Data havn't any components to 
measure);
  + return super.processReader(environment);
  + }
  +}
  +
  +/**
* Connect the next component
*
* @param environment
  
  
  
  1.7   +50 -1 
cocoon-2.1/src/blocks/profiler/java/org/apache/cocoon/components/profiler/ProfilingNonCachingProcessingPipeline.java
  
  Index: ProfilingNonCachingProcessingPipeline.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/profiler/java/org/apache/cocoon/components/profiler/ProfilingNonCachingProcessingPipeline.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ProfilingNonCachingProcessingPipeline.java5 Mar 2004 13:02:20 
-   1.6
  +++ ProfilingNonCachingProcessingPipeline.java23 Mar 2004 19:48:43 
-  1.7
  @@ -272,6 +272,55 @@
   }
   
   /**
  + * Process the SAX event pipeline
  + */
  +protected boolean processXMLPipeline(Environment environment) throws 
ProcessingException {
  +this.index = 0;
  +if (this.data!=null) {
  +// Capture environment info
  +this.data.setEnvironmentInfo(new EnvironmentInfo(environment));
  +
  +// Execute pipeline
  +long time = System.currentTimeMillis();
  +boolean result = super.processXMLPipeline(environment);
  +
  +this.data.setTotalTime(System.currentTimeMillis()-time);
  +
  +// Report
  +profiler.addResult(environment.getURI(), this.data);
  +return result;
  +} else {
  +getLogger().warn(Profiler Data havn't any components to 
measure);
  +return super.processXMLPipeline(environment);
  +}
  +}
  +
  +/**
  + * Process the pipeline using a reader.
  + */
  +protected boolean processReader(Environment environment) throws 
ProcessingException {
  +this.index = 0;
  + if (this.data!=null) {
  + // Capture environment info
  + this.data.setEnvironmentInfo(new EnvironmentInfo(environment));
  +
  + // Execute pipeline

cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/flow/javascript/fom CompilingClassLoader.java

2004-03-23 Thread stephan
stephan 2004/03/23 12:03:15

  Modified:src/java/org/apache/cocoon/components/flow/javascript/fom
CompilingClassLoader.java
  Log:
  fixed indention.
  
  Revision  ChangesPath
  1.9   +122 -124  
cocoon-2.1/src/java/org/apache/cocoon/components/flow/javascript/fom/CompilingClassLoader.java
  
  Index: CompilingClassLoader.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/flow/javascript/fom/CompilingClassLoader.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CompilingClassLoader.java 5 Mar 2004 13:02:46 -   1.8
  +++ CompilingClassLoader.java 23 Mar 2004 20:03:15 -  1.9
  @@ -192,6 +192,7 @@
   baos.flush();
   final Reader reader = 
   new BufferedReader(new InputStreamReader(new 
ByteArrayInputStream(baos.toByteArray(;
  +
   return new JavaSourceReader() {
   public Reader getReader() {
   return reader;
  @@ -220,141 +221,138 @@
   class ClassReaderFactory 
   implements JavaClassReaderFactory {
   
  -public JavaClassReader 
  -getClassReader(final String className) 
  - throws IOException {
  - final byte[] bytes = 
classRepository.getCompiledClass(className);
  - if (bytes != null) {
  - return new JavaClassReader() {
  - public String getClassName() {
  - return className;
  - }
  - 
  - public InputStream getInputStream() {
  - 
  - return new ByteArrayInputStream(bytes);
  - }
  - };
  - }
  -String classFile = className.replace('.', '/') + .class;
  -final InputStream is = getResourceAsStream(classFile);
  -if (is == null) {
  -return null;
  -}
  +public JavaClassReader getClassReader(final String className) 
  +throws IOException {
  +final byte[] bytes = classRepository.getCompiledClass(className);
  +if (bytes != null) {
   return new JavaClassReader() {
  -public String getClassName() {
  -return className;
  -}
  +public String getClassName() {
  +return className;
  +}
  +
  +public InputStream getInputStream() {
  +return new ByteArrayInputStream(bytes);
  +}
  +};
  +}
  +String classFile = className.replace('.', '/') + .class;
  +final InputStream is = getResourceAsStream(classFile);
  +if (is == null) {
  +return null;
  +}
  +return new JavaClassReader() {
  +public String getClassName() {
  +return className;
  +}
   
  -public InputStream getInputStream() {
  -return is;
  -}
  -};
  - }
  - }
  +public InputStream getInputStream() {
  +return is;
  +}
  +};
  +}
  +}
   
  - class ClassWriterFactory 
  - implements JavaClassWriterFactory {
  +class ClassWriterFactory 
  +implements JavaClassWriterFactory {
   
  - public JavaClassWriter 
  - getClassWriter(final String className) {
  - return new JavaClassWriter() {
  - public String 
  - getClassName() {
  - return className;
  - }
  - public void writeClass(InputStream contents) 
  - throws IOException {
  - byte[] buf = new byte[2048];
  - ByteArrayOutputStream s =
  - new ByteArrayOutputStream();
  - int count;
  - while ((count = 
  - contents.read(buf, 0, 
  -   buf.length))  0) {
  - s.write(buf, 0, count);
  - }
  - s.flush();
  - System.out.println(Compiled:  + className);
  -Source src = getSource(className

cvs commit: cocoon-2.1/tools/src/anttasks XConfToolTask.java

2004-03-16 Thread stephan
stephan 2004/03/16 06:23:29

  Modified:tools/src/anttasks XConfToolTask.java
  Log:
  Less verbose.
  
  Revision  ChangesPath
  1.21  +4 -4  cocoon-2.1/tools/src/anttasks/XConfToolTask.java
  
  Index: XConfToolTask.java
  ===
  RCS file: /home/cvs/cocoon-2.1/tools/src/anttasks/XConfToolTask.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- XConfToolTask.java14 Mar 2004 10:34:34 -  1.20
  +++ XConfToolTask.java16 Mar 2004 14:23:28 -  1.21
  @@ -172,7 +172,7 @@
   modified = hasChanged;
   
   if (hasChanged  !suspended.isEmpty()) {
  -log(Try to apply suspended patch files);
  +log(Try to apply suspended patch files, Project.MSG_DEBUG);
   }
   
   ArrayList newSuspended = new ArrayList();
  @@ -198,7 +198,7 @@
   if (!suspended.isEmpty()) {
   for(Iterator i=suspended.iterator(); i.hasNext();) {
   patchfile = (File)i.next();
  -log(Dismiss: +patchfile.toString());
  +log(Dismiss: +patchfile.toString(), Project.MSG_DEBUG);
   }
   }
   
  @@ -273,7 +273,7 @@
   
   // Suspend, because the xpath returned not one node
   if (nodes.getLength() !=1 ) {
  -log(Suspending: +filename);
  +log(Suspending: +filename, Project.MSG_DEBUG);
   return false;
   }
   Node root = nodes.item(0);
  
  
  


cvs commit: cocoon-2.1/tools/targets compile-build.xml webapp-build.xml

2004-03-16 Thread stephan
stephan 2004/03/16 06:27:35

  Modified:tools/src blocks-build.xsl
   tools/targets compile-build.xml webapp-build.xml
  Log:
  Revert changes from 2003/05/05, instead using ANT targets to
  resolve dependencies between patches.
  
  Unnecessary and stupid, IMHO.
  
  Revision  ChangesPath
  1.52  +79 -58cocoon-2.1/tools/src/blocks-build.xsl
  
  Index: blocks-build.xsl
  ===
  RCS file: /home/cvs/cocoon-2.1/tools/src/blocks-build.xsl,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- blocks-build.xsl  11 Mar 2004 15:41:43 -  1.51
  +++ blocks-build.xsl  16 Mar 2004 14:27:35 -  1.52
  @@ -99,6 +99,36 @@
 /xsl:attribute
   /target
   
  +target name=patch
  +  xsl:attribute name=depends
  +xsl:textinit/xsl:text
  +xsl:for-each select=$cocoon-blocks
  +  xsl:text,/xsl:text
  +  xsl:value-of select=concat(@name, '-patch')/
  +/xsl:for-each
  +  /xsl:attribute
  +/target
  + 

  
  +target name=roles
  +  xsl:attribute name=depends
  +xsl:textinit/xsl:text
  +xsl:for-each select=$cocoon-blocks
  +  xsl:text,/xsl:text
  +  xsl:value-of select=concat(@name, '-roles')/
  +/xsl:for-each
  +  /xsl:attribute
  +/target
  +
  +target name=patch-samples
  +  xsl:attribute name=depends
  +xsl:textinit/xsl:text
  +xsl:for-each select=$cocoon-blocks
  +  xsl:text,/xsl:text
  +  xsl:value-of select=concat(@name, '-patch-samples')/
  +/xsl:for-each
  +  /xsl:attribute
  +/target
  +
   target name=samples
 xsl:attribute name=depends
   xsl:textinit,patch-samples/xsl:text
  @@ -226,64 +256,6 @@
   /target
   
   xsl:apply-templates select=$cocoon-blocks/
  -
  -target name=patch-roles depends=init
  -  xpatch file=${{build.dest}}/org/apache/cocoon/cocoon.roles 
srcdir=${{blocks}}
  -xsl:for-each select=$cocoon-blocks
  -  xsl:variable name=block-name 
select=substring-after(@name,'cocoon-block-')/
  -  include name={$block-name}/conf/*.xroles 
unless=unless.exclude.block.{$block-name}/
  -/xsl:for-each
  -  /xpatch
  -/target
  -
  -target name=patch-conf depends=init
  -  xpatch file=${{build.webapp}}/sitemap.xmap srcdir=${{blocks}}
  -xsl:for-each select=$cocoon-blocks
  -  xsl:variable name=block-name 
select=substring-after(@name,'cocoon-block-')/
  -  include name={$block-name}/conf/*.xmap 
unless=unless.exclude.block.{$block-name}/
  -/xsl:for-each
  -  /xpatch
  -  xpatch file=${{build.webapp}}/WEB-INF/cocoon.xconf 
srcdir=${{blocks}} addcomments=true
  -xsl:for-each select=$cocoon-blocks
  -  xsl:variable name=block-name 
select=substring-after(@name,'cocoon-block-')/
  -  include name={$block-name}/conf/*.xconf 
unless=unless.exclude.block.{$block-name}/
  -/xsl:for-each
  -  /xpatch
  -  xpatch file=${{build.webapp}}/WEB-INF/logkit.xconf 
srcdir=${{blocks}}
  -xsl:for-each select=$cocoon-blocks
  -  xsl:variable name=block-name 
select=substring-after(@name,'cocoon-block-')/
  -  include name={$block-name}/conf/*.xlog 
unless=unless.exclude.block.{$block-name}/
  -/xsl:for-each
  -  /xpatch
  -  xpatch file=${{build.webapp}}/WEB-INF/web.xml srcdir=${{blocks}}
  -xsl:for-each select=$cocoon-blocks
  -  xsl:variable name=block-name 
select=substring-after(@name,'cocoon-block-')/
  -  include name={$block-name}/conf/*.xweb 
unless=unless.exclude.block.{$block-name}/
  -/xsl:for-each
  -  /xpatch
  -/target
  -
  -target name=patch-samples depends=init
  -  xpatch file=${{build.webapp}}/samples/block-samples.xml 
srcdir=${{blocks}}
  -xsl:for-each select=$cocoon-blocks
  -  xsl:variable name=block-name 
select=substring-after(@name,'cocoon-block-')/
  -  include name={$block-name}/conf/*.xsamples 
unless=unless.exclude.block.{$block-name}/
  -/xsl:for-each
  -  /xpatch
  -  xpatch file=${{build.webapp}}/samples/sitemap.xmap 
srcdir=${{blocks}}
  -xsl:for-each select=$cocoon-blocks
  -  xsl:variable name=block-name 
select=substring-after(@name,'cocoon-block-')/
  -  include name={$block-name}/conf/*.samplesxpipe 
unless=unless.exclude.block.{$block-name}/
  -/xsl:for-each
  -  /xpatch
  -  xpatch file=${{build.webapp}}/WEB-INF/cocoon.xconf 
srcdir=${{blocks}}
  -xsl:for-each select=$cocoon-blocks
  -  xsl:variable name=block-name 
select=substring-after(@name,'cocoon-block

cvs commit: cocoon-2.1/tools/src/anttasks XConfToolTask.java

2004-03-14 Thread stephan
stephan 2004/03/14 02:34:34

  Modified:tools/src/anttasks XConfToolTask.java
  Log:
  Minor bug: The destination file is not modified, if no patch
  file in the second run was applied.
  
  Revision  ChangesPath
  1.20  +5 -3  cocoon-2.1/tools/src/anttasks/XConfToolTask.java
  
  Index: XConfToolTask.java
  ===
  RCS file: /home/cvs/cocoon-2.1/tools/src/anttasks/XConfToolTask.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- XConfToolTask.java11 Mar 2004 15:13:02 -  1.19
  +++ XConfToolTask.java14 Mar 2004 10:34:34 -  1.20
  @@ -151,10 +151,11 @@
   
   DirectoryScanner scanner = getDirectoryScanner(this.srcdir);
   String[] list = scanner.getIncludedFiles();
  -boolean hasChanged = false;
  +boolean modified = false;
   // process recursive
   File patchfile;
   ArrayList suspended = new ArrayList();
  +boolean hasChanged = false;
   for (int i = 0; i  list.length; i++) {
   patchfile = new File(this.srcdir, list[i]);
   try {
  @@ -168,6 +169,7 @@
   log(Ignoring: +patchfile+\n(not a valid XML));
   }
   }
  +modified = hasChanged;
   
   if (hasChanged  !suspended.isEmpty()) {
   log(Try to apply suspended patch files);
  @@ -200,7 +202,7 @@
   }
   }
   
  -if (hasChanged) {
  +if (modified) {
   log(Writing:  + this.file);
   // Set the DOCTYPE output option on the transformer 
   // if we have any DOCTYPE declaration in the input xml 
document
  
  
  


cvs commit: cocoon-2.1/src/blocks/ojb/samples sitemap.xmap

2004-03-14 Thread stephan
stephan 2004/03/14 03:13:09

  Modified:src/blocks/ojb/samples sitemap.xmap
  Log:
  Sync the ojb example with the latest change of the forms block.
  
  Revision  ChangesPath
  1.8   +10 -10cocoon-2.1/src/blocks/ojb/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/ojb/samples/sitemap.xmap,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- sitemap.xmap  11 Mar 2004 16:59:50 -  1.7
  +++ sitemap.xmap  14 Mar 2004 11:13:09 -  1.8
  @@ -19,15 +19,15 @@
   
map:components
   
  -   map:transformers default=xalan
  - map:transformer name=i18n 
src=org.apache.cocoon.transformation.I18nTransformer
  -   catalogues default=forms
  - catalogue id=other name=OtherMessages location=messages/
  - catalogue id=forms name=FormMessages location=messages/
  -   /catalogues
  -   cache-at-startuptrue/cache-at-startup
  - /map:transformer
  -   /map:transformers
  +  map:transformers default=xalan
  +map:transformer name=i18n 
src=org.apache.cocoon.transformation.I18nTransformer
  +  catalogues default=form
  +catalogue id=other name=OtherMessages 
location=context://samples/forms/messages/
  +catalogue id=form name=FormMessages 
location=context://samples/forms/messages/
  +  /catalogues
  +  cache-at-startuptrue/cache-at-startup
  +/map:transformer
  +  /map:transformers
   
/map:components
   
  @@ -79,7 +79,7 @@
   --
   
   map:match pattern=jdo/forms/employee
  -map:call function=forms
  +map:call function=handleForm
   map:parameter name=function value=employeeform_jdo/
   map:parameter name=form-definition 
value=forms/employee.xml/
   map:parameter name=bindingURI 
value=forms/employee_bind.xml/
  
  
  


cvs commit: cocoon-2.1/src/blocks/forms/samples sitemap.xmap

2004-03-11 Thread stephan
stephan 2004/03/11 03:23:37

  Modified:src/blocks/forms/samples sitemap.xmap
  Added:   src/blocks/forms/conf forms-generator.xmap
forms-transformator.xmap
  Log:
  Move generator and transformer declarations into patch files, to
  make them available to other blocks.
  
  Revision  ChangesPath
  1.1  cocoon-2.1/src/blocks/forms/conf/forms-generator.xmap
  
  Index: forms-generator.xmap
  ===
  ?xml version=1.0?
  !--
Copyright 1999-2004 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.
  --
  xmap xpath=/sitemap/components/generators unless=[EMAIL 
PROTECTED]'form']
  map:generator name=form logger=forms
 src=org.apache.cocoon.forms.generation.FormGenerator/
  /xmap
  
  
  
  1.1  cocoon-2.1/src/blocks/forms/conf/forms-transformator.xmap
  
  Index: forms-transformator.xmap
  ===
  ?xml version=1.0?
  !--
Copyright 1999-2004 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.
  --
  xmap xpath=/sitemap/components/transformers unless=[EMAIL 
PROTECTED]'form']
  map:transformer name=form logger=forms
   
src=org.apache.cocoon.forms.transformation.FormTemplateTransformer/
  /xmap
  
  
  
  1.3   +0 -10 cocoon-2.1/src/blocks/forms/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/samples/sitemap.xmap,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sitemap.xmap  11 Mar 2004 02:56:33 -  1.2
  +++ sitemap.xmap  11 Mar 2004 11:23:36 -  1.3
  @@ -19,13 +19,7 @@
   
map:components
   
  -  map:generators default=file   
  -map:generator name=form 
src=org.apache.cocoon.forms.generation.FormGenerator logger=forms/
  -map:generator name=jx 
src=org.apache.cocoon.generation.JXTemplateGenerator label=content 
logger=sitemap.generator.jx/
  -  /map:generators
  -
 map:transformers default=xalan
  -map:transformer name=form 
src=org.apache.cocoon.forms.transformation.FormTemplateTransformer 
logger=forms/
   map:transformer name=i18n 
src=org.apache.cocoon.transformation.I18nTransformer
 catalogues default=forms
   catalogue id=other name=OtherMessages location=messages/
  @@ -44,10 +38,6 @@
   map:action name=init-form 
src=org.apache.cocoon.forms.samples.InitForm1Action logger=forms/
   map:action name=handle-form-submit 
src=org.apache.cocoon.forms.acting.HandleFormSubmitAction logger=forms/
 /map:actions
  -
  -  map:pipes default=caching
  -  /map:pipes
  -
/map:components
   
map:views
  
  
  


cvs commit: cocoon-2.1/tools/src/anttasks XConfToolTask.java

2004-03-11 Thread stephan
stephan 2004/03/11 07:11:10

  Modified:tools/src/anttasks XConfToolTask.java
  Log:
  Retry to apply patches, which depends on each other.
  
  Revision  ChangesPath
  1.18  +62 -20cocoon-2.1/tools/src/anttasks/XConfToolTask.java
  
  Index: XConfToolTask.java
  ===
  RCS file: /home/cvs/cocoon-2.1/tools/src/anttasks/XConfToolTask.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- XConfToolTask.java10 Mar 2004 13:33:03 -  1.17
  +++ XConfToolTask.java11 Mar 2004 15:11:10 -  1.18
  @@ -41,6 +41,8 @@
   import java.io.File;
   import java.io.IOException;
   import java.net.UnknownHostException;
  +import java.util.ArrayList;
  +import java.util.Iterator;
   
   /**
* Ant task to patch xmlfiles.
  @@ -74,6 +76,9 @@
   private boolean addComments;
   /** for resolving entities such as dtds */
   private XMLCatalog xmlCatalog = new XMLCatalog();
  + private DocumentBuilderFactory builderFactory;
  +private DocumentBuilder builder;
  +private Transformer transformer;
   
   /**
* Set file, which should be patched.
  @@ -126,15 +131,15 @@
   throw new BuildException(file attribute is required, location);
   }
   try {
  -final DocumentBuilderFactory builderFactory = 
DocumentBuilderFactory.newInstance();
  +builderFactory = DocumentBuilderFactory.newInstance();
   builderFactory.setValidating(false);
   builderFactory.setExpandEntityReferences(false);
   builderFactory.setNamespaceAware(false);
   builderFactory.setAttribute(
   
http://apache.org/xml/features/nonvalidating/load-external-dtd;,
   Boolean.FALSE);
  -final DocumentBuilder builder = 
builderFactory.newDocumentBuilder();
  -final Transformer transformer = 
TransformerFactory.newInstance().newTransformer();
  +builder = builderFactory.newDocumentBuilder();
  +transformer = TransformerFactory.newInstance().newTransformer();
   
   // load xml
   log(Reading:  + this.file, Project.MSG_DEBUG);
  @@ -149,18 +154,52 @@
   boolean hasChanged = false;
   // process recursive
   File patchfile;
  + ArrayList suspended = new 
ArrayList();
   for (int i = 0; i  list.length; i++) {
   patchfile = new File(this.srcdir, list[i]);
   try {
   // Adds configuration snippet from the file to the 
configuration
  -hasChanged |= patch(document,
  -
builder.parse(patchfile.toURL().toExternalForm()),
  -patchfile.toString());
  + 
boolean changed = patch(document, patchfile);
  +hasChanged |= changed;
  + 
if (!changed) {
  + 
suspended.add(patchfile);
  + 
}
   } catch (SAXException e) {
   log(Ignoring: +patchfile+\n(not a valid XML));
   }
   }
   
  + if (hasChanged  
!suspended.isEmpty()) {
  + log(Try to apply suspended 
patch files);
  + }
  +
  + ArrayList newSuspended = new 
ArrayList();
  + while (hasChanged  
!suspended.isEmpty()) {
  +   hasChanged = false;
  +   for(Iterator 
i=suspended.iterator(); i.hasNext();) {
  +   
patchfile = (File)i.next();
  + try {
  + 
// Adds configuration snippet from the file to the configuration
  + 
boolean changed = patch(document, patchfile);
  +   hasChanged |= changed;
  +   if (!changed) {
  +newSuspended.add(patchfile);
  + }
  + } catch (SAXException e) {
  + 
  log

cvs commit: cocoon-2.1/tools/src/anttasks XConfToolTask.java

2004-03-11 Thread stephan
stephan 2004/03/11 07:13:02

  Modified:tools/src/anttasks XConfToolTask.java
  Log:
  Replace tab by two spaces.
  
  Revision  ChangesPath
  1.19  +39 -39cocoon-2.1/tools/src/anttasks/XConfToolTask.java
  
  Index: XConfToolTask.java
  ===
  RCS file: /home/cvs/cocoon-2.1/tools/src/anttasks/XConfToolTask.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- XConfToolTask.java11 Mar 2004 15:11:10 -  1.18
  +++ XConfToolTask.java11 Mar 2004 15:13:02 -  1.19
  @@ -76,7 +76,7 @@
   private boolean addComments;
   /** for resolving entities such as dtds */
   private XMLCatalog xmlCatalog = new XMLCatalog();
  - private DocumentBuilderFactory builderFactory;
  +private DocumentBuilderFactory builderFactory;
   private DocumentBuilder builder;
   private Transformer transformer;
   
  @@ -154,51 +154,51 @@
   boolean hasChanged = false;
   // process recursive
   File patchfile;
  - ArrayList suspended = new 
ArrayList();
  +ArrayList suspended = new ArrayList();
   for (int i = 0; i  list.length; i++) {
   patchfile = new File(this.srcdir, list[i]);
   try {
   // Adds configuration snippet from the file to the 
configuration
  - 
boolean changed = patch(document, patchfile);
  +boolean changed = patch(document, patchfile);
   hasChanged |= changed;
  - 
if (!changed) {
  - 
suspended.add(patchfile);
  - 
}
  +if (!changed) {
  +suspended.add(patchfile);
  +}
   } catch (SAXException e) {
   log(Ignoring: +patchfile+\n(not a valid XML));
   }
   }
   
  - if (hasChanged  
!suspended.isEmpty()) {
  - log(Try to apply suspended 
patch files);
  - }
  -
  - ArrayList newSuspended = new 
ArrayList();
  - while (hasChanged  
!suspended.isEmpty()) {
  -   hasChanged = false;
  -   for(Iterator 
i=suspended.iterator(); i.hasNext();) {
  -   
patchfile = (File)i.next();
  - try {
  - 
// Adds configuration snippet from the file to the configuration
  - 
boolean changed = patch(document, patchfile);
  -   hasChanged |= changed;
  -   if (!changed) {
  +if (hasChanged  !suspended.isEmpty()) {
  +log(Try to apply suspended patch files);
  +}
  +
  +ArrayList newSuspended = new ArrayList();
  +while (hasChanged  !suspended.isEmpty()) {
  +hasChanged = false;
  +for(Iterator i=suspended.iterator(); i.hasNext();) {
  +patchfile = (File)i.next();
  +try {
  + // Adds configuration snippet from the file to the 
configuration
  +boolean changed = patch(document, patchfile);
  +hasChanged |= changed;
  +if (!changed) {
   newSuspended.add(patchfile);
  - }
  - } catch (SAXException e) {
  - 
  log(Ignoring: +patchfile+\n(not a valid XML));
  - 
}
  -   }
  - suspended = newSuspended;
  - newSuspended = 
new ArrayList();
  - }
  +}
  +} catch (SAXException e) {
  +log(Ignoring: +patchfile+\n(not a valid XML

cvs commit: cocoon-2.1/tools/src blocks-build.xsl

2004-03-11 Thread stephan
stephan 2004/03/11 07:41:43

  Modified:tools/src blocks-build.xsl
  Log:
  Apply all xconf file in one shoot.
  
  Revision  ChangesPath
  1.51  +5 -7  cocoon-2.1/tools/src/blocks-build.xsl
  
  Index: blocks-build.xsl
  ===
  RCS file: /home/cvs/cocoon-2.1/tools/src/blocks-build.xsl,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- blocks-build.xsl  10 Mar 2004 09:44:34 -  1.50
  +++ blocks-build.xsl  11 Mar 2004 15:41:43 -  1.51
  @@ -241,16 +241,14 @@
   xsl:for-each select=$cocoon-blocks
 xsl:variable name=block-name 
select=substring-after(@name,'cocoon-block-')/
 include name={$block-name}/conf/*.xmap 
unless=unless.exclude.block.{$block-name}/
  -  include name={$block-name}/conf/*.xpipe 
unless=unless.exclude.block.{$block-name}/
   /xsl:for-each
 /xpatch
  - !-- This is much slower, but preserves the dependencies --
  -  xsl:for-each select=$cocoon-blocks
  -xsl:variable name=block-name 
select=substring-after(@name,'cocoon-block-')/
  -xpatch file=${{build.webapp}}/WEB-INF/cocoon.xconf 
srcdir=${{blocks}} addcomments=true
  +  xpatch file=${{build.webapp}}/WEB-INF/cocoon.xconf 
srcdir=${{blocks}} addcomments=true
  +xsl:for-each select=$cocoon-blocks
  +  xsl:variable name=block-name 
select=substring-after(@name,'cocoon-block-')/
 include name={$block-name}/conf/*.xconf 
unless=unless.exclude.block.{$block-name}/
  -/xpatch
  -  /xsl:for-each
  +/xsl:for-each
  +  /xpatch
 xpatch file=${{build.webapp}}/WEB-INF/logkit.xconf 
srcdir=${{blocks}}
   xsl:for-each select=$cocoon-blocks
 xsl:variable name=block-name 
select=substring-after(@name,'cocoon-block-')/
  
  
  


cvs commit: cocoon-2.1/src/webapp/samples/slides sitemap.xmap

2004-03-11 Thread stephan
stephan 2004/03/11 08:25:50

  Modified:.gump.xml
   src/blocks/apples/samples sitemap.xmap
   src/blocks/axis/samples sitemap.xmap
   src/blocks/cron/samples sitemap.xmap
   src/blocks/databases/samples sitemap.xmap
   src/blocks/databases/samples/mod-db sitemap.xmap
   src/blocks/databases/samples/org-db sitemap.xmap
   src/blocks/databases/samples/transform sitemap.xmap
   src/blocks/databases/samples/tutorial sitemap.xmap
   src/blocks/databases/samples/xsp sitemap.xmap
   src/blocks/deli/samples sitemap.xmap
   src/blocks/eventcache/samples sitemap.xmap
   src/blocks/forms/samples sitemap.xmap
   src/blocks/forms/samples/forms sitemap.xmap
   src/blocks/forms/samples/v2 sitemap.xmap
   src/blocks/html/conf tidy.xmap
   src/blocks/jms/samples/database sitemap.xmap
   src/blocks/jsp/samples sitemap.xmap
   src/blocks/jxforms/samples sitemap.xmap
   src/blocks/linkrewriter/samples sitemap.xmap
   src/blocks/linkrewriter/samples/bookdemo sitemap.xmap
   src/blocks/linkrewriter/samples/sitedemo sitemap.xmap
   src/blocks/lucene/samples sitemap.xmap
   src/blocks/mail/samples/mail sitemap.xmap
   src/blocks/mail/samples/sendmail sitemap.xmap
   src/blocks/midi/samples sitemap.xmap
   src/blocks/petstore/samples sitemap.xmap
   src/blocks/poi/samples sitemap.xmap
   src/blocks/portal-fw/samples sitemap.xmap
   src/blocks/profiler/samples sitemap.xmap
   src/blocks/scratchpad/samples/betwixt sitemap.xmap
   src/blocks/scratchpad/samples/castor sitemap.xmap
   src/blocks/scratchpad/samples/image-auth sitemap.xmap
   src/blocks/scratchpad/samples/jelly sitemap.xmap
   src/blocks/scratchpad/samples/othello sitemap.xmap
   src/blocks/scratchpad/samples/sitemap-viewer sitemap.xmap
   src/blocks/slide/samples sitemap.xmap
   src/blocks/swf/samples sitemap.xmap
   src/blocks/web3/samples sitemap.xmap
   src/blocks/webdav/samples sitemap.xmap
   src/blocks/xmlform/samples sitemap.xmap
   
src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/java
form-validator.xsl
   src/blocks/xsp/samples sitemap.xmap
   src/webapp sitemap.xmap
   src/webapp/samples/filter sitemap.xmap
   src/webapp/samples/imagereader sitemap.xmap
   src/webapp/samples/paginator sitemap.xmap
   src/webapp/samples/protected sitemap.xmap
   src/webapp/samples/simpleform/four sitemap.xmap
   src/webapp/samples/simpleform/one sitemap.xmap
   src/webapp/samples/simpleform/three sitemap.xmap
   src/webapp/samples/simpleform/two sitemap.xmap
   src/webapp/samples/slides sitemap.xmap
  Added:   src/blocks/asciiart/conf asciiart-generator.xmap
   src/blocks/scratchpad/conf regex-matcher.xmap
  Log:
  One declaration of a sitemap component should be enough.
  I try to reduce the maintenance costs.
  
  Revision  ChangesPath
  1.125 +2 -1  cocoon-2.1/gump.xml
  
  Index: gump.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/gump.xml,v
  retrieving revision 1.124
  retrieving revision 1.125
  diff -u -r1.124 -r1.125
  --- gump.xml  11 Mar 2004 00:12:11 -  1.124
  +++ gump.xml  11 Mar 2004 16:25:46 -  1.125
  @@ -695,6 +695,7 @@
   
   depend project=cocoon inherit=all/
   depend project=cocoon-block-asciiart/
  +depend project=cocoon-block-scratchpad/
   depend project=javamail/
   depend project=jaf/
   
  
  
  
  1.7   +1 -7  cocoon-2.1/src/blocks/apples/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/apples/samples/sitemap.xmap,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- sitemap.xmap  6 Mar 2004 02:26:12 -   1.6
  +++ sitemap.xmap  11 Mar 2004 16:25:46 -  1.7
  @@ -26,7 +26,6 @@
 map:components
   map:generators default=file
 map:generator name=woody 
src=org.apache.cocoon.woody.generation.WoodyGenerator logger=woody/
  -  map:generator name=jx 
src=org.apache.cocoon.generation.JXTemplateGenerator label=content,data 
logger=sitemap.generator.jx/
   /map:generators
   map:transformers default=xalan
 map:transformer name=woody 
src=org.apache.cocoon.woody.transformation.WoodyTemplateTransformer 
logger=woody/
  @@ -38,11 +37,6 @@
   cache

cvs commit: cocoon-2.1/src/blocks/ojb/samples/forms - New directory

2004-03-11 Thread stephan
stephan 2004/03/11 08:57:57

  cocoon-2.1/src/blocks/ojb/samples/forms - New directory


cvs commit: cocoon-2.1/src/blocks/ojb/samples/woody employee.js employee.xml employee_bind.xml employee_template.xml success.xsp

2004-03-11 Thread stephan
stephan 2004/03/11 08:59:51

  Modified:src/blocks/ojb/conf ojb.xsamples
   src/blocks/ojb/samples sitemap.xmap welcome.xml
  Added:   src/blocks/ojb/samples/forms employee.js employee.xml
employee_bind.xml employee_template.xml success.xsp
  Removed: src/blocks/ojb/samples/woody employee.js employee.xml
employee_bind.xml employee_template.xml success.xsp
  Log:
  Update ojb block to cforms, but seems not to work:
  PersistenceBrokerException: Cannot get Connection from DataSource named null
  
  Revision  ChangesPath
  1.4   +4 -0  cocoon-2.1/src/blocks/ojb/conf/ojb.xsamples
  
  Index: ojb.xsamples
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/ojb/conf/ojb.xsamples,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ojb.xsamples  6 Mar 2004 02:25:38 -   1.3
  +++ ojb.xsamples  11 Mar 2004 16:59:50 -  1.4
  @@ -18,6 +18,10 @@
   xsamples xpath=/samples unless=[EMAIL PROTECTED]'OJB']
   
 group name=OJB
  +note
  +  For the examples of this block to work, you need to download
  +  the Java Data Objects (JDO) Reference Implementation from java.sun.com 
.
  +/note
   sample name=OJB href=ojb/
 Apache Object/Relational Bridge.
   /sample
  
  
  
  1.7   +24 -28cocoon-2.1/src/blocks/ojb/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/ojb/samples/sitemap.xmap,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- sitemap.xmap  6 Mar 2004 02:26:13 -   1.6
  +++ sitemap.xmap  11 Mar 2004 16:59:50 -  1.7
  @@ -19,19 +19,15 @@
   
map:components
   
  -  map:transformers default=xalan
  -map:transformer name=woody 
src=org.apache.cocoon.woody.transformation.WoodyTemplateTransformer 
logger=woody/
  -map:transformer name=i18n 
src=org.apache.cocoon.transformation.I18nTransformer
  -  catalogues default=other
  -catalogue id=other name=OtherMessages 
location=context://samples/woody/messages/
  -catalogue id=woody name=WoodyMessages 
location=context://samples/woody/messages/
  -  /catalogues
  -  cache-at-startuptrue/cache-at-startup
  -/map:transformer
  -  /map:transformers
  -
  -  map:pipes default=caching
  -  /map:pipes
  +   map:transformers default=xalan
  + map:transformer name=i18n 
src=org.apache.cocoon.transformation.I18nTransformer
  +   catalogues default=forms
  + catalogue id=other name=OtherMessages location=messages/
  + catalogue id=forms name=FormMessages location=messages/
  +   /catalogues
  +   cache-at-startuptrue/cache-at-startup
  + /map:transformer
  +   /map:transformers
   
/map:components
   
  @@ -52,7 +48,7 @@
   
 !-- indicates what flowscript to attach to this sitemap --
 map:flow language=javascript
  - map:script src=woody/employee.js/
  +  map:script src=forms/employee.js/
 /map:flow
   
map:pipelines
  @@ -79,48 +75,48 @@
/map:match
   
!--
  -| Form1 example, demonstrates usage of flow and woody
  +| Form1 example, demonstrates usage of flow and forms
   --
   
  -map:match pattern=jdo/woody/employee
  -map:call function=woody
  +map:match pattern=jdo/forms/employee
  +map:call function=forms
   map:parameter name=function value=employeeform_jdo/
  -map:parameter name=form-definition 
value=woody/employee.xml/
  -map:parameter name=bindingURI 
value=woody/employee_bind.xml/
  +map:parameter name=form-definition 
value=forms/employee.xml/
  +map:parameter name=bindingURI 
value=forms/employee_bind.xml/
   /map:call
   /map:match
   
  -map:match pattern=jdo/woody/employee-form-display
  -map:generate src=woody/employee_template.xml/
  -map:transform type=woody/
  +map:match pattern=jdo/forms/employee-form-display
  +map:generate src=forms/employee_template.xml/
  +map:transform type=form/
   map:transform type=i18n
   map:parameter name=locale value=en-US/
   /map:transform
  -map:transform 
src=context://samples/woody/xsl/html/woody-default.xsl/
  +map:transform 
src=context://samples/forms/xsl/html/forms-default.xsl/
   map:transform 
src=context://samples/common/style/xsl/html/simple-page2html.xsl
   map:parameter name=contextPath value={request:contextPath}/
   map:parameter name=servletPath value={request:servletPath}/
   map:parameter name=sitemapURI value={request:sitemapURI}/
  -map:parameter name=file value=woody

cvs commit: cocoon-2.1/src/blocks/apples/samples sitemap.xmap welcome.xml

2004-03-11 Thread stephan
stephan 2004/03/11 09:12:15

  Modified:
src/blocks/apples/java/org/apache/cocoon/components/flow/apples/samples
BindingWoodyApple.java
   src/blocks/apples/samples sitemap.xmap welcome.xml
  Log:
  woody - cforms
  
  Revision  ChangesPath
  1.9   +2 -1  
cocoon-2.1/src/blocks/apples/java/org/apache/cocoon/components/flow/apples/samples/BindingWoodyApple.java
  
  Index: BindingWoodyApple.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/apples/java/org/apache/cocoon/components/flow/apples/samples/BindingWoodyApple.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- BindingWoodyApple.java9 Mar 2004 10:21:28 -   1.8
  +++ BindingWoodyApple.java11 Mar 2004 17:12:13 -  1.9
  @@ -41,6 +41,7 @@
   import org.apache.cocoon.forms.binding.Binding;
   import org.apache.cocoon.forms.binding.BindingManager;
   import org.apache.cocoon.forms.formmodel.Form;
  +import org.apache.cocoon.forms.transformation.FormPipelineConfig;
   import org.apache.cocoon.xml.dom.DOMStreamer;
   import org.apache.excalibur.source.ModifiableSource;
   import org.apache.excalibur.source.Source;
  @@ -194,7 +195,7 @@
   if (this.wrapperContextMap == null) {
   if (this.form != null) {
   this.wrapperContextMap = new HashMap();
  -this.wrapperContextMap.put(woody-form, this.form);
  +this.wrapperContextMap.put(FormPipelineConfig.COCOONFORM, 
this.form);
   }
   }
   return this.wrapperContextMap;
  
  
  
  1.8   +10 -14cocoon-2.1/src/blocks/apples/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/apples/samples/sitemap.xmap,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- sitemap.xmap  11 Mar 2004 16:25:46 -  1.7
  +++ sitemap.xmap  11 Mar 2004 17:12:14 -  1.8
  @@ -24,15 +24,11 @@
   map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0;
 
 map:components
  -map:generators default=file
  -  map:generator name=woody 
src=org.apache.cocoon.woody.generation.WoodyGenerator logger=woody/
  -/map:generators
   map:transformers default=xalan
  -  map:transformer name=woody 
src=org.apache.cocoon.woody.transformation.WoodyTemplateTransformer 
logger=woody/
 map:transformer name=i18n 
src=org.apache.cocoon.transformation.I18nTransformer
  -catalogues default=other
  -  catalogue id=other name=OtherMessages 
location=context://samples/woody/messages/
  -  catalogue id=woody name=WoodyMessages 
location=context://samples/woody/messages/
  +catalogues default=forms
  +  catalogue id=other name=OtherMessages location=messages/
  +  catalogue id=forms name=FormMessages location=messages/
   /catalogues
   cache-at-startuptrue/cache-at-startup
 /map:transformer
  @@ -91,16 +87,16 @@
   
   
 !--+
  -  |   Binding form sample, reuses pipelines stolen from woody
  +  |   Binding form sample, reuses pipelines stolen from Cocoon Forms
 +--
   
 map:match pattern=form2xml.flow
   map:call 
function=org.apache.cocoon.components.flow.apples.samples.BindingWoodyApple
  -  map:parameter name=form-src 
value=context://samples/woody/forms/form2_model.xml/
  -  map:parameter name=binding-src 
value=context://samples/woody/forms/form2_bind_xml.xml/
  -  map:parameter name=documentURI 
value=context://samples/woody/forms/form2_data.xml/
  -  map:parameter name=form-pipe 
value=/samples/woody/form2-display-pipeline/
  -  map:parameter name=valid-pipe 
value=/samples/woody/form2-success-pipeline/
  +  map:parameter name=form-src 
value=context://samples/forms/forms/form2_model.xml/
  +  map:parameter name=binding-src 
value=context://samples/forms/forms/form2_bind_xml.xml/
  +  map:parameter name=documentURI 
value=context://samples/forms/forms/form2_data.xml/
  +  map:parameter name=form-pipe 
value=/samples/forms/form2-display-pipeline/
  +  map:parameter name=valid-pipe 
value=/samples/forms/form2-success-pipeline/
   /map:call
 /map:match
   
  
  
  
  1.4   +4 -4  cocoon-2.1/src/blocks/apples/samples/welcome.xml
  
  Index: welcome.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/apples/samples/welcome.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- welcome.xml   6 Mar 2004 02:26:12 -   1.3
  +++ welcome.xml   11 Mar 2004 17:12:14 -  1.4
  @@ -29,10 +29,10 @@
/group
   
group name=Apples Samples
  -  sample name

cvs commit: cocoon-2.1 gump.xml

2004-03-10 Thread stephan
stephan 2004/03/10 00:25:34

  Modified:.gump.xml
  Log:
  Remove entry for precept block.
  
  Revision  ChangesPath
  1.120 +1 -20 cocoon-2.1/gump.xml
  
  Index: gump.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/gump.xml,v
  retrieving revision 1.119
  retrieving revision 1.120
  diff -u -r1.119 -r1.120
  --- gump.xml  9 Mar 2004 15:11:16 -   1.119
  +++ gump.xml  10 Mar 2004 08:25:34 -  1.120
  @@ -349,25 +349,6 @@
   nag from=Gump to=dev@cocoon.apache.org/
 /project
   
  -  project name=cocoon-block-precept status=unstable
  -packageorg.apache.cocoon/package
  -
  -ant target=gump-block
  -  property name=block-name value=precept/
  -  property name=version value=@@DATE@@/
  -/ant
  -
  -depend project=cocoon inherit=all/
  -depend project=castor/
  -
  -work nested=tools/anttasks/
  -home nested=build/cocoon-@@DATE@@/
  -
  -jar name=blocks/precept-block.jar/
  -
  -nag from=Gump to=dev@cocoon.apache.org/
  -  /project
  -
 project name=cocoon-block-poi status=stable
   packageorg.apache.cocoon/package
   
  
  
  


cvs commit: cocoon-2.1/src/blocks/forms/test/org/apache/cocoon/forms/datatype/convertor EnumConvertorBuilderTestCase.java EnumConvertorTestCase.conf.xml EnumConvertorTestCase.java

2004-03-10 Thread stephan
stephan 2004/03/10 01:13:22

  Modified:src/blocks/forms/test/org/apache/cocoon/forms/datatype
DynamicSelectionListTestCase.dest.xml
DynamicSelectionListTestCase.java
DynamicSelectionListTestCase.source.xml
DynamicSelectionListTestCase.xtest
EnumSelectionListTestCase.dest-no-null.xml
EnumSelectionListTestCase.dest.xml
EnumSelectionListTestCase.java
EnumSelectionListTestCase.xtest
FlowJXPathSelectionListTestCase.dest.xml
FlowJXPathSelectionListTestCase.java
FlowJXPathSelectionListTestCase.source.xml
FlowJXPathSelectionListTestCase.xtest
FlowJXPathSelectionListTestCaseWithNull.dest.xml
   src/blocks/forms/test/org/apache/cocoon/forms/datatype/convertor
EnumConvertorBuilderTestCase.java
EnumConvertorTestCase.conf.xml
EnumConvertorTestCase.java
  Log:
  woody - forms
  
  Revision  ChangesPath
  1.2   +5 -5  
cocoon-2.1/src/blocks/forms/test/org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.dest.xml
  
  Index: DynamicSelectionListTestCase.dest.xml
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/forms/test/org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.dest.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DynamicSelectionListTestCase.dest.xml 9 Mar 2004 13:03:10 -   
1.1
  +++ DynamicSelectionListTestCase.dest.xml 10 Mar 2004 09:13:22 -  
1.2
  @@ -3,7 +3,7 @@
 Copyright 1999-2004 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 not use this file except in compliance fith the License.
 You may obtain a copy of the License at
   
 http://www.apache.org/licenses/LICENSE-2.0
  @@ -14,8 +14,8 @@
 See the License for the specific language governing permissions and
 limitations under the License.
   --
  -wi:selection-list xmlns:wi=http://apache.org/cocoon/woody/instance/1.0;
  +fi:selection-list xmlns:fi=http://apache.org/cocoon/forms/1.0#instance;
 
  -  wi:item value=10/11/03wi:label10/11/03/wi:label/wi:item
  -  wi:item value=2/4/63wi:labelMy birthdate/wi:label/wi:item
  -/wi:selection-list
  +  fi:item value=10/11/03fi:label10/11/03/fi:label/fi:item
  +  fi:item value=2/4/63fi:labelMy birthdate/fi:label/fi:item
  +/fi:selection-list
  
  
  
  1.3   +3 -3  
cocoon-2.1/src/blocks/forms/test/org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.java
  
  Index: DynamicSelectionListTestCase.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/forms/test/org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DynamicSelectionListTestCase.java 9 Mar 2004 13:08:46 -   1.2
  +++ DynamicSelectionListTestCase.java 10 Mar 2004 09:13:22 -  1.3
  @@ -83,7 +83,7 @@
   public void testGenerateSaxFragment() throws Exception {
   DOMBuilder dest = new DOMBuilder();
   ResourceSource source = 
  -new 
ResourceSource(resource://org/apache/cocoon/woody/datatype/DynamicSelectionListTestCase.source.xml);
  +new 
ResourceSource(resource://org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.source.xml);
   Document sourceDoc = parser.parse(source.getInputStream());
   Element datatypeElement = (Element) 
sourceDoc.getElementsByTagNameNS(Constants.DEFINITION_NS, convertor).item(0);
   Datatype datatype = datatypeManager.createDatatype(datatypeElement, 
false);
  @@ -91,7 +91,7 @@
   new DynamicSelectionList(datatype, null, serviceManager);
   list.generateSaxFragment(dest, Locale.ENGLISH, source);
   ResourceSource expectedSource =
  -new 
ResourceSource(resource://org/apache/cocoon/woody/datatype/DynamicSelectionListTestCase.dest.xml);
  +new 
ResourceSource(resource://org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.dest.xml);
   Document expected = parser.parse(expectedSource.getInputStream());
   assertEqual(Test if output is what is expected,
   expected, dest.getDocument());
  
  
  
  1.2   +10 -10
cocoon-2.1/src/blocks/forms/test/org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.source.xml
  
  Index: DynamicSelectionListTestCase.source.xml
  ===
  RCS file

cvs commit: cocoon-2.1/src/blocks/forms/test/org/apache/cocoon/forms/datatype DynamicSelectionListTestCase.dest.xml EnumSelectionListTestCase.dest-no-null.xml EnumSelectionListTestCase.dest.xml FlowJXPathSelectionListTestCase.dest.xml FlowJXPathSelectionListTestCaseWithNull.dest.xml

2004-03-10 Thread stephan
stephan 2004/03/10 01:19:44

  Modified:src/blocks/forms/test/org/apache/cocoon/forms/datatype
DynamicSelectionListTestCase.dest.xml
EnumSelectionListTestCase.dest-no-null.xml
EnumSelectionListTestCase.dest.xml
FlowJXPathSelectionListTestCase.dest.xml
FlowJXPathSelectionListTestCaseWithNull.dest.xml
  Log:
  Search  destroy(fith - with).
  
  Revision  ChangesPath
  1.3   +1 -1  
cocoon-2.1/src/blocks/forms/test/org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.dest.xml
  
  Index: DynamicSelectionListTestCase.dest.xml
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/forms/test/org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.dest.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DynamicSelectionListTestCase.dest.xml 10 Mar 2004 09:13:22 -  
1.2
  +++ DynamicSelectionListTestCase.dest.xml 10 Mar 2004 09:19:44 -  
1.3
  @@ -3,7 +3,7 @@
 Copyright 1999-2004 The Apache Software Foundation
   
 Licensed under the Apache License, Version 2.0 (the License);
  -  you may not use this file except in compliance fith 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
  
  
  
  1.3   +1 -1  
cocoon-2.1/src/blocks/forms/test/org/apache/cocoon/forms/datatype/EnumSelectionListTestCase.dest-no-null.xml
  
  Index: EnumSelectionListTestCase.dest-no-null.xml
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/forms/test/org/apache/cocoon/forms/datatype/EnumSelectionListTestCase.dest-no-null.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EnumSelectionListTestCase.dest-no-null.xml10 Mar 2004 09:13:22 
-  1.2
  +++ EnumSelectionListTestCase.dest-no-null.xml10 Mar 2004 09:19:44 
-  1.3
  @@ -3,7 +3,7 @@
 Copyright 1999-2004 The Apache Software Foundation
   
 Licensed under the Apache License, Version 2.0 (the License);
  -  you may not use this file except in compliance fith 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
  
  
  
  1.3   +1 -1  
cocoon-2.1/src/blocks/forms/test/org/apache/cocoon/forms/datatype/EnumSelectionListTestCase.dest.xml
  
  Index: EnumSelectionListTestCase.dest.xml
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/forms/test/org/apache/cocoon/forms/datatype/EnumSelectionListTestCase.dest.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EnumSelectionListTestCase.dest.xml10 Mar 2004 09:13:22 -  
1.2
  +++ EnumSelectionListTestCase.dest.xml10 Mar 2004 09:19:44 -  
1.3
  @@ -3,7 +3,7 @@
 Copyright 1999-2004 The Apache Software Foundation
   
 Licensed under the Apache License, Version 2.0 (the License);
  -  you may not use this file except in compliance fith 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
  
  
  
  1.3   +1 -1  
cocoon-2.1/src/blocks/forms/test/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListTestCase.dest.xml
  
  Index: FlowJXPathSelectionListTestCase.dest.xml
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/forms/test/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListTestCase.dest.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FlowJXPathSelectionListTestCase.dest.xml  10 Mar 2004 09:13:22 -  
1.2
  +++ FlowJXPathSelectionListTestCase.dest.xml  10 Mar 2004 09:19:44 -  
1.3
  @@ -3,7 +3,7 @@
 Copyright 1999-2004 The Apache Software Foundation
   
 Licensed under the Apache License, Version 2.0 (the License);
  -  you may not use this file except in compliance fith 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
  
  
  
  1.3   +1 -1  
cocoon-2.1/src/blocks/forms/test/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListTestCaseWithNull.dest.xml
  
  Index: FlowJXPathSelectionListTestCaseWithNull.dest.xml
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/forms/test/org/apache/cocoon/forms/datatype

cvs commit: cocoon-2.1/tools/src blocks-build.xsl

2004-03-10 Thread stephan
stephan 2004/03/10 01:44:34

  Modified:tools/src blocks-build.xsl
  Log:
  Minor typo.
  
  Revision  ChangesPath
  1.50  +1 -1  cocoon-2.1/tools/src/blocks-build.xsl
  
  Index: blocks-build.xsl
  ===
  RCS file: /home/cvs/cocoon-2.1/tools/src/blocks-build.xsl,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- blocks-build.xsl  10 Mar 2004 09:36:15 -  1.49
  +++ blocks-build.xsl  10 Mar 2004 09:44:34 -  1.50
  @@ -30,7 +30,7 @@
 include name=*.jar/
   /fileset
   !-- Currently, we have no JVM dependent libraries
  -  fileset dir=${{lib.core}/jvm${target.vm}}
  +  fileset dir=${{lib.core}}/jvm${{target.vm}}
include name=*.jar/
 /fileset
   --
  
  
  


cvs commit: cocoon-2.1/src/blocks/xsp/conf - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:19:48

  cocoon-2.1/src/blocks/xsp/conf - New directory


cvs commit: cocoon-2.1/src/blocks/xsp/samples - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:19:48

  cocoon-2.1/src/blocks/xsp/samples - New directory


cvs commit: cocoon-2.1/src/blocks/xsp/java - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:19:48

  cocoon-2.1/src/blocks/xsp/java - New directory


cvs commit: cocoon-2.1/src/blocks/xsp/samples/python - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:20:20

  cocoon-2.1/src/blocks/xsp/samples/python - New directory


cvs commit: cocoon-2.1/src/blocks/xsp/java/org - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:20:20

  cocoon-2.1/src/blocks/xsp/java/org - New directory


cvs commit: cocoon-2.1/src/blocks/xsp/samples/javascript - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:20:20

  cocoon-2.1/src/blocks/xsp/samples/javascript - New directory


cvs commit: cocoon-2.1/src/blocks/xsp/samples/java - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:20:20

  cocoon-2.1/src/blocks/xsp/samples/java - New directory


cvs commit: cocoon-2.1/src/blocks/xsp/samples/logicsheets - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:20:20

  cocoon-2.1/src/blocks/xsp/samples/logicsheets - New directory


cvs commit: cocoon-2.1/src/blocks/xsp/java/org/apache - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:21:10

  cocoon-2.1/src/blocks/xsp/java/org/apache - New directory


cvs commit: cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:21:23

  cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon - New directory


cvs commit: cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/acting - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:21:37

  cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/acting - New directory


cvs commit: cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:21:37

  cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components - New directory


cvs commit: cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/generating - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:21:37

  cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/generating - New directory


cvs commit: cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/language - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:21:57

  cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/language - New 
directory


cvs commit: cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/xscript - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:21:57

  cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/xscript - New 
directory


cvs commit: cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/language/generator - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:22:25

  
cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/language/generator 
- New directory


cvs commit: cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/language/programming - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:22:25

  
cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/language/programming
 - New directory


cvs commit: cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/language/markup - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:22:25

  cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/language/markup - 
New directory


cvs commit: cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/xscript/xslt - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:22:25

  cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/xscript/xslt - 
New directory


cvs commit: cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:23:08

  
cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp 
- New directory


cvs commit: cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/javascript - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:23:08

  
cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/javascript
 - New directory


cvs commit: cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:23:08

  
cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java
 - New directory


cvs commit: cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/javascript - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:25:10

  
cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/javascript
 - New directory


cvs commit: cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/java - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 03:25:10

  
cocoon-2.1/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/java
 - New directory


cvs commit: cocoon-2.1/src/webapp/samples/xsp/stream OrderPage.xml

2004-03-10 Thread stephan
stephan 2004/03/10 04:58:14

  Modified:.gump.xml status.xml
   src/java/org/apache/cocoon Cocoon.java cocoon.roles
   src/java/org/apache/cocoon/bean CocoonBean.java
CocoonWrapper.java
   src/java/org/apache/cocoon/transformation
SimpleFormTransformer.java
   src/webapp sitemap.xmap
   src/webapp/WEB-INF cocoon.xconf
   src/webapp/samples samples.xml sitemap.xmap
  Added:   src/blocks/xsp/conf xsp-action.xmap xsp-generator.xmap
xsp-markup.xconf xsp-program-generator.xconf
xsp-program-language.xconf xsp-xscript.xconf
xsp.xroles xsp.xsamples
   src/blocks/xsp/java/org/apache/cocoon/acting
InputModuleAction.java ServerPagesAction.java
   src/blocks/xsp/java/org/apache/cocoon/components/language
LanguageException.java
   
src/blocks/xsp/java/org/apache/cocoon/components/language/generator
CompiledComponent.java GeneratorSelector.java
ProgramGenerator.java ProgramGeneratorImpl.java
   src/blocks/xsp/java/org/apache/cocoon/components/language/markup
AbstractMarkupLanguage.java
CocoonMarkupLanguage.java Logicsheet.java
LogicsheetCodeGenerator.java
MarkupCodeGenerator.java MarkupLanguage.java
NamedLogicsheet.java
   
src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp
JSGenerator.java SOAPHelper.java XSLTExtension.java
XSPCookieHelper.java XSPGenerator.java
XSPMarkupLanguage.java XSPModuleHelper.java
XSPObjectHelper.java XSPRequestHelper.java
XSPResponseHelper.java XSPSessionHelper.java
XSPUtil.java
   
src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/java
action.xsl capture.xsl cookie.xsl
form-validator.xsl input.xsl jpath.xsl log.xsl
logicsheet-util.xsl request.xsl response.xsl
sel.xsl session.xsl soap.xsl util.xsl
xscript-lib.xsl xscript.xsl xsp.xsl
   
src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/javascript
request.xsl response.xsl session.xsl xsp.xsl
   
src/blocks/xsp/java/org/apache/cocoon/components/language/programming
AbstractProgrammingLanguage.java CodeFormatter.java
CompiledProgrammingLanguage.java CompilerError.java
LanguageCompiler.java Program.java
ProgrammingLanguage.java
   
src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java
AbstractJavaCompiler.java EclipseJavaCompiler.java
JavaLanguage.java JavaProgram.java Javac.java
Jikes.java JstyleFormatter.java NullFormatter.java
Pizza.java
   
src/blocks/xsp/java/org/apache/cocoon/components/language/programming/javascript
CompiledJavascriptLanguage.java
JavascriptLanguage.java JavascriptProgram.java
   src/blocks/xsp/java/org/apache/cocoon/components/xscript
StringBufferContentHandler.java XScriptManager.java
XScriptManagerImpl.java XScriptObject.java
XScriptObjectFromURL.java
XScriptObjectInlineXML.java
XScriptObjectResult.java XScriptVariableScope.java
   src/blocks/xsp/java/org/apache/cocoon/components/xscript/xslt
copy-of.xsl value-of.xsl
   src/blocks/xsp/java/org/apache/cocoon/generating
AbstractServerPage.java ServerPagesGenerator.java
   src/blocks/xsp/samples samples.xml sitemap.xmap
   src/blocks/xsp/samples/java cacheable.xsp cookie.xsp
hello.xsp logicsheet.xsp request.xsp resolver.xsp
response.xsp session.xsp sessionpage.xsp simple.xsp
upload.xsp
   src/blocks/xsp/samples/javascript hello.xsp request.xsp
response.xsp session.xsp simple.xsp
   src/blocks/xsp/samples/logicsheets hello.xsl
   src/blocks/xsp/samples/python hello.xsp
   src/blocks/xsp/samples/stream OrderPage.xml
   src/java/org/apache/cocoon/transformation/helpers
FormValidatorHelper.java
  Removed: src/java/org/apache/cocoon/acting

cvs commit: cocoon-2.1/src/blocks/xsp/samples/soap - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 06:19:43

  cocoon-2.1/src/blocks/xsp/samples/soap - New directory


cvs commit: cocoon-2.1/src/blocks/xsp/samples/soap/pages - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 06:19:58

  cocoon-2.1/src/blocks/xsp/samples/soap/pages - New directory


cvs commit: cocoon-2.1/src/blocks/xsp/samples/soap/stylesheets - New directory

2004-03-10 Thread stephan
stephan 2004/03/10 06:19:58

  cocoon-2.1/src/blocks/xsp/samples/soap/stylesheets - New directory


cvs commit: cocoon-2.1 blocks.properties gump.xml

2004-03-10 Thread stephan
stephan 2004/03/10 06:39:52

  Modified:.blocks.properties gump.xml
  Log:
  python block depend on xsp.
  
  Revision  ChangesPath
  1.64  +1 -0  cocoon-2.1/blocks.properties
  
  Index: blocks.properties
  ===
  RCS file: /home/cvs/cocoon-2.1/blocks.properties,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- blocks.properties 10 Mar 2004 14:30:41 -  1.63
  +++ blocks.properties 10 Mar 2004 14:39:52 -  1.64
  @@ -73,6 +73,7 @@
   #exclude.block.web3=true
   #-[dependency]: xmldb depends on databases.
   #exclude.block.xmldb=true
  +#exclude.block.xsp=true
   
   # Unstable blocks 
--
   
  
  
  
  1.123 +2 -1  cocoon-2.1/gump.xml
  
  Index: gump.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/gump.xml,v
  retrieving revision 1.122
  retrieving revision 1.123
  diff -u -r1.122 -r1.123
  --- gump.xml  10 Mar 2004 14:31:28 -  1.122
  +++ gump.xml  10 Mar 2004 14:39:52 -  1.123
  @@ -438,6 +438,7 @@
   /ant
   
   depend project=cocoon inherit=all/
  +depend project=cocoon-block-xsp/
   option project=jython/
   
   work nested=tools/anttasks/
  
  
  


cvs commit: cocoon-2.1/src/blocks/chaperon/samples/grammars wiki.grm

2004-02-28 Thread stephan
stephan 2004/02/28 06:32:32

  Modified:src/blocks/chaperon/samples/grammars wiki.grm
  Log:
  Resolve shift/reduce conflict by rearranging the priorities.
  
  Revision  ChangesPath
  1.7   +6 -6  cocoon-2.1/src/blocks/chaperon/samples/grammars/wiki.grm
  
  Index: wiki.grm
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/grammars/wiki.grm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- wiki.grm  23 Jan 2004 16:19:09 -  1.6
  +++ wiki.grm  28 Feb 2004 14:32:32 -  1.7
  @@ -1,12 +1,6 @@
   
   %token line \-\-\-\- (\-*);
   
  -%token bulleteditem \*+;
  -
  -%token numbered1item #;
  -%token numbered2item ##;
  -%token numbered3item ###;
  -
   %token tabletitleitem  \|\|;
   %token tablecolumnitem \|;
   
  @@ -37,6 +31,12 @@
   %right break ;
   
   %right hardbreak (\r(\n?) | \n) (\r(\n?) | \n)+;
  +
  +%token bulleteditem \*+;
  + 

  +%token numbered1item #;
  +%token numbered2item ##;
  +%token numbered3item ###;
   
   %ignore [\ \t]+;
   
  
  
  


cvs commit: cocoon-2.1/src/blocks/chaperon/samples/stylesheets egrm2xegrm.xsl

2004-02-05 Thread stephan
stephan 2004/02/05 06:37:42

  Modified:src/blocks/chaperon/samples sitemap.xmap
   src/blocks/chaperon/samples/misc view.xml wiki.js
   src/blocks/chaperon/samples/stylesheets egrm2xegrm.xsl
  Added:   src/blocks/chaperon/samples/misc source.xml
  Log:
  Add link to get the wiki content as xdoc.
  
  Revision  ChangesPath
  1.18  +8 -0  cocoon-2.1/src/blocks/chaperon/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/sitemap.xmap,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- sitemap.xmap  5 Feb 2004 10:45:17 -   1.17
  +++ sitemap.xmap  5 Feb 2004 14:37:42 -   1.18
  @@ -142,6 +142,14 @@
   map:serialize type=html/
  /map:match
   
  +   map:match pattern=wiki/source.xml
  +map:generate  type=jx  src=misc/source.xml /
  +map:transform type=lexer   src=cocoon:/wiki.xlex/
  +map:transform type=parser  src=cocoon:/wiki.xgrm 
label=ast/
  +map:transformsrc=stylesheets/wiki2xdoc.xsl 
label=xdoc/
  +map:serialize type=xml/
  +   /map:match
  +
 /map:pipeline
   
 map:pipeline type=caching 
  
  
  
  1.3   +1 -0  cocoon-2.1/src/blocks/chaperon/samples/misc/view.xml
  
  Index: view.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/misc/view.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- view.xml  22 Jan 2004 16:28:59 -  1.2
  +++ view.xml  5 Feb 2004 14:37:42 -   1.3
  @@ -3,6 +3,7 @@
header
 titleWiki example/title
 tab title=Edit href=edit.do?page=${page}/
  +  tab title=Source href=source.do?page=${page}/
 tab title=back href=./
/header
body
  
  
  
  1.2   +12 -0 cocoon-2.1/src/blocks/chaperon/samples/misc/wiki.js
  
  Index: wiki.js
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/misc/wiki.js,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- wiki.js   20 Jan 2004 15:23:58 -  1.1
  +++ wiki.js   5 Feb 2004 14:37:42 -   1.2
  @@ -46,6 +46,18 @@
   cocoon.sendPage(wiki/view.html, {page:page, text:text});
   }
   
  +function source() {
  + 

  
  +var page = cocoon.request.getParameter(page);
  + 

  
  +if (page==null)
  +page = index;
  + 

  
  +var text = read(page);
  + 

  
  +cocoon.sendPage(wiki/source.xml, {page:page, text:text});
  +}
  +
   
   function read(page) {
   
  
  
  
  1.1  cocoon-2.1/src/blocks/chaperon/samples/misc/source.xml
  
  Index: source.xml
  ===
  ?xml version=1.0 encoding=ISO-8859-1?
  document
   header
titleWiki example/title
   /header
   body
text xmlns=http://chaperon.sourceforge.net/schema/text/1.0; 
source=wiki/${page}.txt line=1 column=1${text}/text
   /body
  /document
  
  
  
  1.3   +2 -7  
cocoon-2.1/src/blocks/chaperon/samples/stylesheets/egrm2xegrm.xsl
  
  Index: egrm2xegrm.xsl
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/chaperon/samples/stylesheets/egrm2xegrm.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- egrm2xegrm.xsl5 Feb 2004 10:45:17 -   1.2
  +++ egrm2xegrm.xsl5 Feb 2004 14:37:42 -   1.3
  @@ -9,17 +9,14 @@
xsl:output indent=yes method=xml encoding=ASCII/
   
xsl:template match=st:output/st:grammar
  -  grammar
  +  grammar start={st:start/st:name}
   
  xsl:if test=not (st:start)
  -bla
   xsl:message terminate=yes
Start element is not defined!
   /xsl:message
  /xsl:if
   
  -   xsl:attribute name=startxsl:value-of 
select=st:start/st:name//xsl:attribute
  -
  xsl:commentThis file was generated! Don't edit!/xsl:comment
   
  xsl:apply-templates select=st:definition/
  @@ -27,9 +24,7 @@
/xsl:template
   
xsl:template match=st:definition
  -  definition

cvs commit: cocoon-2.1/src/test/org/apache/cocoon/matching - New directory

2004-02-02 Thread stephan
stephan 2004/02/02 03:23:41

  cocoon-2.1/src/test/org/apache/cocoon/matching - New directory


cvs commit: cocoon-2.1/src/test/org/apache/cocoon/matching WildcardURIMatcherTestCase.java WildcardURIMatcherTestCase.xtest

2004-02-02 Thread stephan
stephan 2004/02/02 03:25:57

  Modified:src/test/org/apache/cocoon SitemapComponentTestCase.java
  Added:   src/test/org/apache/cocoon/matching
WildcardURIMatcherTestCase.java
WildcardURIMatcherTestCase.xtest
  Log:
  Add test method for Matchers, and example for the WildcardURIMatcher.
  Thanks to Wojciech Gdela, see
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26441
  
  Revision  ChangesPath
  1.3   +46 -1 
cocoon-2.1/src/test/org/apache/cocoon/SitemapComponentTestCase.java
  
  Index: SitemapComponentTestCase.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/test/org/apache/cocoon/SitemapComponentTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SitemapComponentTestCase.java 23 Dec 2003 15:28:33 -  1.2
  +++ SitemapComponentTestCase.java 2 Feb 2004 11:25:57 -   1.3
  @@ -75,6 +75,7 @@
   import org.apache.cocoon.environment.mock.MockRequest;
   import org.apache.cocoon.environment.mock.MockResponse;
   import org.apache.cocoon.generation.Generator;
  +import org.apache.cocoon.matching.Matcher;
   import org.apache.cocoon.transformation.Transformer;
   import org.apache.cocoon.serialization.Serializer;
   import org.apache.cocoon.xml.WhitespaceFilter;
  @@ -149,6 +150,50 @@
   redirector.reset();
   }
   
  +/**
  + * Match with a pattern.
  + *
  + * @param type Hint of the matcher. 
  + * @param pattern Pattern for the matcher.
  + * @param parameters Matcher parameters.
  + */
  +public final Map match(String type, String pattern, Parameters 
parameters) {
  +
  +ComponentSelector selector = null;
  +Matcher matcher = null;
  +SourceResolver resolver = null;
  +
  +Map result = null;
  +try {
  +selector = (ComponentSelector) this.manager.lookup(Matcher.ROLE +
  +Selector);
  +assertNotNull(Test lookup of matcher selector, selector);
  +
  +resolver = (SourceResolver) 
this.manager.lookup(SourceResolver.ROLE);
  +assertNotNull(Test lookup of source resolver, resolver);
  +
  +assertNotNull(Test if matcher name is not null, type);
  +matcher = (Matcher) selector.select(type);
  +assertNotNull(Test lookup of matcher, matcher);
  +
  +result = matcher.match(pattern, objectmodel, parameters);
  +
  +} catch (ComponentException ce) {
  +getLogger().error(Could not retrieve generator, ce);
  +fail(Could not retrieve generator:  + ce.toString());
  +} catch (Exception e) {
  +getLogger().error(Could not execute test, e);
  +fail(Could not execute test:  + e);
  +} finally {
  +if (matcher != null) {
  +selector.release(matcher);
  +}
  +this.manager.release(selector);
  +this.manager.release(resolver);
  +}
  +return result;
  +}
  +
   /**
* Perform the action component.
*
  
  
  
  1.1  
cocoon-2.1/src/test/org/apache/cocoon/matching/WildcardURIMatcherTestCase.java
  
  Index: WildcardURIMatcherTestCase.java
  ===
  package org.apache.cocoon.matching;
  
  import java.util.Map;
  
  import org.apache.avalon.framework.parameters.Parameters;
  import org.apache.cocoon.SitemapComponentTestCase;
  
  public class WildcardURIMatcherTestCase extends SitemapComponentTestCase {
  
  public WildcardURIMatcherTestCase(String name) {
  super(name);
  }
  
  public void testWildcardURIMatch() {
  getRequest().setRequestURI(/test/foo/bla/end);
  
  Parameters parameters = new Parameters();
  
  Map result = match(wildcard-uri, **, parameters);
  System.out.println(result);
  assertNotNull(Test if resource exists, result);
  assertEquals(Test for **, test/foo/bla/end, result.get(1));
  
  result = match(wildcard-uri, **/bla/*, parameters);
  System.out.println(result);
  assertNotNull(Test if resource exists, result);
  assertEquals(Test for **/bla/* {1}, test/foo, result.get(1));
  assertEquals(Test for **/bla/* {2}, end, result.get(2));
  }
  }
  
  
  
  1.1  
cocoon-2.1/src/test/org/apache/cocoon/matching/WildcardURIMatcherTestCase.xtest
  
  Index: WildcardURIMatcherTestCase.xtest
  ===
  ?xml version=1.0 ?
  testcase
   annotation
Test Cases: WildcardUriMatcher
   /annotation
  
   logkit
factories
 factory type=stream 
class=org.apache.avalon.excalibur.logger.factory.StreamTargetFactory/
/factories
targets
 stream id=root

  1   2   >