Safari中没有XSLTProcessor()支持? [英] No XSLTProcessor() support in Safari?

查看:114
本文介绍了Safari中没有XSLTProcessor()支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论出于何种原因,我都无法让 XSLTProcessor()一直工作。

For whatever reason, I can't get XSLTProcessor() to work all the time.

这里是我的JS:

... xsltProcessor = new XSLTProcessor();
xsltProcessor.importStylesheet(xmlRequest.responseXML);
// Pass variables
xsltProcessor.setParameter(null, "sectionNumber", section);
xsltProcessor.setParameter(null, "entryNumber", elementNo);

// Transform XML using XSL
var resultDocument = xsltProcessor.transformToFragment(phonebookDump,document);
// Append to document
document.getElementById('three').appendChild(resultDocument);

正常工作
OSX上的Firefox,$ b OSX上的$ b iPhone模拟器,OSX上的
Safari

Works fine in: Firefox on OSX, iPhone Simulator on OSX, Safari on OSX

中根本不起作用:
Mobile Safari在iPhone上,
Windows上的Safari

Doesn't work at all in: Mobile Safari on iPhone, Safari on Windows

我错过了什么吗?是否有解决方法 XSLTProcessor()?对于移动开发,服务器端XSLT处理会更快吗?

Am I missing something? Is there a workaround to XSLTProcessor()? Would server-side XSLT processing be quicker for mobile development anyways?

推荐答案

我很确定Mobile Safari不支持XSLT ,因为底层OS X实现不包括OS X桌面版本中存在的相关库。

I'm pretty sure Mobile Safari doesn't support XSLT, as the underlying OS X implementation does not include the relevant libraries that are present in desktop versions of OS X.

对于移动应用程序,服务器端处理肯定会更快无论如何:任何你可以合理地从手机转移到服务器的处理都是一场胜利。

Server-side processing would definitely be quicker for a mobile app anyway: any processing you can reasonably shift away from the phone to the server is a win.

这篇关于Safari中没有XSLTProcessor()支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆