You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by di...@apache.org on 2001/04/17 20:19:12 UTC
cvs commit: xml-cocoon/xdocs/drafts sitemap-working-draft.xmap
dims 01/04/17 11:19:11
Modified: . Tag: xml-cocoon2 build.xml
src/org/apache/cocoon/acting Tag: xml-cocoon2
AbstractValidatorAction.java
DatabaseAuthenticatorAction.java
FormValidatorAction.java
SessionInvalidatorAction.java
SessionValidatorAction.java
src/org/apache/cocoon/components/language/markup/xsp Tag:
xml-cocoon2 XSPRequestHelper.java
src/org/apache/cocoon/components/language/markup/xsp/java
Tag: xml-cocoon2 util.xsl
src/org/apache/cocoon/environment Tag: xml-cocoon2
Response.java
src/org/apache/cocoon/sitemap Tag: xml-cocoon2
AbstractSitemap.java
src/org/apache/cocoon/transformation Tag: xml-cocoon2
TraxTransformer.java
xdocs Tag: xml-cocoon2 actions.xml
xdocs/drafts Tag: xml-cocoon2 sitemap-working-draft.xmap
Added: src/org/apache/cocoon/caching Tag: xml-cocoon2
CompositeCacheValidity.java
ParametersCacheValidity.java
Log:
- Fix CacheValidity in TraxTransformer to take Parameters into account.
Revision Changes Path
No revision
No revision
1.6.2.76 +4 -4 xml-cocoon/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/xml-cocoon/build.xml,v
retrieving revision 1.6.2.75
retrieving revision 1.6.2.76
diff -u -r1.6.2.75 -r1.6.2.76
--- build.xml 2001/04/17 03:53:11 1.6.2.75
+++ build.xml 2001/04/17 18:17:55 1.6.2.76
@@ -231,7 +231,7 @@
<!-- =================================================================== -->
<!-- Prepares the source code -->
<!-- =================================================================== -->
- <target name="prepare-src-main" depends="prepare">
+ <target name="prepare-src-main" depends="prepare,generate-java-code">
<mkdir dir="${build.src}"/>
<mkdir dir="${build.dest}"/>
<copy todir="${build.src}" filtering="on">
@@ -287,12 +287,12 @@
<!-- =================================================================== -->
<target name="generate-java-code" depends="init">
<delete>
- <fileset dir="${build.src}/org/apache/cocoon/components/browser">
+ <fileset dir="${src.dir}/org/apache/cocoon/components/browser">
<include name="BrowserImpl.java"/>
</fileset>
</delete>
<style basedir="${src.dir}/org/apache/cocoon/components/browser"
- destdir="${build.src}/org/apache/cocoon/components/browser"
+ destdir="${src.dir}/org/apache/cocoon/components/browser"
includes="BrowserImpl.xml"
extension=".java"
style="BrowserImpl.xsl"/>
@@ -302,7 +302,7 @@
<!-- =================================================================== -->
<!-- Compiles the source directory -->
<!-- =================================================================== -->
- <target name="compile" depends="prepare-src,generate-java-code"
+ <target name="compile" depends="prepare-src"
description="Compiles the source code">
<copy todir="${build.dest}">
<fileset dir="${build.src}">
No revision
No revision
1.1.2.2 +3 -6 xml-cocoon/src/org/apache/cocoon/acting/Attic/AbstractValidatorAction.java
Index: AbstractValidatorAction.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/acting/Attic/AbstractValidatorAction.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- AbstractValidatorAction.java 2001/04/16 19:30:42 1.1.2.1
+++ AbstractValidatorAction.java 2001/04/17 18:18:04 1.1.2.2
@@ -1,13 +1,10 @@
-// $Id: AbstractValidatorAction.java,v 1.1.2.1 2001/04/16 19:30:42 dims Exp $
+// $Id: AbstractValidatorAction.java,v 1.1.2.2 2001/04/17 18:18:04 dims Exp $
package org.apache.cocoon.acting;
import java.util.Map;
import java.util.HashMap;
import java.util.Collections;
-import javax.servlet.*;
-import javax.servlet.http.*;
-
import org.apache.avalon.configuration.Parameters;
import org.apache.avalon.configuration.Configurable;
import org.apache.avalon.configuration.Configuration;
@@ -54,7 +51,7 @@
* octal values as accepted by java.Lang.decode (String s).
*
* @author Martin Man <Martin.Man@seznam.cz>
- * @version CVS $Revision: 1.1.2.1 $ $Date: 2001/04/16 19:30:42 $
+ * @version CVS $Revision: 1.1.2.2 $ $Date: 2001/04/17 18:18:04 $
*/
public abstract class AbstractValidatorAction
extends AbstractComplimentaryConfigurableAction
@@ -293,5 +290,5 @@
}
}
-// $Id: AbstractValidatorAction.java,v 1.1.2.1 2001/04/16 19:30:42 dims Exp $
+// $Id: AbstractValidatorAction.java,v 1.1.2.2 2001/04/17 18:18:04 dims Exp $
// vim: set et ts=4 sw=4:
1.1.2.3 +5 -6 xml-cocoon/src/org/apache/cocoon/acting/Attic/DatabaseAuthenticatorAction.java
Index: DatabaseAuthenticatorAction.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/acting/Attic/DatabaseAuthenticatorAction.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- DatabaseAuthenticatorAction.java 2001/04/17 03:55:09 1.1.2.2
+++ DatabaseAuthenticatorAction.java 2001/04/17 18:18:06 1.1.2.3
@@ -1,13 +1,10 @@
-// $Id: DatabaseAuthenticatorAction.java,v 1.1.2.2 2001/04/17 03:55:09 donaldp Exp $
+// $Id: DatabaseAuthenticatorAction.java,v 1.1.2.3 2001/04/17 18:18:06 dims Exp $
package org.apache.cocoon.acting;
import java.util.Map;
import java.util.HashMap;
import java.util.Collections;
-import javax.servlet.*;
-import javax.servlet.http.*;
-
import org.apache.avalon.configuration.Parameters;
import org.apache.avalon.configuration.Configuration;
import org.apache.avalon.configuration.ConfigurationException;
@@ -26,6 +23,8 @@
import java.sql.Timestamp;
import java.sql.SQLException;
+import javax.servlet.http.HttpSession;
+
/**
* This action is used to authenticate user by comparing several request
* fields (username, password) with the values in database. The description of
@@ -54,7 +53,7 @@
* expression.
*
* @author Martin Man <Martin.Man@seznam.cz>
- * @version CVS $Revision: 1.1.2.2 $ $Date: 2001/04/17 03:55:09 $
+ * @version CVS $Revision: 1.1.2.3 $ $Date: 2001/04/17 18:18:06 $
*/
public class DatabaseAuthenticatorAction extends AbstractDatabaseAction
{
@@ -206,5 +205,5 @@
}
}
-// $Id: DatabaseAuthenticatorAction.java,v 1.1.2.2 2001/04/17 03:55:09 donaldp Exp $
+// $Id: DatabaseAuthenticatorAction.java,v 1.1.2.3 2001/04/17 18:18:06 dims Exp $
// vim: set et ts=4 sw=4:
1.1.2.2 +5 -7 xml-cocoon/src/org/apache/cocoon/acting/Attic/FormValidatorAction.java
Index: FormValidatorAction.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/acting/Attic/FormValidatorAction.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- FormValidatorAction.java 2001/04/16 19:30:42 1.1.2.1
+++ FormValidatorAction.java 2001/04/17 18:18:09 1.1.2.2
@@ -1,13 +1,10 @@
-// $Id: FormValidatorAction.java,v 1.1.2.1 2001/04/16 19:30:42 dims Exp $
+// $Id: FormValidatorAction.java,v 1.1.2.2 2001/04/17 18:18:09 dims Exp $
package org.apache.cocoon.acting;
import java.util.Map;
import java.util.HashMap;
import java.util.Collections;
-import javax.servlet.*;
-import javax.servlet.http.*;
-
import org.apache.avalon.configuration.Parameters;
import org.apache.avalon.configuration.Configuration;
import org.apache.avalon.configuration.ConfigurationException;
@@ -17,6 +14,7 @@
import org.apache.cocoon.*;
import org.apache.cocoon.util.Tokenizer;
+import org.apache.cocoon.environment.Request;
/**
* This is the action used to validate HTTP form parameters supplied via
@@ -37,7 +35,7 @@
* all validated parameters to the sitemap via {name} expression.
*
* @author Martin Man <Martin.Man@seznam.cz>
- * @version CVS $Revision: 1.1.2.1 $ $Date: 2001/04/16 19:30:42 $
+ * @version CVS $Revision: 1.1.2.2 $ $Date: 2001/04/17 18:18:09 $
*/
public class FormValidatorAction extends AbstractValidatorAction
{
@@ -46,7 +44,7 @@
*/
public Map act (EntityResolver resolver, Map objectModel, String src,
Parameters parameters) throws Exception {
- HttpServletRequest req = (HttpServletRequest)
+ Request req = (Request)
objectModel.get (Constants.REQUEST_OBJECT);
/* check request validity */
@@ -85,5 +83,5 @@
}
}
-// $Id: FormValidatorAction.java,v 1.1.2.1 2001/04/16 19:30:42 dims Exp $
+// $Id: FormValidatorAction.java,v 1.1.2.2 2001/04/17 18:18:09 dims Exp $
// vim: set et ts=4 sw=4:
1.1.2.2 +7 -7 xml-cocoon/src/org/apache/cocoon/acting/Attic/SessionInvalidatorAction.java
Index: SessionInvalidatorAction.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/acting/Attic/SessionInvalidatorAction.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- SessionInvalidatorAction.java 2001/04/16 19:30:42 1.1.2.1
+++ SessionInvalidatorAction.java 2001/04/17 18:18:11 1.1.2.2
@@ -1,13 +1,10 @@
-// $Id: SessionInvalidatorAction.java,v 1.1.2.1 2001/04/16 19:30:42 dims Exp $
+// $Id: SessionInvalidatorAction.java,v 1.1.2.2 2001/04/17 18:18:11 dims Exp $
package org.apache.cocoon.acting;
import java.util.Map;
import java.util.HashMap;
import java.util.Collections;
-import javax.servlet.*;
-import javax.servlet.http.*;
-
import org.apache.avalon.configuration.Parameters;
import org.apache.avalon.configuration.Configuration;
import org.apache.avalon.configuration.ConfigurationException;
@@ -17,13 +14,16 @@
import org.apache.cocoon.*;
import org.apache.cocoon.util.Tokenizer;
+import org.apache.cocoon.environment.Request;
+
+import javax.servlet.http.HttpSession;
/**
* This is the action used to invalidate an HTTP session. The action returns
* empty map if everything is ok, null otherwise.
*
* @author Martin Man <Martin.Man@seznam.cz>
- * @version CVS $Revision: 1.1.2.1 $ $Date: 2001/04/16 19:30:42 $
+ * @version CVS $Revision: 1.1.2.2 $ $Date: 2001/04/17 18:18:11 $
*/
public class SessionInvalidatorAction extends AbstractAction
{
@@ -32,7 +32,7 @@
*/
public Map act (EntityResolver resolver, Map objectModel, String src,
Parameters parameters) throws Exception {
- HttpServletRequest req = (HttpServletRequest)
+ Request req = (Request)
objectModel.get (Constants.REQUEST_OBJECT);
HashMap actionMap = new HashMap ();
@@ -49,5 +49,5 @@
}
}
-// $Id: SessionInvalidatorAction.java,v 1.1.2.1 2001/04/16 19:30:42 dims Exp $
+// $Id: SessionInvalidatorAction.java,v 1.1.2.2 2001/04/17 18:18:11 dims Exp $
// vim: set et ts=4 sw=4:
1.1.2.2 +7 -7 xml-cocoon/src/org/apache/cocoon/acting/Attic/SessionValidatorAction.java
Index: SessionValidatorAction.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/acting/Attic/SessionValidatorAction.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- SessionValidatorAction.java 2001/04/16 19:30:42 1.1.2.1
+++ SessionValidatorAction.java 2001/04/17 18:18:12 1.1.2.2
@@ -1,4 +1,4 @@
-// $Id: SessionValidatorAction.java,v 1.1.2.1 2001/04/16 19:30:42 dims Exp $
+// $Id: SessionValidatorAction.java,v 1.1.2.2 2001/04/17 18:18:12 dims Exp $
package org.apache.cocoon.acting;
import java.util.Map;
@@ -6,9 +6,6 @@
import java.util.Collections;
import java.util.Iterator;
-import javax.servlet.*;
-import javax.servlet.http.*;
-
import org.apache.avalon.configuration.Parameters;
import org.apache.avalon.configuration.Configuration;
import org.apache.avalon.configuration.ConfigurationException;
@@ -18,6 +15,9 @@
import org.apache.cocoon.*;
import org.apache.cocoon.util.Tokenizer;
+import org.apache.cocoon.environment.Request;
+
+import javax.servlet.http.HttpSession;
/**
* This is the action used to validate HTTP session parameters.
@@ -38,7 +38,7 @@
* all validated parameters to the sitemap via {name} expression.
*
* @author Martin Man <Martin.Man@seznam.cz>
- * @version CVS $Revision: 1.1.2.1 $ $Date: 2001/04/16 19:30:42 $
+ * @version CVS $Revision: 1.1.2.2 $ $Date: 2001/04/17 18:18:12 $
*/
public class SessionValidatorAction extends AbstractValidatorAction
{
@@ -47,7 +47,7 @@
*/
public Map act (EntityResolver resolver, Map objectModel, String src,
Parameters parameters) throws Exception {
- HttpServletRequest req = (HttpServletRequest)
+ Request req = (Request)
objectModel.get (Constants.REQUEST_OBJECT);
if (req == null)
@@ -89,5 +89,5 @@
}
}
-// $Id: SessionValidatorAction.java,v 1.1.2.1 2001/04/16 19:30:42 dims Exp $
+// $Id: SessionValidatorAction.java,v 1.1.2.2 2001/04/17 18:18:12 dims Exp $
// vim: set et ts=4 sw=4:
No revision
No revision
1.1.2.1 +49 -0 xml-cocoon/src/org/apache/cocoon/caching/Attic/CompositeCacheValidity.java
1.1.2.1 +42 -0 xml-cocoon/src/org/apache/cocoon/caching/Attic/ParametersCacheValidity.java
No revision
No revision
1.1.2.14 +5 -5 xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/Attic/XSPRequestHelper.java
Index: XSPRequestHelper.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/Attic/XSPRequestHelper.java,v
retrieving revision 1.1.2.13
retrieving revision 1.1.2.14
diff -u -r1.1.2.13 -r1.1.2.14
--- XSPRequestHelper.java 2001/03/30 17:14:18 1.1.2.13
+++ XSPRequestHelper.java 2001/04/17 18:18:32 1.1.2.14
@@ -21,10 +21,10 @@
import org.apache.cocoon.Constants;
/**
- * The <code>HttpServletRequest</code> object helper
+ * The <code>Request</code> object helper
*
* @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
- * @version CVS $Revision: 1.1.2.13 $ $Date: 2001/03/30 17:14:18 $
+ * @version CVS $Revision: 1.1.2.14 $ $Date: 2001/04/17 18:18:32 $
*/
public class XSPRequestHelper extends XSPObjectHelper {
/**
@@ -36,7 +36,7 @@
}
/**
- * Output the uri associated with the given <code>HttpServletRequest</code>
+ * Output the uri associated with the given <code>Request</code>
*
* @param objectModel The Map objectModel
* @param contentHandler The SAX content handler
@@ -494,7 +494,7 @@
/**
* Output the fully qualified name of the client that sent the request, or
* the IP address of the client if the name cannot be determined, given
- * <code>HttpServletRequest</code>
+ * <code>Request</code>
*
* @param objectModel The Map objectModel
*/
@@ -509,7 +509,7 @@
/**
* Output the fully qualified name of the client that sent the request, or
* the IP address of the client if the name cannot be determined, given
- * <code>HttpServletRequest</code>
+ * <code>Request</code>
*
* @param objectModel The Map objectModel
* @param contentHandler The SAX content handler
No revision
No revision
1.1.2.10 +1 -1 xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java/Attic/util.xsl
Index: util.xsl
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java/Attic/util.xsl,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -u -r1.1.2.9 -r1.1.2.10
--- util.xsl 2001/04/12 12:30:33 1.1.2.9
+++ util.xsl 2001/04/17 18:18:38 1.1.2.10
@@ -78,7 +78,7 @@
<!-- Mark page as cacheable -->
<xsl:template match="xsp:structure/util:cacheable">
<xsp:logic>
- public boolean isCacheable (HttpServletRequest request) {
+ public boolean isCacheable (Request request) {
return true;
}
</xsp:logic>
No revision
No revision
1.1.2.3 +2 -2 xml-cocoon/src/org/apache/cocoon/environment/Attic/Response.java
Index: Response.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/environment/Attic/Response.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- Response.java 2001/04/09 11:15:47 1.1.2.2
+++ Response.java 2001/04/17 18:18:44 1.1.2.3
@@ -18,7 +18,7 @@
* Defines an interface to provide client response information .
*
* @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
- * @version CVS $Revision: 1.1.2.2 $ $Date: 2001/04/09 11:15:47 $
+ * @version CVS $Revision: 1.1.2.3 $ $Date: 2001/04/17 18:18:44 $
*
*/
@@ -143,7 +143,7 @@
* encode a normal link, this method is seperate from the
* <code>encodeURL</code> method.
*
- * <p>All URLs sent to the <code>HttpServletResponse.sendRedirect</code>
+ * <p>All URLs sent to the <code>Response.sendRedirect</code>
* method should be run through this method. Otherwise, URL
* rewriting cannot be used with browsers which do not support
* cookies.
No revision
No revision
1.1.2.33 +3 -2 xml-cocoon/src/org/apache/cocoon/sitemap/Attic/AbstractSitemap.java
Index: AbstractSitemap.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/AbstractSitemap.java,v
retrieving revision 1.1.2.32
retrieving revision 1.1.2.33
diff -u -r1.1.2.32 -r1.1.2.33
--- AbstractSitemap.java 2001/04/13 16:02:25 1.1.2.32
+++ AbstractSitemap.java 2001/04/17 18:18:50 1.1.2.33
@@ -36,6 +36,7 @@
import org.apache.cocoon.components.pipeline.EventPipeline;
import org.apache.cocoon.components.url.URLFactory;
import org.apache.cocoon.environment.Environment;
+import org.apache.cocoon.environment.Request;
import org.apache.cocoon.util.ClassUtils;
import org.xml.sax.SAXException;
@@ -44,7 +45,7 @@
* Base class for generated <code>Sitemap</code> classes
*
* @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
- * @version CVS $Revision: 1.1.2.32 $ $Date: 2001/04/13 16:02:25 $
+ * @version CVS $Revision: 1.1.2.33 $ $Date: 2001/04/17 18:18:50 $
*/
public abstract class AbstractSitemap extends AbstractLoggable implements Sitemap, Disposable {
private Context context;
@@ -116,7 +117,7 @@
* dynamically generated content has changed
* @return Whether content has changes for this request's data
*//*
- public boolean hasContentChanged(HttpServletRequest resuest) {
+ public boolean hasContentChanged(Request request) {
return true;
}
No revision
No revision
1.1.2.21 +37 -14 xml-cocoon/src/org/apache/cocoon/transformation/Attic/TraxTransformer.java
Index: TraxTransformer.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/transformation/Attic/TraxTransformer.java,v
retrieving revision 1.1.2.20
retrieving revision 1.1.2.21
diff -u -r1.1.2.20 -r1.1.2.21
--- TraxTransformer.java 2001/04/15 16:34:43 1.1.2.20
+++ TraxTransformer.java 2001/04/17 18:18:55 1.1.2.21
@@ -14,6 +14,7 @@
import java.util.Map;
import java.util.Hashtable;
import java.util.HashMap;
+import java.util.Iterator;
import java.text.StringCharacterIterator;
import java.lang.reflect.Method;
@@ -40,6 +41,8 @@
import org.apache.cocoon.caching.Cacheable;
import org.apache.cocoon.caching.CacheValidity;
import org.apache.cocoon.caching.TimeStampCacheValidity;
+import org.apache.cocoon.caching.CompositeCacheValidity;
+import org.apache.cocoon.caching.ParametersCacheValidity;
import org.apache.cocoon.util.HashUtil;
import org.apache.cocoon.xml.XMLConsumer;
import org.apache.cocoon.xml.ContentHandlerWrapper;
@@ -65,7 +68,7 @@
* (Apache Software Foundation, Exoffice Technologies)
* @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.1.2.20 $ $Date: 2001/04/15 16:34:43 $
+ * @version CVS $Revision: 1.1.2.21 $ $Date: 2001/04/17 18:18:55 $
*/
public class TraxTransformer extends ContentHandlerWrapper
implements Transformer, Composer, Recyclable, Configurable, Cacheable, Disposable {
@@ -213,9 +216,14 @@
* component is currently not cacheable.
*/
public CacheValidity generateValidity() {
+ HashMap map = getLogicSheetParameters();
+
if (this.systemID.startsWith("file:") == true) {
File xslFile = new File(this.systemID.substring("file:".length()));
- return new TimeStampCacheValidity(xslFile.lastModified());
+ return new CompositeCacheValidity(
+ new ParametersCacheValidity(map),
+ new TimeStampCacheValidity(xslFile.lastModified())
+ );
}
return null;
}
@@ -227,8 +235,6 @@
* and <code>setLexicalHandler(consumer)</code>.
*/
public void setConsumer(XMLConsumer consumer) {
- /** The Request object */
- Request request = (Request) objectModel.get(Constants.REQUEST_OBJECT);
/** Get a Transformer Handler */
try {
@@ -247,6 +253,30 @@
throw new RuntimeException("Problem in getTransformer:" + e.getMessage());
}
+ HashMap map = getLogicSheetParameters();
+ Iterator iterator = map.keySet().iterator();
+ while(iterator.hasNext()) {
+ String name = (String)iterator.next();
+ transformerHandler.getTransformer().setParameter(name,map.get(name));
+ }
+
+ super.setContentHandler(transformerHandler);
+ if(transformerHandler instanceof Loggable) {
+ ((Loggable)transformerHandler).setLogger(getLogger());
+ }
+ if(transformerHandler instanceof org.xml.sax.ext.LexicalHandler)
+ this.setLexicalHandler((org.xml.sax.ext.LexicalHandler)transformerHandler);
+
+ this.setContentHandler(consumer);
+ }
+
+ private HashMap getLogicSheetParameters()
+ {
+ HashMap map = new HashMap();
+
+ /** The Request object */
+ Request request = (Request) objectModel.get(Constants.REQUEST_OBJECT);
+
if (request != null) {
Enumeration parameters = request.getParameterNames();
if ( parameters != null ) {
@@ -254,7 +284,7 @@
String name = (String) parameters.nextElement();
if (isValidXSLTParameterName(name)) {
String value = request.getParameter(name);
- transformerHandler.getTransformer().setParameter(name,value);
+ map.put(name,value);
}
}
}
@@ -267,7 +297,7 @@
if (isValidXSLTParameterName(name)) {
String value = par.getParameter(name,null);
if (value != null) {
- transformerHandler.getTransformer().setParameter(name,value);
+ map.put(name,value);
}
}
}
@@ -309,14 +339,7 @@
// getLogger().error("Error setting Browser info", e);
// }
- super.setContentHandler(transformerHandler);
- if(transformerHandler instanceof Loggable) {
- ((Loggable)transformerHandler).setLogger(getLogger());
- }
- if(transformerHandler instanceof org.xml.sax.ext.LexicalHandler)
- this.setLexicalHandler((org.xml.sax.ext.LexicalHandler)transformerHandler);
-
- this.setContentHandler(consumer);
+ return map;
}
/**
No revision
No revision
1.1.2.3 +2 -2 xml-cocoon/xdocs/Attic/actions.xml
Index: actions.xml
===================================================================
RCS file: /home/cvs/xml-cocoon/xdocs/Attic/actions.xml,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- actions.xml 2001/02/21 12:53:45 1.1.2.2
+++ actions.xml 2001/04/17 18:19:00 1.1.2.3
@@ -109,7 +109,7 @@
import org.apache.cocoon.Constants;
import java.util.Map;
import java.util.HashMap;
-import javax.servlet.http.HttpServletRequest;
+import org.apache.cocoon.environment.Request;
import org.xml.sax.EntityResolver;
public class HelloWorldAction extends AbstractAction {
@@ -117,7 +117,7 @@
Map sitemapParams = new HashMap();
sitemapParams.put("world", "hello");
- HttpServletRequest request = (HttpServletRequest) objectModel.get(Constants.REQUEST_OBJECT);
+ Request request = (Request) objectModel.get(Constants.REQUEST_OBJECT);
request.setParameter("hello", "world");
No revision
No revision
1.1.2.18 +4 -5 xml-cocoon/xdocs/drafts/Attic/sitemap-working-draft.xmap
Index: sitemap-working-draft.xmap
===================================================================
RCS file: /home/cvs/xml-cocoon/xdocs/drafts/Attic/sitemap-working-draft.xmap,v
retrieving revision 1.1.2.17
retrieving revision 1.1.2.18
diff -u -r1.1.2.17 -r1.1.2.18
--- sitemap-working-draft.xmap 2001/02/18 15:22:22 1.1.2.17
+++ sitemap-working-draft.xmap 2001/04/17 18:19:06 1.1.2.18
@@ -257,11 +257,10 @@
<!--
Action are classes that are able to modify the underlying application model and
are meant as extensions to the sitemap functionality. They get access to the
- objectModel containing all objects that make up a request (HttpServletrequest,
- etc.). An Action can return a Map of tokens that resulted from the
- processing logic (this is up to the action implementation). An Action is
- references in the pipeline section with the type attribute as it is with all the
- other sitemap components.
+ objectModel containing all objects that make up a request. An Action can return
+ a Map of tokens that resulted from the processing logic (this is up to the action
+ implementation). An Action is references in the pipeline section with the type
+ attribute as it is with all the other sitemap components.
-->
<map:actions>
<map:action name="session-validator" src="org.apache.cocoon.acting.SessionValidationAction">
----------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org