[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1056
  • Last Modified:

javascript xslt transform in IE 11

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
AmyL
Asked:
AmyL
  • 2
1 Solution
 
Rainer JeschorCommented:
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
 
AmyLAuthor Commented:
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
 
Rainer JeschorCommented:
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

Technology Partners: 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!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now