将 RDF URI 引用与物理 URL 相关联
有没有一种方法 - 在 RDF 文档内 - 为 URI 引用指定物理 URL?也就是说,与 XML 模式文档中的 xsi:schemaLocation 执行相同工作的东西?
我知道“正确”的方法是使用 URI 通过内容协商进行 303 重定向,但如果设置重定向很麻烦,我的 RDF 文档本身可以解释一下
http://foo.bar. com/voc/SpecialSettings
获取的
是从物理位置http://server1.bar.com/prod/app3/SpecialSettings.owl
?
更新:我们通过向服务器解释它需要发送重定向来解决这个问题。请参阅http://biodiversity.org.au/voc/ibis/IBIS
Is there a way of - inside an RDF document - specifying a physical URL for URI references? That is, something that does the same job as xsi:schemaLocation in XML schema documents?
I understand that the "correct" way to do it is with the URI doing a 303 redirect with content negotiation, but if setting up redirects is a hassle, can my RDF document itself explain that
http://foo.bar.com/voc/SpecialSettings
is to be fetched from the physical location
http://server1.bar.com/prod/app3/SpecialSettings.owl
?
Update: we resolved this by explaining to the server that it needed to send redirects. See http://biodiversity.org.au/voc/ibis/IBIS
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这对于标准 RDF 来说是不可能的。 AFAIR,这种额外的复杂性是故意避免的。
你可以欺骗并在本体论中说 http://foo.bar.com/voc/SpecialSettings 是 owl:sameAs http://server1.bar.com/prod/app3/ SpecialSettings.owl。然后,理解 owl:sameAs 的程序可能会尝试两个 URL 并组合从两个 URL 获取的信息,在这种情况下,第一个 URL 中将没有任何内容,而第二个 URL 中将包含所有内容。但没有多少程序和库会自动执行此操作。从本体论的角度来看,这也是可疑的。作为数据提供者,您应该为您的资源提供一个规范的 URL。
对于此类问题,我的第一个参考是如何在网络。
This is not possible with standard RDF. AFAIR, this additional complexity was deliberately avoided.
You could cheat and say in an ontology that http://foo.bar.com/voc/SpecialSettings is owl:sameAs http://server1.bar.com/prod/app3/SpecialSettings.owl. Then a program that understands owl:sameAs might try both URLs and combine the information it gets from both, which in that case would be nothing from the first one and everything from the second one. But not many programs and libraries will do this automatically. It's also fishy from an ontological perspective. You, as the data provider, should provide one canonical URL for your resources.
For this kind of question, my first reference is How to Publish Linked Data on the Web.
我不确定它是否相关,但本体作为普通(或物理)网络文档提供。以OWL本身为例:
I'm not sure if it's relevant, but ontologies are served up as vanilla (or physical) web documents. Take OWL itself for example: