httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Lewis <>
Subject Re: splitting a string...
Date Mon, 01 Jan 2007 02:02:31 GMT
Joachim Zobel wrote:
> Hi.
> Rethinkinking your problem I found that it is probably much easier to
> split the bucket in three, namely before_head, head, and after_head
> using apr_bucket_split and replace the head bucket.
That is exactly the technique I use in my template wrapper - I look 
through the buckets on output, and when I see the <title> tag, I have to 
make a copy of that.  Once I have it, I grab the template file, slap the 
title into a "variable" in the page, paste in the rest of the head tag 
if the page had one, and parse just a few other components.  The BEST 
way to do that is to split bucket brigades, and then just insert copys 
of the data in a bucket form, and delete the "variable" results.  I 
think a Ralph Bloom had a good "how to" for a simpler "template" 
wrapping module on a web page write up somewhere.  But, I second 
Joachim's advice - bucket brigades (that is what they were designed for, 

> Did you read this:
> Sincerely,
> Joachim

View raw message