R
Robert Mark Bram
Hi All,
I have a page that uses XSLT to render some XML as HTML inline. The
page works when deployed to Apache and viewed through Firefox. The
SAME code deployed to WAS does not work when viewed through Firefox!
Here is my HTML:
<html><head>
<script type="text/javascript" >
function loadXMLDoc(fileName) {
var xmlDoc;
xmlDoc = document.implementation.createDocument("", "", null);
xmlDoc.async = false;
xmlDoc.load(fileName);
return(xmlDoc);
}
function displayResult() {
xml = loadXMLDoc("test.xml");
xsl = loadXMLDoc("treeviewReduced.xslt");
xsltProcessor = new XSLTProcessor();
xsltProcessor.importStylesheet(xsl);
resultDocument = xsltProcessor.transformToFragment(xml,document);
document.getElementById("theDiv").appendChild(resultDocument);
}
</script>
</head><body onload="displayResult();">
<div id="theDiv" ><p>The DIV</p></div>
</body></html>
I have deployed it to my Apache at this address:
- http://localhost/test.html
This works on Firefox - I see the xml rendered as HTML.
I have deployed it to my IBM WAS at this address:
- http://localhost:9080/docPublisher/robindex.jsp
This does NOT work on Firefox - There is no HTML rendered in place.
In both instances (WAS and Apache), test.xml and treeviewReduced.xslt
exist in the same directory as the jsp/html. I can replace "test.html"
and "robindex.jsp" with both xml file names and see the xml
documents.
In both instances (WAS and Apache), the IE version of this code works
- using the same relative xml file names.
In the case of the HTML file, I can double click on it and have it
come up correctly in Firefox.
I don't think this is a problem with Firefox or my JavaScript, but I
am at a complete loss to understand why this is happening. Any
assistance would be appreciated!
Rob
I have a page that uses XSLT to render some XML as HTML inline. The
page works when deployed to Apache and viewed through Firefox. The
SAME code deployed to WAS does not work when viewed through Firefox!
Here is my HTML:
<html><head>
<script type="text/javascript" >
function loadXMLDoc(fileName) {
var xmlDoc;
xmlDoc = document.implementation.createDocument("", "", null);
xmlDoc.async = false;
xmlDoc.load(fileName);
return(xmlDoc);
}
function displayResult() {
xml = loadXMLDoc("test.xml");
xsl = loadXMLDoc("treeviewReduced.xslt");
xsltProcessor = new XSLTProcessor();
xsltProcessor.importStylesheet(xsl);
resultDocument = xsltProcessor.transformToFragment(xml,document);
document.getElementById("theDiv").appendChild(resultDocument);
}
</script>
</head><body onload="displayResult();">
<div id="theDiv" ><p>The DIV</p></div>
</body></html>
I have deployed it to my Apache at this address:
- http://localhost/test.html
This works on Firefox - I see the xml rendered as HTML.
I have deployed it to my IBM WAS at this address:
- http://localhost:9080/docPublisher/robindex.jsp
This does NOT work on Firefox - There is no HTML rendered in place.
In both instances (WAS and Apache), test.xml and treeviewReduced.xslt
exist in the same directory as the jsp/html. I can replace "test.html"
and "robindex.jsp" with both xml file names and see the xml
documents.
In both instances (WAS and Apache), the IE version of this code works
- using the same relative xml file names.
In the case of the HTML file, I can double click on it and have it
come up correctly in Firefox.
I don't think this is a problem with Firefox or my JavaScript, but I
am at a complete loss to understand why this is happening. Any
assistance would be appreciated!
Rob