You might have to create a custom control that pulls the content from the datasource.
This might be somewhat helpful. Might have to combine the HEAD HTML webpart and a Repeater. The HEAD HTML just adds a new literal control:
Page.Header.Controls.Add(new LiteralControl(HTMLCode));