not sure if you've already looked into this but have you considered using an InputOutputFilter for this?
Take a look at section 4.2 ("Meta-data and Filters") of the Programmers Guide for more info.
Hello there Daniel!
Thanks for the hint...it seems promising.
I will do some prototyping to verify my needs.