cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@sundn.de>
Subject AW: cvs commit: xml-cocoon2/src/org/apache/cocoon/transformation TraxTransformer.java
Date Thu, 05 Jul 2001 07:06:45 GMT
> Giacomo Pati wrote:
>
> On Thu, 5 Jul 2001, Vadim Gritsenko wrote:
>
> > Giacomo,
> >
> > Previously it was possible to cache results for request
> > such as "page?param=value1" and "page?param=value2"
> > independently.
> >
> > This change would effectively disable cache for such
> > kind of requests. :(
> >
> > PS:
> > Previously key was generated from string like:
> > 	"systemid{param=value1}",
> > now it looks like:
> > 	"systemidparam"
>
> Well, I thought this is the right way to specify keys. Maybe Carsten can
> enlight us more. Isn't it true that the genKey method should use the
> NAMEs to build the key whereas the validate method takes the values into
> account.
>
Here is the light....

No, honestly, I think you are right:

The key identifies all input used by the transformer apart from the sax
stream,
so I think the key should contain also the parameter names (if they are used
by the transformer).
Then the validity objects validate the values of the parameters.

Carsten

> Giacomo
>
> >
> > Vadim
> >
> >
> > > -----Original Message-----
> > > From: giacomo@apache.org [mailto:giacomo@apache.org]
> > > Sent: Wednesday, July 04, 2001 14:56
> > > To: xml-cocoon2-cvs@apache.org
> > > Subject: cvs commit: xml-cocoon2/src/org/apache/cocoon/transformation
> > > TraxTransformer.java
> > >
> > >
> > > giacomo     01/07/04 11:56:15
> > >
> > >   Modified:    src/org/apache/cocoon/transformation Tag:
> cocoon_20_branch
> > >                         TraxTransformer.java
> > >   Log:
> > >   fixed getKey method
> > >
> > >   Revision  Changes    Path
> > >   No                   revision
> > >
> > >
> > >   No                   revision
> > >
> > >
> > >   1.15.2.5  +12 -5
> xml-cocoon2/src/org/apache/cocoon/transformation/TraxTransformer.java
> > >
> > >   Index: TraxTransformer.java
> > >   ===================================================================
> > >   RCS file:
> /home/cvs/xml-cocoon2/src/org/apache/cocoon/transformation/TraxTra
> nsformer.java,v
> > >   retrieving revision 1.15.2.4
> > >   retrieving revision 1.15.2.5
> > >   diff -u -u -r1.15.2.4 -r1.15.2.5
> > >   --- TraxTransformer.java	2001/06/28 09:58:24	1.15.2.4
> > >   +++ TraxTransformer.java	2001/07/04 18:56:14	1.15.2.5
> > >   @@ -17,6 +17,7 @@
> > >    import java.util.Iterator;
> > >    import java.util.Iterator;
> > >    import java.util.Map;
> > >   +import java.util.StringBuffer;
> > >    import javax.xml.transform.Templates;
> > >    import javax.xml.transform.TransformerConfigurationException;
> > >    import javax.xml.transform.TransformerFactory;
> > >   @@ -100,7 +101,7 @@
> > >     * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
> > >     * @author <a href="mailto:cziegeler@apache.org">Carsten
> Ziegeler</a>
> > >     * @author <a href="mailto:giacomo@apache.org">Giacomo Pati</a>
> > >   - * @version CVS $Id: TraxTransformer.java,v 1.15.2.4
> 2001/06/28 09:58:24 cziegeler Exp $
> > >   + * @version CVS $Id: TraxTransformer.java,v 1.15.2.5
> 2001/07/04 18:56:14 giacomo Exp $
> > >     */
> > >    public class TraxTransformer extends ContentHandlerWrapper
> > >    implements Transformer, Composable, Recyclable,
> Configurable, Cacheable, Disposable, URIResolver {
> > >   @@ -363,11 +364,17 @@
> > >                HashMap map = getLogicSheetParameters();
> > >                if (map == null) {
> > >                    return
> HashUtil.hash(this.inputSource.getSystemId());
> > >   -            } else {
> > >   -                return
> HashUtil.hash(this.inputSource.getSystemId() + map);
> > >   -            }        } else {
> > >   -            return 0;
> > >   +            }
> > >   +
> > >   +            StringBuffer sb = new StringBuffer();
> > >   +            sb.append(this.inputSource.getSystemId());
> > >   +            Object [] a = map.keySet().toArray();
> > >   +            for (int i = 0; i < a.length; i++) {
> > >   +                sb.append((String)a[i]);
> > >   +            }
> > >   +            return HashUtil.hash(sb.toString());
> > >            }
> > >   +        return 0;
> > >        }
> > >
> > >        /**
> > >
> > >
> > >
> > >
> > > ----------------------------------------------------------------------
> > > 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
> > >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message