Hi, I have a very strange situation. I am developing a web based application where all processing is handled by serverside Javascript. The script uses a stylesheet to display the results from Tamino.
Now the strange thing is that some clients can see the output produced by the stylesheet and others only see the hard coded html minus all the stylesheet processing.
All clients use IE5.5Sp2, and run on Win2k Pro, Server or NT.
If its serverside processing the clients simply receive HTML, so why are the processing instructions being ignored on some clients??
Can you please give us a bit more detail on exactly how you are executing the transformation from xml to html. If you are somehow using the MSXML ActiveX control installed on the client machines, then different client versions could easily explain your problem, but you say your javascript executes server-side. I’m not sure what you mean by this. Are you using javascript jsp pages perhaps?
Reading between the lines of your description, it looks to me as if you are inserting an <?xml-stylesheet?> processing intruction into the XML, and then sending the XML to the client. Is that a correct reading?
If so, your problem is easily explained: some of the client machines have MSXML3 (Microsoft’s XSLT processor) installed in replace mode, others don’t. See the MSXML FAQ at http://www.netcrucible.com/ for details.
Unless you can control the configuration of the client PCs, you will have to do the XSLT transformation on the server, at least for those clients who don’t have the software installed in the browser.
Your stylesheet will generate SCRIPT tags for java scripts “Skills.js” and “TaminoLib.js”, and these will be executed client-side by the browser. What does Skills.js do? I think the suspicion is still firmly with MSXML being the wrong version on some clients, as per Mike’s and my previous posts. It might help to install the latest MSXML on one of the “broken” clients to see if it fixes the problem.
I will install the latest MSXML on one of the clients and see what happens.
Skills.js contains functions to create a XML document and submit to Tamino, it also contains various functions to add new rows and cells to the tables contained in DisplayCategories.xsl
It’s also possible you are getting some error when you retrieve your Tamino data from the asp page. You could change the code for the page to check for parse errors like this:
code:
… var out = xmlDoc.load(sourceFile); if (xmlDoc.parseError != 0) Response.Write (“Error parsing Tamino response:” + xmlDoc.parseError.reason); var styleFile = Server.MapPath(“DisplayCategories.xsl”); // Load the XSL var style = new ActiveXObject(“Msxml2.DOMDocument”); style.async = false; style.load(styleFile); if (style.parseError != 0) Response.Write (“Error parsing Stylesheet:” + style.parseError.reason); Response.Write(xmlDoc.transformNode(style));
… So now if there are any errors either in the xml data or in the stylesheet, your users will see the problem in their browser. HTH
Bill, Thanks for the code suggestions to trap error messages. What was happeningw as Tamino wasnt providing a response. It was a permissions problem. :rolleyes:
Only administrators had access, and as I am a domain admin it was working for me.
Now I have changed the permsissions and all is fine.