Web Dev Matters and Me

Web Development Matters - HTML, XML, C#, .NET, AJAX/Javascript(jQuery), CSS, XML-XSLT

ME - LIFE,Philippines, Tokyo, ECE, PhilNITS/JITSE,情報処理, 日本語

things about Philippines, gaming, C# development and web development, how to make money in stock trading

Web Dev Matters and Me

XSLT8690: XSLT processing failed and all HTML are displayed as mere text

You checked for the encoding, you checked for the xsl output set to html, and even removed all the comments before the xsl template but still you are getting. All the contents displayed as plain text and when you checked your developer tool,

XSLT8690: XSLT processing failed

And frustrated to take hit on google to find the solution? well, relax because I encountered this once and even wasted almost a week worth of things to do because it works in Chrome, it works in Firefox, it works in Safari, but NOT IE...(8 or 9 too).


If I've done it right, then how come it is displaying properly in other browsers and NOT IT... I understand how you feel..


But the real reason is, you "might" have screwed it a little and those non-IE friends just wouldn't mind about it. Too bad that it will not tell you where did you get wrong (even if you sing out loud.. LOL).


We don't know where it got penalized by IE,so we're asking .NET side where. Using XslCompiledTransform.


It is simple, just instantiate XslCompiledTransform object and pass true in the constructor like this.

XslCompiledTransform sparemyxsl = new XslCompiledTransform(true);
sparemyxsl.Load(pathToYourStyleSheet);


Even if this stylesheet is using include or import, once you invoked the Load method, it will process all related XSL stylesheets, merge it and check what's going on. It will throw an exception when it finds something bad.


On my experience, I accidentally added an extra line of include that also refers to the same xsl file. It is a good start. (^_^). I hope you can find the fault part. 

Happy Coding.



and don't forget the namespace for XslCompiledTransform

System.Xml;
System.Xml.Xsl;

0 comments:

FB Connect