RDF
2016.10.28
Resource Description Framework
使用 Attributes 代替 elements
使用 Attributes 代替 elements
一對 property/value 可以使用 XML attribute 而不用 sub-element,如果以下條件成立的話:
- value 是一個字串
- 這個 property 只有一個 value
例如:
<rdf:Description ID=“John_Cowan” email=“cowan@ccil.org”>
<xx:homepage resource=“...”/>
</rdf:Description>
巢狀的 descriptions (Nested descriptions)
巢狀的 descriptions (Nested descriptions)
當 value 是一個 proxy resource,可以把它放在 property element 裡面:
<rdf:Description about=“...”>
<xx:author>
<rdf:Description ID=“John_Cowan”>....</rdf:Description>
</xx:author>
</rdf:Description>
國際化 Internationalization
國際化 Internationalization
- RDF property 名稱在所有的 locales 都是一樣的
- RDF 字串值 根據最近的上層 “xml:lang” attribute
- “xml:lang” 典型值: en-US, en-UK, ja-JP, he, i-no-nyn
RDF Classes
RDF Classes
- 它是一群 Web resources
- 有 URL 可以 identify 它們
- 「rdfs:Literal」這個特別的 class 是由所有可能的字串值所組成
參考資源
參考資源
W3C 的 RDF 1.1, 2014