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

Joe
Did you read this:
http://www.cs.virginia.edu/~jcw5q/talks/apache/bucketbrigades.ac2002.pdf

Sincerely,
Joachim



Reply via email to