Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Resource Description Framework
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Example 1: Description of a person named Eric Miller === The following example is taken from the W3C website<ref name="rdf-primer">{{cite web|url= http://www.w3.org/TR/rdf-primer/|title= RDF Primer |publisher=[[W3C]]|access-date=2009-03-13}}</ref> describing a resource with statements "there is a Person identified by <nowiki>http://www.w3.org/People/EM/contact#me</nowiki>, whose name is Eric Miller, whose email address is e.miller123(at)example (changed for security purposes), and whose title is Dr." [[Image:Rdf graph for Eric Miller.png|thumb|An RDF Graph Describing Eric Miller<ref name="rdf-primer" />]] The resource "<nowiki>http://www.w3.org/People/EM/contact#me</nowiki>" is the subject. The objects are: * "Eric Miller" (with a predicate "whose name is"), * <nowiki>mailto:e.miller123</nowiki>(at)example (with a predicate "whose email address is"), and * "Dr." (with a predicate "whose title is"). The subject is a URI. The predicates also have URIs. For example, the URI for each predicate: * "whose name is" is <nowiki>http://www.w3.org/2000/10/swap/pim/contact#fullName</nowiki>, * "whose email address is" is <nowiki>http://www.w3.org/2000/10/swap/pim/contact#mailbox</nowiki>, * "whose title is" is <nowiki>http://www.w3.org/2000/10/swap/pim/contact#personalTitle</nowiki>. In addition, the subject has a type (with URI <nowiki>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</nowiki>), which is person (with URI <nowiki>http://www.w3.org/2000/10/swap/pim/contact#Person</nowiki>). Therefore, the following "subject, predicate, object" RDF triples can be expressed: * <nowiki>http://www.w3.org/People/EM/contact#me, http://www.w3.org/2000/10/swap/pim/contact#fullName,</nowiki> "Eric Miller" * <nowiki>http://www.w3.org/People/EM/contact#me, http://www.w3.org/2000/10/swap/pim/contact#mailbox, mailto:e.miller123(at)example</nowiki> * <nowiki>http://www.w3.org/People/EM/contact#me, http://www.w3.org/2000/10/swap/pim/contact#personalTitle,</nowiki> "Dr." * <nowiki>http://www.w3.org/People/EM/contact#me, http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://www.w3.org/2000/10/swap/pim/contact#Person</nowiki> In standard N-Triples format, this RDF can be written as: <syntaxhighlight lang="turtle"> <http://www.w3.org/People/EM/contact#me> <http://www.w3.org/2000/10/swap/pim/contact#fullName> "Eric Miller" . <http://www.w3.org/People/EM/contact#me> <http://www.w3.org/2000/10/swap/pim/contact#mailbox> <mailto:e.miller123(at)example> . <http://www.w3.org/People/EM/contact#me> <http://www.w3.org/2000/10/swap/pim/contact#personalTitle> "Dr." . <http://www.w3.org/People/EM/contact#me> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/10/swap/pim/contact#Person> . </syntaxhighlight> Equivalently, it can be written in standard Turtle (syntax) format as: <syntaxhighlight lang="turtle"> @prefix eric: <http://www.w3.org/People/EM/contact#> . @prefix contact: <http://www.w3.org/2000/10/swap/pim/contact#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . eric:me contact:fullName "Eric Miller" . eric:me contact:mailbox <mailto:e.miller123(at)example> . eric:me contact:personalTitle "Dr." . eric:me rdf:type contact:Person . </syntaxhighlight> Or more concisely, using a common shorthand syntax of Turtle as: <syntaxhighlight lang="turtle"> @prefix eric: <http://www.w3.org/People/EM/contact#> . @prefix contact: <http://www.w3.org/2000/10/swap/pim/contact#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . eric:me contact:fullName "Eric Miller" ; contact:mailbox <mailto:e.miller123(at)example> ; contact:personalTitle "Dr." ; rdf:type contact:Person . </syntaxhighlight> Or, it can be written in RDF/XML format as: <syntaxhighlight lang="xml"> <?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:contact="http://www.w3.org/2000/10/swap/pim/contact#" xmlns:eric="http://www.w3.org/People/EM/contact#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="http://www.w3.org/People/EM/contact#me"> <contact:fullName>Eric Miller</contact:fullName> </rdf:Description> <rdf:Description rdf:about="http://www.w3.org/People/EM/contact#me"> <contact:mailbox rdf:resource="mailto:e.miller123(at)example"/> </rdf:Description> <rdf:Description rdf:about="http://www.w3.org/People/EM/contact#me"> <contact:personalTitle>Dr.</contact:personalTitle> </rdf:Description> <rdf:Description rdf:about="http://www.w3.org/People/EM/contact#me"> <rdf:type rdf:resource="http://www.w3.org/2000/10/swap/pim/contact#Person"/> </rdf:Description> </rdf:RDF> </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)