cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@locus.apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/processor/xslt XSLTProcessor.java
Date Sat, 04 Mar 2000 02:36:23 GMT
stefano     00/03/03 18:36:23

  Modified:    src/org/apache/cocoon/processor/xslt XSLTProcessor.java
  Log:
  passed request parameters to the transformer as stylesheet parameters
  
  Revision  Changes    Path
  1.9       +10 -3     xml-cocoon/src/org/apache/cocoon/processor/xslt/XSLTProcessor.java
  
  Index: XSLTProcessor.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xslt/XSLTProcessor.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XSLTProcessor.java	2000/02/23 00:50:48	1.8
  +++ XSLTProcessor.java	2000/03/04 02:36:22	1.9
  @@ -1,4 +1,4 @@
  -/*-- $Id: XSLTProcessor.java,v 1.8 2000/02/23 00:50:48 stefano Exp $ --
  +/*-- $Id: XSLTProcessor.java,v 1.9 2000/03/04 02:36:22 stefano Exp $ --
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -70,7 +70,7 @@
    * This class implements an XSLT processor.
    *
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version $Revision: 1.8 $ $Date: 2000/02/23 00:50:48 $
  + * @version $Revision: 1.9 $ $Date: 2000/03/04 02:36:22 $
    */
   
   public class XSLTProcessor implements Actor, Processor, Status, Defaults {
  @@ -96,11 +96,18 @@
           String path = (String) parameters.get("path");
           String browser = (String) parameters.get("browser");
   
  +        Hashtable params = new Hashtable();
  +        Enumeration enum = request.getParameterNames();
  +        while (enum.hasMoreElements()) {
  +            String name = (String) enum.nextElement();
  +            params.put(name, request.getParameter(name));
  +        }
  +
           try {
               Object resource = getResource(document, path, browser);
               Document stylesheet = getStylesheet(resource, request);
               Document result = this.parser.createEmptyDocument();
  -            return transformer.transform(document, null, stylesheet, resource.toString(),
result);
  +            return transformer.transform(document, null, stylesheet, resource.toString(),
result, params);
           } catch (PINotFoundException e) {
               return document;
           }
  
  
  

Mime
View raw message