问题描述
早在2002年,IETF就在 RFC 3406 中建议我们使用x-
我们不想注册的URN名称空间的前缀,例如urn:x-acme:foobar
.现在,IETF已弃用 RFC 6648 中的x-
前缀,为我们不打算注册的名称空间构造URN?
As recently as 2002 the IETF was recommending in RFC 3406 that we should use x-
prefixes for URN namespaces we didn't want to register, e.g. urn:x-acme:foobar
. Now that the IETF has deprecated the x-
prefix in RFC 6648, how are we supposed to construct URNs for namespaces we don't intend to register?
顺便说一句,我注意到RFC 6648特别提到了URN:在几乎所有使用协议参数的应用程序协议中(包括... URN ...),名称空间均不受任何限制或约束. ,因此无需为私人使用或实验目的分配名称块."我发现这有点奇怪,正如RFC 3406所说,"URN命名空间的空间是受管理的.也就是说,并不是所有语法正确的URN命名空间(按照URN语法定义)都是有效的URN命名空间."
As an aside, I note that RFC 6648 specifically mentions URNs: "In almost all application protocols that make use of protocol parameters (including ... URNs ...), the name space is not limited or constrained in any way, so there is no need to assign a block of names for private use or experimental purposes." I find this an odd thing to say, as RFC 3406 claims, "The space of URN namespaces is managed. I.e., not all syntactically correct URN namespaces (per the URN syntax definition) are valid URN namespaces."
那么对于自定义但未注册的URN命名空间最好使用什么?我可以放下x-
并使用我的示例公司Acme使用诸如urn:acme:foobar
之类的URN吗?
So what is best to use for custom but unregistered URN namespaces? Can I just drop the x-
and use, for my example company Acme, a URN such as urn:acme:foobar
?
推荐答案
因此,使用RFC 3406定义的实验性NID 仍然可以.
So it’s still fine to use experimental NIDs as defined by RFC 3406.
对于新协议,RFC 6648 建议有什么建议(我假设,无论如何,本质上来说,这都是当前的URN(减去实验性的X-
前缀):
And what RFC 6648 recommends for new protocols (and, I assume, updates of existing protocols) is essentially what is currently the case with URNs anyway (minus the experimental X-
prefix):
- NID有一个可能无限的价值空间"
- 定义了清晰的注册程序"(我不知道他们在简单"下的理解)
因此,如果在更新的RFC中不推荐使用实验性X-
的NID,我不希望有必须注册NID的替代方法.
So in case experimental X-
NIDs should get deprecated in an updated RFC, I wouldn’t expect an alternative to having to register NIDs.
如果您不想注册NID(甚至不是非正式NID ),则可能要使用其他URI方案.我想到了 tag
.
If you don’t want to register NIDs (even not an Informal NID), you might want to use a different URI scheme. tag
comes to mind (tag:example.com,2013:foobar
).
这篇关于现在不推荐使用X-合适的URN名称空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!