You could do this type of thing by adding all possible content to the prolog and using profiling attributes to filter out the ones you do not want to see. Another option - if your variable source info is stored in a database - is to use my forthcoming Smart Product Data product, which allows you to an element in your DITA to items in a database. You can then define the item to be retrieved at the topic level, causing the right source information to be pulled into the <prolog> of every topic. I am still working on completing the product (need to create a GUI for <oXygen/> and complete the one for FrameMaker) but the basic method works and it looks like you could set the attribute values manually without running into trouble. It would be interesting to see a real-life solution based on my product. Check out the info on smartdata dot world and drop me a message if you are interested.
Jang F.M. Graat
Smart Information Design