Solved

javascript xslt transform in IE 11

Posted on 2015-02-18
3
771 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
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.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now