Hi,
I found on the internet a way to fool IE into rendering a true xhtml page, which it will not normally do. You take the <?xml header of the xhtml file and amend it to reference this stylesheet: on your server:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <xsl
utput method="xml" encoding="utf-8"/> <xsl:template match="/"> <xsl:copy-of select="node"/> </xsl:template> </xsl:stylesheet>
and send the amended xhtml file with mime application/xml instead of text/html. Then, even if the xhtml file has references to schemas elsewhere and xml tags that use those schemas and make no sense as html, the IE browser will display the document.
The reason this relates to this forum, is that I want to manipulate dom elements of the iframe that holds this ie rendered xhtml file, and change set the class of the span element dynamically to a class with a style that is referenced (by dynamic insertion) in the xhtml file.
When I serve the document to IE as xml, I am able to get DOM elements, but the changing of the class of the span is ignored. Whereas, serving as a mime xhtml to a firefox browser, I am successfully able to dynamically change the class of span elements in the iframe.
Basically, I want to both get IE to render xhtml, and be able to get IE to recognize changes to the DOM element's style.
Thanks,
Andy
I found on the internet a way to fool IE into rendering a true xhtml page, which it will not normally do. You take the <?xml header of the xhtml file and amend it to reference this stylesheet: on your server:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <xsl
and send the amended xhtml file with mime application/xml instead of text/html. Then, even if the xhtml file has references to schemas elsewhere and xml tags that use those schemas and make no sense as html, the IE browser will display the document.
The reason this relates to this forum, is that I want to manipulate dom elements of the iframe that holds this ie rendered xhtml file, and change set the class of the span element dynamically to a class with a style that is referenced (by dynamic insertion) in the xhtml file.
When I serve the document to IE as xml, I am able to get DOM elements, but the changing of the class of the span is ignored. Whereas, serving as a mime xhtml to a firefox browser, I am successfully able to dynamically change the class of span elements in the iframe.
Basically, I want to both get IE to render xhtml, and be able to get IE to recognize changes to the DOM element's style.
Thanks,
Andy