Namespace的URL中带#的有什么不同?

hax 2002-06-13 01:18:35
http://www.w3.org/TR/rdf-primer/

1. <?xml version="1.0"?>
2. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
3. xmlns:ex="http://www.example.org/terms/">

4. <rdf:Description rdf:about="http://www.example.org/index.html">
5. <ex:creation-date>August 16, 1999</ex:creation-date>
6. </rdf:Description>
7. </rdf:RDF>

注释中有这样的话:
@@Not a URI with #; need to deal with this URI reference business@@

谁能帮我解释一下?

有人对我说:“我的理解就是以#结尾的东东不是URI(但#可以在URI中间出现的哦),所以也不是Namespace,所以用缺省的namespace来作为当前的namespace,缺省的namespace是由http://www.w3.org/1999/02/22-rdf-syntax-ns#定义的。……看了RFC2396,说URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]
...As such, it(Fragment Identifier) is not part of a URI, but is often used in conjunction with a URI. ...However, "the URI" that results from such a reference includes only the absolute URI after the fragment identifier (if any) is removed and after any relative URI is resolved to its absolute form. 总结:#后面的东东是注释性质的,不算做URI的一部分的。”

但是我还是不太明白,谁能解释?

我给乐于助人的大虾们准备了180分!如果回答得很有启发,我还可以再送100分。

...全文
158 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
daehappy 2002-07-09
  • 打赏
  • 举报
回复
up!gz!
hax 2002-07-09
  • 打赏
  • 举报
回复
鉴于以上的情况,180分准备送出给关心XML的同志,请大家到http://www.csdn.net/Expert/TopicView1.asp?id=849113 ,支持我对新版分类的建议(即将XML独立为大类)。

凡7月13日之前,到这个贴子报道的同志都有分。支持我的分类建议的,请在本贴注一下,我多给点。
hax 2002-07-09
  • 打赏
  • 举报
回复
此问题在饮水思源站XML版的clyb解决了。

发信人: clyb (java&xml), 信区: XML
标 题: Re: Namespace的URL中带#的有什么不同?
发信站: 饮水思源 (2002年07月06日16:23:19 星期六), 站内信件

这个问题我是这样理解的:
URI+#这样的表示不是URI,但是确实是Namespace。
如果把namespace n1定义为http://www.w3c.org/1999/02/22-rdf-syntax-ns#
那么n1:item2就可以构成另一个URI,她是
http://www.w3c.org/1999/02/22-rdf-syntax-ns#item2
不知道这样说对不对。

发信人: HAX (海曦), 信区: XML
标 题: Re: Namespace的URL中带#的有什么不同?
发信站: 饮水思源 (2002年07月06日18:38:35 星期六), 站内信件

茅塞顿开!你说到要害上了呀!虽然我知道n1:item2是完整形式的缩写法,
但是怎么就没想到这一层!好好好!

强烈建议mark!

还有你上csdn吗?我在那里的xml讨论区也发了该文,如果你到那里去,
我就送500分给你!

发信人: HAX (海曦), 信区: XML
标 题: RDF的namespace问题的最终解决
发信站: 饮水思源 (2002年07月07日01:49:30 星期天), 站内信件

http://www.w3.org/DesignIssues/Fragment.html


Fragment identifiers for RDF identify concepts

The semantic web has information about anything. The fragment
identifier on an RDF (or N3) document identifies not a part
of the document, but whatever thing, abstract or concrete,
animate or innanimate, the document describes as having that
identifier.

It is important, on the Semantic Web, to be clear about what
is identified. An http: URI (without fragment identifier)
necessarily identifies a generic document. This is because
the HTTP server response about a URI can deleiver a rendition
of (or location of, or apologies for) a document which is
identified by the URI requested. A client which understands
the http: protocol can immediately conclude that the
fragementid-less URI is a generic document. This is true even if the publisher (owner of the DNS name) has decided
not to run a server. Even if it just records the fact that
the document is not available online, still a client knows
it refers to a document. This means that identifiers for
arbitrary RDF concepts should have fragment identifiers.
This, in turn, means that RDF namespaces should end with "#".
pzma 2002-06-17
  • 打赏
  • 举报
回复
我理解是“通配符”。意思是在此之下的任何版本均可用。因为无论如何也免不了对namespace进行升级、扩充等。
hax 2002-06-16
  • 打赏
  • 举报
回复
没有人要分吗?
wangwenyou 2002-06-14
  • 打赏
  • 举报
回复
URI只是一种标识符,没有什么具体的实际意义,XML解释者并不会去真正访问其指定的位置。它的定义只要遵从相应的RFC文档定义标准即可。
个人认为Namespace的作用相当于Java的package,仅用于限定访问。鄙薄之见,还望赐教!

8,906

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧