This is my XHTML/PHP file:
<? header('Content-type: application/xhtml+xml')?>
<?="<?xml version=\"1.0\" encoding=\"utf-8\"?>"?>
<?="<?xml-stylesheet type=\"text/xsl\" href=\"ie-fix.php\"?>"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
</head>
<body>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript">
$("body").html("test");
</script>
</body>
</html>
This is the XSL/PHP file (ie-fix.php
):
<? header('Content-type: text/xsl')?>
<?="<?xml version=\"1.0\" encoding=\"utf-8\"?>"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml" version="1.0">
<xsl:output method="xml" encoding="utf-8"></xsl:output>
<xsl:template match="/">
<xsl:copy-of select="node()"></xsl:copy-of>
</xsl:template>
</xsl:stylesheet>
I created it as explained here: http://www.w3.org/MarkUp/2004/xhtml-faq#ie
My code doesn't work in Safari 5.0, the errors I'm getting are:
TypeError: Result of expression 'd.style' [null] is not an object.
ReferenceError: Can't find variable: $
Could anyone help, please? Thanks!