cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <Giacomo.P...@pwr.ch>
Subject Re: cvs commit: xml-cocoon/conf sitemap.xmap cocoon.xconf
Date Fri, 18 Aug 2000 23:08:19 GMT
Stefano Mazzocchi wrote:
> 
> Giacomo Pati wrote:
> >
> > --- stefano@locus.apache.org wrote:
> > > stefano     00/08/17 09:48:33
> > >
> > >   -   <map:serializer name="fo2pdf"
> > > src="org.apache.cocoon.serialization.FO2PDFSerializer"/>
> > >   +   <!-- <map:serializer name="fo2pdf"
> > > src="org.apache.cocoon.serialization.FOPSerializer"/> -->
> >
> > Are you planning to commit some samples to show the use of the changed
> > FOPSerializer?
> 
> Yes, right away.
> 
> > >      <map:matchers default="uri-regexp">
> > >   +   <map:matcher name="uri"
> > > factory="org.apache.cocoon.matching.WildcardURIMatcherFactory"/>
> >
> > Hey, take care! This matcher factory won't work!! It was meant as a
> > example and needs to be worked out. It's still not tested.

Well, I have to correct me here. I don't know if it's working or not but
I havent tested it, that's for sure.

> 
> I figured, but I was going to patch it. For now, I'll comment it out.
> 
> Anyway, question: a very simple way to implement this would be to
> transform wildcard patterns into regular expressions and then use the
> regexp code.

Would be a possibility. Simply instantiate a RegexpURIMatcherFactory,
pass it the pattern and return the result. 

> What do you think of this way of implementing it? regexp might be slower
> than wildcards, but for sure easier to write (well, anyway, it seems to
> me to be the case).

It feels regexp must be slower that wildcard. But the code currently in
the WildcardURIMatcherFactory is the one from Pierpaolo and that wasn't
too bad I think. I've split that code into a part that translates the
pattern into a binary representation which results in a static array
during sitemap generation and the comparison part done during request
evaluation. I think it's only a matter of someone test it a bit more
thoroughly than I did :)

Giacomo

-- 
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7                     Mailto:Giacomo.Pati@pwr.ch
CH-8166 Niederweningen                    Web:   http://www.pwr.ch

Mime
View raw message