gpt4 book ai didi

uri - 为什么 URN 是用于唯一标识资源的更流行的格式之一?

转载 作者:行者123 更新时间:2023-12-03 20:12:50 28 4
gpt4 key购买 nike

我有点理解 URN 用于为资源提供唯一且与位置无关的名称。然而,我看不到它们的用处以及它们的工作原理:

a) 为了让 URN 真正独一无二,必须有一些中央机构(类似于域名机构),我们可以在其中注册 URN,从而确保它们是唯一的。
既然没有任何这样的权威,我们如何确保我们的 URN 是独一无二的?如果我们不能。那么拥有它们有什么意义呢?

b) 另外,我不明白 URN 格式为 urn:NID:NSS 背后的原因。是什么让这种格式比 urn:NID:NID1:NSS 更高效/合乎逻辑?

c) 最后,URN 如何帮助我们在互联网上定位资源?

编辑:

I'm not sure what you mean. NID is the Namespace Identifier and NSS is the Namespace Specific String Are you proposing a system of sub-namespaces?



我只是想弄清楚为什么 URN 使用的格式比其他格式“一流”,例如 urn:NID:NID1:NSS

最佳答案

a) In order for URN to really be unique, there would have to be some central authority... Since there isn’t any such authority, how else do we make sure that our URNs are unique?



有一个 central authority ,称为 IANA,注册 namespaces (NID 部分),每个命名空间负责确保唯一性。

b) Also, I don’t understand the reasoning behind URNs having the format urn:NID:NSS. What makes this format more efficient/logical than for example urn:NID:NID1:NSS?



"urn:NID:NSS" description声明 NSS 的解释取决于 NID 的值。例如,如果 NID 是“isbn”,那么我们知道将 NSS 解释为 ISBN 号,如“urn:isbn:0451450523”。

NSS 部分可以包含冒号,因此“urn:example:other:more”是有效的语法。 (事实上​​是一个有效的 URN as of 2013-04-24 。)例如,给定“urn:mpeg:mpeg7:schema:2001”,NSS 部分是“mpeg7:schema:2001”,我们根据规则解释它 "mpeg" namespace .

如果需要“urn:NID:NID1:NSS”,它将是多余的(某些命名空间不需要嵌套的 NID1)和多余的(命名空间的权限已经可以将 NSS 部分分开,如上面的 mpeg例子)。

c) And finally, how can URN help us locate a resource on the internet?



URN 与位置无关,而是 URL .

关于uri - 为什么 URN 是用于唯一标识资源的更流行的格式之一?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2135450/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com