Web和XML + XSL的标记

时间:2022-02-14 03:31:19

Is it possible to use Mark of the Web in XML file which is parsed by a local XSL file?

是否可以在XML文件中使用由本地XSL文件解析的Web标记?

When I insert MOTW mark:

当我插入MOTW标记时:

<!-- saved from url=(0014)about:internet -->

i get following message:
Access is Denied. Error Processing Resource.

我得到以下消息:访问被拒绝。处理资源时出错。


Ok, I see that I was trying to do it wrong - I wanted to insert this comment into XML.

好吧,我看到我试图做错了 - 我想把这个评论插入XML。

I have three files: XML with data, XSL to transform the data into html, and JS file with JavaScript functions. As you said, I want to get rid of the Internet Explorer orange bar.

我有三个文件:带数据的XML,用于将数据转换为html的XSL,以及带有JavaScript函数的JS文件。正如你所说,我想摆脱Internet Explorer橙色吧。

Putting everything on IIS or Apache is good way, but I want to open these files localy.

将所有内容放在IIS或Apache上是好方法,但我想在本地打开这些文件。

I tried to insert xml:comment tag, but nothing happened (the bar is still showing).

我试图插入xml:comment标签,但没有任何反应(条形图仍在显示)。

3 个解决方案

#1


1  

From the looks of it - no. MOTW here forces the "Internet" Zone upon the whole process, so accessing local resources is off limits. The error message you get expresses this fact.

从它的外观 - 没有。 MOTW在整个过程中强制“互联网”区域,因此访问本地资源是不受限制的。您得到的错误消息表达了这一事实。

If testing your page is what you try to do, you will have to fetch it from a web server, alongside with the XSL. The IIS on your machine, accessed through "http:/localhost/..." would be good enough.

如果测试您的页面是您尝试做的,您将不得不从Web服务器和XSL一起获取它。通过“http:/ localhost / ...”访问的计算机上的IIS就足够了。

#2


1  

I've tried several variations of <xsl:comment> saved from url=(0014)about:internet </xsl:comment>. The MOTW just doesn't work for pages generated through XSLT.

我已经尝试了从url =(0014)保存的 的几种变体:internet 。 MOTW对于通过XSLT生成的页面不起作用。

#3


0  

Adding the MOTW (Mark of the web) will only help you when loading a local page with JavaScript to not see the silly yellow warning bar. (AFAIK)

添加MOTW(Web标记)只会在使用JavaScript加载本地页面时看不到愚蠢的黄色警告栏。 (据我所知)

If this is your intention, can you not just use:

如果这是你的意图,你不能只使用:

<xsl:comment> saved from url=(0014)about:internet </xsl:comment>

as the output just before your DOCTYPE / html tag.

作为DOCTYPE / html标记之前的输出。

#1


1  

From the looks of it - no. MOTW here forces the "Internet" Zone upon the whole process, so accessing local resources is off limits. The error message you get expresses this fact.

从它的外观 - 没有。 MOTW在整个过程中强制“互联网”区域,因此访问本地资源是不受限制的。您得到的错误消息表达了这一事实。

If testing your page is what you try to do, you will have to fetch it from a web server, alongside with the XSL. The IIS on your machine, accessed through "http:/localhost/..." would be good enough.

如果测试您的页面是您尝试做的,您将不得不从Web服务器和XSL一起获取它。通过“http:/ localhost / ...”访问的计算机上的IIS就足够了。

#2


1  

I've tried several variations of <xsl:comment> saved from url=(0014)about:internet </xsl:comment>. The MOTW just doesn't work for pages generated through XSLT.

我已经尝试了从url =(0014)保存的 的几种变体:internet 。 MOTW对于通过XSLT生成的页面不起作用。

#3


0  

Adding the MOTW (Mark of the web) will only help you when loading a local page with JavaScript to not see the silly yellow warning bar. (AFAIK)

添加MOTW(Web标记)只会在使用JavaScript加载本地页面时看不到愚蠢的黄色警告栏。 (据我所知)

If this is your intention, can you not just use:

如果这是你的意图,你不能只使用:

<xsl:comment> saved from url=(0014)about:internet </xsl:comment>

as the output just before your DOCTYPE / html tag.

作为DOCTYPE / html标记之前的输出。