Differences between rdf:resource, rdf:about and rdf:ID

前端 未结 2 531
伪装坚强ぢ
伪装坚强ぢ 2020-12-08 10:27

What are the conceptual differences between rdf:resource, rdf:about, and rdf:ID. I did some investigation but the difference between t

2条回答
  •  醉话见心
    2020-12-08 10:49

    I would like to clarify a few of the excellent points in the provided answer, but only with respect to rdf:ID and rdf:about.

    The tags are used to build a URI. If the full URI is not provided (such as rdf:ID="x"), then the generated URI is relative to the in-scope base URI usually derived from the document's location, but it can be specified with the xml:base attribute.

    The point (mentioned above) is that rdf:about may be a fully qualified URI, so it is easy to just set it.

    rdf:ID cannot be a fully qualified URI, but, you can still control that if you manually set the xml:base attribute.

    The general rule of thumb for me, therefore, is to use rdf:about for a "globally known" identifier (when you want the URI to always be the same) and to use rdf:ID when describing a local resource whose URI is not cared about outside of the current document.

提交回复
热议问题