I thought that safari was a mozilla browser but it seems to be failing to load any of my xslt/xml. My site loads up fine in IE5, IE5.5, IE6, IE7, Firefox, Opera but not in Safari. I'm completely stumped about this. I'm using JavaScript to do the transformation on the client and I don't want to do server side.
Here is my Code:
This is quite annoying as my client just bought a Mac and I have to present this on her computer. So any help would be appreciated. thanks.
Here is my Code:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
<title>Solana Gallery - Contemporary russian art</title>
<script type="text/javascript">
var xmlDoc;
{
// code for IE
if (window.ActiveXObject)
{
// Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM");
xml.async=false;
xml.load("artistlist.xml");
// Load XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM");
xsl.async = false;
xsl.load("artistlist.xsl");
// Transform
document.write(xml.transformNode(xsl))
}
// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation && document.implementation.createDocument)
{
xmlDoc=document.implementation.createDocument("","",null);
xmlDoc.async=false;
xmlDoc.load("artistlist.xml");
var xsltProc = new XSLTProcessor();
var xsl=document.implementation.createDocument("","",null);
xsl.async=false;
xsl.load("artistlist.xsl");
xsltProc.importStylesheet(xsl);
xmlDoc=xsltProc.transformToDocument(xmlDoc);
var serializer=new XMLSerializer();
document.write(serializer.serializeToString(xmlDoc));
}
else
{
alert('Your browser cannot handle this script');
}
}
</script>
</head>
<body>
</body>
</html>
This is quite annoying as my client just bought a Mac and I have to present this on her computer. So any help would be appreciated. thanks.