I need to embed RDFa data into HTML using Schema.org and DBpedia.
Here is the HTML code (without DBpedia):
<div vocab="https://schema.org/" typeof="Organization">
<span property="name">Google</span>
About the company:
About:<span property="description">Google LLC (/ˈɡuːɡəl/) is an American multinational technology company that focuses on search engine technology, online advertising, cloud computing, computer software.....</span>,
Logo:<span property="logo">http://commons.wikimedia.org/wiki/Special:FilePath/Google_2015_logo.svg?width=300</span>
I would like to declare also that the information is from DBpedia.
For example for the first line of code, I want to add also that the typeof="Organization" is also a dbo:Company or sameAs.
For the second line of code, I want to add that the property="name", Google is the rdfs:label of https://dbpedia.org/page/Google
The 4th line of code the property="description" is actually the rdfs:comment from https://dbpedia.org/page/Google page.
And the last line of code, the property="logo" is the dbo:thumbnail of https://dbpedia.org/page/Google page which is http://commons.wikimedia.org/wiki/Special:FilePath/Google_2015_logo.svg?width=300.
To apply properties/types from different ontologies, it’s best to use RDFa’s prefix
(instead of vocab
):
<html prefix="schema: http://schema.org/ rdfs: http://www.w3.org/2000/01/rdf-schema# dbo: http://dbpedia.org/ontology/ owl: http://www.w3.org/2002/07/owl#">
<div typeof="schema:Organization dbo:Company">
<span property="schema:name rdfs:label">Google</span>
<span property="schema:description rdfs:comment">Google is an …</span>
<img property="schema:logo dbo:thumbnail" src="http://commons.wikimedia.org/wiki/Special:FilePath/Google_2015_logo.svg?width=300" alt="" />
<!-- see note 1 -->
</div>
To state that the organization you describe is the same organization DBpedia describes, you can add:
<link property="owl:sameAs" href="http://dbpedia.org/resource/Google" />
<!-- see note 2 -->
All that doesn’t convey which values you took from DBpedia, though. To state the source of each single statement, you could use reification (making statements about statements).
Instead of using that elaborate method, maybe it would work for you to just state the content license (+ attributing DBpedia) of your page, or page section.
Note 1: To get a URL (instead of a string) as value for schema:logo
/dbo:thumbnail
, make sure to use an HTML element with href
or src
attribute (a
, img
, link
etc.).
Note 2: Make sure to use the URI with /resource/
(which represents the thing), not /page/
(which represents the page about the thing).