Solved

javascript xslt transform in IE 11

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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 an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

685 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