如何从 XML 上的另一台服务器 link XSLT
How to link XSLT from another server on XML
在我的 XML 文件中
<?xml version="1.0" encoding='utf-8'?>
<?xml-stylesheet type="text/xsl" href="http://anotherServerLocation/file.xslt" ?>
我得到:
XML-25026: Stylesheet URL references an untrusted server.
如果我在应用程序中添加 XSLT 文件并仅调用 file.xslt,它会起作用。
我也可以用浏览器打开 XSLT 文件。
你不能。
您的 error message can be found in the list of XSQL Server Pages Error Messages 是不言自明的。您不能从远程 URL 加载 XSLT 文件。原因是出于 XSS 安全问题。您必须从与 XML 文件相同的来源提供服务。
在我的 XML 文件中
<?xml version="1.0" encoding='utf-8'?>
<?xml-stylesheet type="text/xsl" href="http://anotherServerLocation/file.xslt" ?>
我得到:
XML-25026: Stylesheet URL references an untrusted server.
如果我在应用程序中添加 XSLT 文件并仅调用 file.xslt,它会起作用。
我也可以用浏览器打开 XSLT 文件。
你不能。
您的 error message can be found in the list of XSQL Server Pages Error Messages 是不言自明的。您不能从远程 URL 加载 XSLT 文件。原因是出于 XSS 安全问题。您必须从与 XML 文件相同的来源提供服务。