You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Giacomo Pati <pa...@yahoo.com> on 2000/08/18 08:42:13 UTC

Re: cvs commit: xml-cocoon/conf sitemap.xmap cocoon.xconf

--- 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?

>      <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.

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

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

Re: cvs commit: xml-cocoon/conf sitemap.xmap cocoon.xconf

Posted by Giacomo Pati <Gi...@pwr.ch>.
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

Re: cvs commit: xml-cocoon/conf sitemap.xmap cocoon.xconf

Posted by Stefano Mazzocchi <st...@apache.org>.
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.

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.

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).

Comments?

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------