keyword: semantic web
RDF is a general method to decompose any type of knowledge into small pieces, with some rules about the semantics, or meaning, of those pieces. The point is to have a method so simple that it can express any fact, and yet structured enough that computer applications can do useful things with it.
RDF 是一種,透過一些語義的、意義的規則,將知識分解為小片段的方法。要點在於這個方法非常簡單,以至於可以表現任何事實,並且也足夠結構化到讓電腦程式可以處理。
雖然 RDF 的標準中有使用 XML 規範,但 RDF 不一定必須使用 XML 來陳述。例如可以使用 Notation 3
@prefix : <http://www.example.org/> . :john a :Person . :john :hasMother :susan . :john :hasFather :richard . :richard :hasBrother :luke .
的寫法與用 XML 來陳述意義是一樣的
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ns="http://www.example.org/#">
<ns:Person rdf:about="http://www.example.org/#john">
<ns:hasMother rdf:resource="http://www.example.org/#susan" />
<ns:hasFather>
<rdf:Description rdf:about="http://www.example.org/#richard">
<ns:hasBrother rdf:resource="http://www.example.org/#luke" />
</rdf:Description>
</ns:hasFather>
</ns:Person>
</rdf:RDF>
RDF can be defined in three simple rules: