AKSW / jekyll-rdf

📃 A Jekyll plugin to include RDF data in your static site or build a complete site for your RDF graph
http://aksw.org/Projects/JekyllRDF
Other
57 stars 10 forks source link

Template selection precedence #244

Closed white-gecko closed 5 years ago

white-gecko commented 5 years ago

If we have the following class template mappings:

class_template_mappings:
  "http://xmlns.com/foaf/0.1/Person": "person"
  "http://example.org/Student": "student"
  "http://example.org/Professor": "professor"

this data

@prefix ex: <http://example.org/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

ex:Student rdfs:subClassOf foaf:Person .
ex:Professor rdfs:subClassOf foaf:Person .

ex:personA a foaf:Person .
ex:personB a foaf:Person, ex:Student .
ex:personC a foaf:Person, ex:Professor .
ex:personD a foaf:Person, ex:Student, ex:Professor .

than http://example.org/personA should be rendered with person, http://example.org/personB should be rendered with student, http://example.org/personC should be rendered with professor, and http://example.org/personD should produce a warning and should be rendered randomly with professor or student.