Solved

javascript xslt transform in IE 11

Posted on 2015-02-18
3
832 Views
Last Modified: 2015-02-22
I have some code for applying a style sheet to xml that has been working correctly in IE 10 for quite some time. With IE 11, however, it fails on anything related to ActiveXObject. (My Chrome/Firefox code is still working correctly). This appears to be security-setting related, because if I open the html from the file system, it works just fine. I have tried enabling all of the ActiveX-related settings in the custom security screen, and I have tried setting the security level to low, both to no avail.

I believe I need a new way to apply a style sheet to an xml fragment that does not use the ActiveXObject. My primary requirement is that both the xsl and the xml must be strings, not files.

Thank you in advance.

Amy
0
Comment
Question by:AmyL
  • 2
3 Comments
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 40618425
Hi Amy,
just a thought: perhaps you want to utilize this Javascript library / jQuery plugin which enables also inline XML / XSLT:
http://johannburkard.de/software/xsltjs/

Have not yet used this plugin to all extents but in two smaller projects it worked very well.
HTH
Rainer
0
 

Author Comment

by:AmyL
ID: 40618771
Thank you. I took a look at the example code, and none of it shows the xsl/xml as strings. Do you know if the plugin has that capability?
0
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 500 total points
ID: 40618837
Hi,
according to the documentation, yes and it should look like this:
// If using the regular code
new Transformation()
    .setXml('<?xml version="1.0"?><bla/>')
    .setXslt('<?xml version="1.0"?><xsl:stylesheet …')
    .transform('rofl');

// If using the jQuery plugin
$('#rofl').xslt('<?xml version="1.0"?><bla/>',
    '<?xml version="1.0"?><xsl:stylesheet …');

Open in new window

http://johannburkard.de/blog/programming/javascript/xslt-js-version-3-2-released.html
HTH
Rainer
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question