cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: [Cocoon 2] Regex matchers :-)
Date Wed, 10 May 2000 13:41:18 GMT
Ross Burton wrote:
> 
> Well, I've bitten the bullet and decided to learn regex's properly.  And
> what better way then writing mod_rewrite for Cocoon 2!  :-)

<horribly-face-devastated-by-fear belongs-to="stefano">
AAAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!
</horribly-face-devastated-by-fear>
 
> At the moment I have knocked together a simple test class which does the
> actual work, using the recently released Jakarta Regex library.  I was about
> to turn this into a sitemap translator class, but there is no framework and
> no simple interfaces to implement...

...
 
> Pier - what are the design decisions in this area of the sitemap
> (LinkMatcher and LinkTranslator), and could they be made pluggable?  

When dealing with the sitemap, Pier and I _knew_ people would have asked
for this: full regexp in the sitemap. I personally find this a disaster.

> I would
> look into this more myself, but I have a computer architecture final exam in
> 10 days time and I still can't draw the inside of a MIPS processor...  :-(

Sounds a familiar problem to me :(
 
> What I plan to implement:
> * matching of URLs and rewriting based on backreferences (completed but not
> throughly tested)

Let me ask you: why?

My humble opinion is: if you need full regexp power to map your
resources to your URI space, you have a problem in your URI space.

I'd be happy to be proven wrong on this, but so far, nobody proposed me
a URI space that is not addressable with *,?,** wildcards.

On the other hand, I agree that no matter how hard I try to enforce my
vision, having this matching syntax fixed could create forking
frictions....

So, I'm ok to provide pluggable hooks for syntax matching engines, but
about shipping regexp matching engines with Cocoon, well, that's another
story.

> * inserting data in the parameters for this request (?)

no way, this is mod_rewrite and Cocoon doesn't need this kind of hacking
on the request since it has a full blown architecture to deal with this.
The sitemap does mapping, nothing else.

> * client-side redirects, for "out-dated" URLs.  This should really be used
> as a compatibility phase as Cocoon 2 based sites go public, as a public URL
> space should not change if it is well designed.

Can you elaborate more on this?

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



Mime
View raw message