We have done this in
Jewels Application framework.
All output is porduced as a XML fragments, they are clued together and then converted
to HTML. Your 'component' is called 'Jewel' here (hence the name).
It runs in Apache/mod_perl environment. Have a look at it (
jewels.bgs.sk).