I have been searching for a while for a DOCTYPE tag that will make internet explorer standards-compliant for css with a normal xml document, as I want to use the white-space css attribute. This page states that using the "doctype 'XML'" should be enough for internet explorer 6+ to come through - But I have tried every DOCTYPE tag I could think of/ find in examples, without getting the expected results. Maybe I am missing something else here, but basically I think the right DOCTYPE tag (in the right place in the code) should do it.
Here is the code I am testing with:
Test.css:
Message {
white-space: pre-wrap;
}
Test.xml:
<?xml version="1.0"?>
<?xml-stylesheet href="Test.css" type="text/css"?>
<Message><![CDATA[
Some data
which is pre
formatted
]]></Message>
The example above works fine as-is in FF & Safari.