Mobile app version of vmapp.org
Login or Join
Megan663

: Schema.org terms can act both as properties or types? I installed an RDF module on my Drupal 8 site and it seems that I can pick the exact options from the exact same list for both Content

@Megan663

Posted in: #SchemaOrg

I installed an RDF module on my Drupal 8 site and it seems that I can pick the exact options from the exact same list for both Content types (Drupal concept) as well as for fields.

It seems quite wired to me as I was sure that the terms using for S.org properties and the terms using for S.org types are different from one another.

Either each term can act both as a property or type, or otherwise I can't explain it.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Megan663

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ann8826881

Your assumption is correct. Schema.org types (aka. classes) are not supposed to be used as properties, and vice-versa. (Technically they could be used for anything, but it wouldn’t make sense to do this.)

But the RDF UI module is doing it correctly:


When editing a content type, you can select (under "Schema.org Mappings") a type:


Specify the type you want to associated to this content type e.g. Article, Blog, etc.


The autocomplete list correctly lists/suggests types, i.e., terms that start with an uppercase letter (like Thing).
When mapping a field (under "Manage fields" → "RDF Mappings"), you can select a property.

The autocomplete list correctly lists/suggests properties, i.e., terms that start with a lowercase letter (like name).


If you have a content type "Team member", you could map it to the Schema.org type Person, and the field "Title" could be mapped to the Schema.org property name.

Background

Note that it’s just a convention (followed by Schema.org and many other vocabularies) to start types with uppercase letters, and properties with lowercase letters. A vocabulary could as well use x8234 for a type and x8238 for a property.

If something is supposed to be a type or a property should ideally become clear in the vocabulary’s documentation, but the canonical definition can be found in the vocabulary’s RDF.

In case of Schema.org (canonical definition in RDFa), you can see that name is of type rdf:Property:




<div typeof="rdf:Property" resource="http://schema.org/name">
<!-- … -->
</div>



and Person is of type rdfs:Class:


<div typeof="rdfs:Class" resource="http://schema.org/Person">
<!-- … -->
</div>

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme