Chrome and Safari XSLT using JavaScript

前端 未结 2 1483
心在旅途
心在旅途 2020-12-01 04:45

I have the following code that applies a XSLT style

Test.Xml.xslTransform = function(xml, xsl) {
    try {
        // code for IE
        if (window.ActiveX         


        
2条回答
  •  时光说笑
    2020-12-01 05:29

    This is not an answer to the original question but during my search over internet looking for a sample xslt transformation that works on chrome I found links to this thread many times. I was looking for a solution that doesn't use any open-source or third party libraries/plugins and works well with silverlight.

    The problem with chrome and safari is the limitation that prevents loading xml files directly. The suggested workaround at http://www.mindlence.com/WP/?p=308 is to load the xml file via any other method and pass it as a string to the xslt processor.

    With this approach I was able to perform xsl transformations in javascript and pass on the result to silverlight app via HTML Bridge.

提交回复
热议问题