In a previous entry, I wrote about how it was impossible to get Google's AdSense to work in a document served as
Document.Write() does not work in XML, and Google uses it to create an
iframe for the ads.
After giving it a little more thought, I have come up with a solution. It is by no means elegant, because I have had to cheat a little bit. I create a separate
text/html document that contains the AdSense code, and then import that as an object into the
application/xhtml+xml. I then use CSS to hide the Buy Celebrex object from Internet Explorer. Since IE is being served
text/html anyway, it gets the regular AdSense
iframe that the
application/xhtml+xml cannot see.