为什么 Windows 资源管理器无法正确显示除 text/html 之外的其他类型的 OpenSearch 结果?

发布于 2024-12-20 22:47:12 字数 1471 浏览 4 评论 0原文

我正在尝试通过其 OpenSearch 集成在 Windows 7 资源管理器中显示来自 IBM Content Analytics 的 REST API 的结果。 REST API 针对每个搜索命中返回一个 Atom 提要,其中包含 元素。

我的问题是:一旦元素的 type 属性具有 text/html 以外的值, Windows 资源管理器中的相应搜索结果显示为“无可用信息”。在下面的最小示例中,只要删除 type="application/msword" 或将其值更改为 text/html,搜索命中就会正确显示。

<atom:entry>
  <atom:title>Hit B</atom:title>
  <atom:link rel="alternate" type="application/msword" href="http://192.168.111.130:8394/api/v10/document/content?collection=Search&amp;uri=file:///C:/DataFiles/Price%2BChange.doc" hreflang="en"/>
  <atom:id>file:///C:/DataFiles/Price+Change.doc</atom:id>
  <atom:summary>...B</atom:summary>
</atom:entry>

任何人都可以解释此行为或说明如何避免它并在 Windows 资源管理器中显示非 text/html 结果吗?

文档似乎很少,我找到的大部分内容都在下面链接的两个文档中,但我在那里没有找到有关此问题的任何内容。

I'm trying to display results from the REST API of IBM Content Analytics in Windows 7 Explorer through its OpenSearch integration. The REST API returns an Atom feed with an <atom:entry> element for each search hit.

My problem is: As soon as the type attribute of an element's <atom:link> has a value other than text/html, the respective search hit in Windows explorer is displayed as "No information available". In the below minimal example, the search hit is displayed correctly as soon as you remove the type="application/msword" or change its value to text/html.

<atom:entry>
  <atom:title>Hit B</atom:title>
  <atom:link rel="alternate" type="application/msword" href="http://192.168.111.130:8394/api/v10/document/content?collection=Search&uri=file:///C:/DataFiles/Price%2BChange.doc" hreflang="en"/>
  <atom:id>file:///C:/DataFiles/Price+Change.doc</atom:id>
  <atom:summary>...B</atom:summary>
</atom:entry>

Can anyone explain this behaviour or say how to avoid it and display non-text/html results in Windows Explorer?

Documentation seems scarce, most of the stuff I found was in the two documents linked below, but I didn't find anything on this issue there.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

把昨日还给我 2024-12-27 22:47:12

在RSS中,链接标签需要包含一个URLeg,

<link>http://www.google.com</link>. 

然后在文件管理器中显示标题、日期等。

相反,

<link href="http://www.google.com" /> 

会在文件管理器中显示“没有可用信息”。

对于 ATOM,您需要包括:

<link href="http://www.google.com" />

不带任何“rel”属性。然后你就可以在文件管理器中看到正确的信息了!

In RSS, the link tag needs to contain a URL e.g.

<link>http://www.google.com</link>. 

Then the title, date, etc. are displayed in the file manager.

Instead

<link href="http://www.google.com" /> 

would show "No information available" in the file manager.

For ATOM, you need to include:

<link href="http://www.google.com" />

without any "rel" attribute. Then you see the correct information in the file manager!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文