Solved

javascript xslt transform in IE 11

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

792 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