我想創建一個關於會場信息的RDFS模式,其中包含例如:爲RDFS中的現有類定義額外的屬性?
地址信息和xxx
信息。
我發現它的另一個模式:https://schema.org/Place。它包含更多有關地址信息的屬性,但沒有關於xxx
的信息。
所以
我應該讓我的架構場地作爲https://schema.org/Place 子類,並添加新的特性?
<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:place="https://schema.org/Place#"
xml:base="http://localhost:3000/VenueSchema#">
<rdfs:Class rdf:ID="Venue">
<rdfs:subClassOf rdf:resource="https://schema.org/Place"/>
</rdfs:Class>
<rdf:Property rdf:ID="xxx">
<rdfs:domain rdf:resource= "#Venue">
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
</rdf:Property>
</rdf:RDF>
如果我使用的子類,並會場自動擁有從https://schema.org/Place屬性?或者不是繼承,我應該重用https://schema.org/Place,但是爲https://schema.org/Place聲明額外的屬性?類似下面的代碼:
<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:place="https://schema.org/Place#"
xml:base="http://localhost:3000/VenueSchema#">
<rdf:Property rdf:ID="xxx">
<rdfs:domain rdf:resource= "https://schema.org/Place">
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
</rdf:Property>
</rdf:RDF>
請問爲什麼您使用RDF/XML代替更人性化的RDF序列化(如Turtle)? – unor
@unor也許是因爲其他人呢?谷歌「rdfs示例」,看看你想出了什麼(非)多種語法。 –