This lecture elaborates on RDF, RDFS, and SOAP starting from a short recap of XML, and the history of the W3C and the development of "open standard recommendations". We also compare RDF triples with DOGMA lexons. We finalise by listing shortcomings of RDFS regarding semantics, and give short overview of the history of OWL as one answer to this. A full elaboration on OWL and description logic is for another lecture.
3. Lecture Outline today
• Once upon a time there was XML
• W3C Open Standards Compliance
• Resource Description Framework (RDF)
• RDF versus XML
• RDF Schema (RDFS)
• RDF triples versus DOGMA lexons
• Simple Object Access Protocol
• Online RDF services and tools
• RDFS Shortcomings: Web Ontology Language
4. Lecture outline next
week
• RDFS Semantics
• Web Ontology Language
• Description Logics
5. eXtensible Markup Language
• XML is a meta- language
• XML stands for EXtensible Markup Language
• XML is a markup language much like HTML
• XML was designed to describe data
• XML tags are not predefined. You must define
your own tags
• XML uses a Document Type Definition (DTD)
or an XML Schema to describe the data
• XML with a DTD or XML Schema is designed
to be self-descriptive
7. XML Spec: XML declaration
<?xml version=“1.0”?>
<medicine-inventory>
<medicine name=“asperin”>
<author>Felix Hoffmann</author>
<patent-date>1889/03/06/</patent-date>
</medicine>
The XML version and the
</medicine-inventory> character encoding used in the
document. In this case the document
conforms to the 1.0 specification of XML
and uses the ISO-8859-1 (Latin-1/West
European) character set.
8. XML Spec: root element
<?xml version=“1.0”?>
<medicine-inventory>
<medicine name=“asperin”>
<author>Felix Hoffmann</author>
<patent-date>1889/03/06/</patent-date>
</medicine> The root element of the
document: this Document describes
</medicine-inventory>
(or is) a medicine inventory
9. XML Spec: child elements
<?xml version=“1.0”?>
<medicine-inventory>
<medicine name=“asperin”>
<author>Felix Hoffmann</author>
<patent-date>1889/03/06/</patent-date>
</medicine>
</medicine-inventory>
Data of medicine
medicine has attribute with value: name = “asperin”
A child element: medicine
10. XML Spec: tags (1)
<?xml version=“1.0”?>
<medicine-inventory>
<medicine name=“asperin”>
<author>Felix Hoffmann</author>
<patent-date>1889/03/06/</patent-date>
</medicine>
</medicine-inventory> Data of medicine
Begin tag of an element
End tag of an element
11. XML Spec: tags (2)
<?xml version=“1.0”?>
<medicine-inventory>
<medicine name=“asperin”>
<author>Felix Hoffmann</author>
<patent-date>1889/03/06/</patent-date>
</medicine>
</medicine-inventory>
Data of author
Begin tag of an element End tag of an element
12. W3C Consortium
• Vendor-independent
• three host institutions (MIT/LCS in the USA, ERCIM
headquarters in France, and Keio University in
Japan).
• Standardisation by recommendation
• Goals:
• Universal Access: To make the Web accessible to all by
promoting technologies that take into account the vast
differences in culture, languages, education, ability, material
resources, access devices, and physical limitations of users on
all continents;
• Semantic Web: To develop a software environment that permits
each user to make the best use of the resources available on the
Web;
• Web of Trust: To guide the Web's development with careful
consideration for the novel legal, commercial, and social issues
raised by this technology.
• Open source
13. Standards and Procedures
■
■ ■
SOAP
CSS XHTML
■
■ ■
SPARQL
CGI XHTML+Voice
■
■ ■
SMIL
DOM XML
■
■ ■
SRGS
GRDDL XML Events
■
■ ■
SSML
HTML XML Information Set
■
■ ■
VoiceXML
OWL XML Schema
■
■ ■
WCAG
P3P XPath
■
■ ■
WSDL
RDF XQuery 1. Working Draft (WD)
■
■ ■
XACML
SVG XSLT
2. Last Call Working Draft
■
■ XForms
SISR
3. Candidate Recommendation
(CR)
4. Proposed Recommendation
(PR)
5. W3C Recommendation (REC)
14. Resource Description Framework
• RDF is not a language but a model
• RDF is written in XML
• RDF is a W3C standard
• RDF is for describing resources on the web
• RDF is designed to be read by computers
• RDF is not designed for being displayed to people
• RDF uses URIs to identify web resources
• RDF uses property values to describe web resources
• RDF uses the terms resources, properties, and values
• RDF also uses the terms subject, predicates and
objects
16. RDF building block
“STARLab” is the title of the website http://starlab.vub.ac.be
• Subject (Resource) - http://starlab.vub.ac.be
• Predicate (Property) – title
• Object (Literal) – “STARLab”
17. 2 RDF statements
“STARLab” is the title of the website http://
starlab.vub.ac.be, and is created by “Peter Spyns”
• Subject (Resource) - http://starlab.vub.ac.be
• Predicate (Property) – title
• Object (Literal) – “STARLab”
• Subject (Resource) - http://starlab.vub.ac.be
• Predicate (Property) – creator
• Object (Literal) – “Peter Spyns”
17
18. Nested RDF statements
Peter Spyns, whose phone is 4571 is the creator of the
website http://starlab.vub.ac.be which has title
“STARLab”.
19. RDF basic serialisation syntax
The RDF root element and namespace:
<?xml version=quot;1.0quot;?>
<rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot;>
.
.
.
</rdf:RDF>
20. RDF Description
Attributes
about – refers to a URI of an existing resource
ID – signals the creation of a new resource (see later)
<?xml version=quot;1.0quot;?>
<rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot;>
<rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;>
.
.
.
</rdf:Description>
</rdf:RDF>
21. RDF Property (1)
Property names must be associated with a
schema
Qualify property names with namespace prefix
Value – description element or string
<?xml version=quot;1.0quot;?>
<rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot;
xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;>
<rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;>
<dc:title>STARLab</dc:title>
<dc:creator>Peter Spyns</dc:creator>
.
.
.
</rdf:Description>
</rdf:RDF>
22. RDF Property (2)
Property names must be associated with a
schema
Qualify property names with namespace prefix
Value – description element or string
<?xml version=quot;1.0quot;?>
<rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot;
xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;>
<rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;>
<dc:title>STARLab</dc:title>
<dc:creator>
<rdf:Description>
<dc:name>Peter Spyns</dc:name>
<dc:phone>4571</dc:phone>
</rdf:Description>
</dc:creator>
</rdf:Description>
</rdf:RDF>
23. Marking value types
<?xml version=quot;1.0quot;?>
<rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot;
xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;>
<rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;>
<dc:title>STARLab</dc:title>
<dc:alsoContains rdf:parseType=“Literal”>
<h1>STARLab Official Homepage</h1>
</dc:alsoContains>
</rdf:Description>
</rdf:RDF>
XML formatted value
25. Introducing structure in the data
Last update of the site was 18 months, days, years
ago ????
<?xml version=quot;1.0quot;?>
<rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot;
xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;>
<rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;>
<dc:title>STARLab</dc:title>
<dc:lastUpdate>18</dc:lastUpdate>
<dc:creator>
<rdf:Description>
<dc:name>Peter Spyns</dc:name>
<dc:phone>4571</dc:phone>
</rdf:Description>
</dc:creator>
</rdf:Description>
</rdf:RDF>
26. Introducing structure in the data (2)
Candidate solution (I) causes a decoding problem:
<?xml version=quot;1.0quot;?>
<rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot;
xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;>
<rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;>
<dc:title>STARLab</dc:title>
<dc:lastUpdate>18 days</dc:lastUpdate>
<dc:creator>
<rdf:Description>
<dc:name>Peter Spyns</dc:name>
<dc:phone>4571</dc:phone>
</rdf:Description>
</dc:creator>
</rdf:Description>
</rdf:RDF>
27. Introducing structure in the data (3)
Candidate solution (II) refines the syntax, but ‘18’
and ‘days’ are not related:
<?xml version=quot;1.0quot;?>
<rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot;
xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;>
<rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;>
<dc:title>STARLab</dc:title>
<dc:lastUpdate>18</dc:lastUpdate>
<dc:lastUpdateUnit>days</dc:lastUpdateUnit>
<dc:creator>
<rdf:Description>
<dc:name>Peter Spyns</dc:name>
<dc:phone>4571</dc:phone>
</rdf:Description>
</dc:creator>
</rdf:Description>
</rdf:RDF>
28. Introducing structure in the data (4)
Candidate solution (III) introduces rdf:value field:
the processor is signaled that the data itself is
in this field accepted as solution !
<?xml version=quot;1.0quot;?>
<rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot;
xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;>
<rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;>
<dc:title>STARLab</dc:title>
<dc:lastUpdate rdf:parseType=“Resource”>
<rdf:value>18</rdf:value>
<dc:lastUpdateUnit>days</dc:lastUpdateUnit>
</dc:lastUpdate>
...
</rdf:RDF>
30. RDF vs. XML
<E1>
<E1>
<E2>
<E2>
<E3>
<URIref to E3>
...
</E2>
<E3>
</E1>
</E2>
</E1>
<E3>
...
</E3> In RDF, the tree structure can be
broken down and distributed: this has
advantageous consequences...
30
31. RDF vs. XML (2)
RDF XML
• Needs to be cached
• Lazy loading, less
fully before use
memory strain
• Comparable to
• Comparable to foreign
bilocation in
keys in relational DBs
hierarchical DBs
• Data from disparate
• Nesting
docs can be joined
(important Semantic Web
asset)
38. RDF Containers
• Bag - an unordered list of resources or
literals
• Sequence - an ordered list of resources
or literals
• Alternative - a list of resources or literals
that represent alternatives for the value of
a property
45. Reification
• RDF triples are facts, statements
• It is true that ...
• The author of starlab.vub.ac.be is Peter Spyns
• what about statements about statements?
• I believe that ...
• I heard that ...
• RDF provides reification
• trust
• meta-data
• left as self-study
46. RDF Schema
• RDF describes resources with classes,
properties, and values
• RDFS is an extension to RDF
• RDFS provides a framework to describe
vocabulary, i.e. application-specific classes
and properties
• The term “schema” is similar to a DB
schema
49. RDF Classes
• rdfs:Resource – all resources within RDF are
implicitly member of this class
• rdfs:Class
• rdfs:Literal
• rdfs:XMLLiteral
• rdfs:Container
• rdfs:ContainerMembershipProperty
• rdfs:Datatype
52. rdf:Property
<rdf:Property rdf:ID=“hasTeacherquot;>
<rdfs:comment>Teacher of a course</rdfs:comment>
<rdfs:domain rdf:resource=quot;#Coursequot;/>
<rdfs:range rdf:resource=quot;#Teacherquot;/>
</rdf:Property>
<rdf:Property rdf:ID=“hasEnrolledStudentsquot;>
<rdfs:comment>List of Students of a course in alphabetical
order</rdfs:comment>
<rdfs:domain rdf:resource=quot;#Coursequot;/>
<rdfs:range rdf:resource=quot;http://www.w3.org/1999/02/22-rdf-
syntax- ns#Seqquot;/>
</rdf:Property>
<rdf:Property rdf:ID=“hasNamequot;>
<rdfs:comment>Name of a Person or Course</rdfs:comment>
<rdfs:domain rdf:resource=quot;#Personquot;/>
<rdfs:domain rdf:resource=quot;#Coursequot;/>
<rdfs:range rdf:resource=quot;http://www.w3.org/1999/02/22-rdf-
syntax- ns#Literalquot;/>
</rdf:Property>
</rdf:RDF>
53. RDF Goodies
• No distinction between classes and instances
(individuals)
<Species,type,Class>
<Lion,type,Species>
<Leo,type,Lion>
• Properties can themselves have properties
<hasDaughter,subPropertyOf,hasChild>
<hasDaughter,type,familyProperty>
• No distinction between language constructors and
ontology vocabulary, so constructors can be applied to
themselves/each other
<type,range,Class>
<Property,type,Class>
<type,subPropertyOf,subClassOf>
54. RDF triple versus lexon
Lexons are : RDF triples are:
• valid in a certain
• valid in a certain
namespace
context
• binary relationships
• binary relationships
between resources
between concepts
• read in one direction
• read in two directions
• URIs
• natural language
terms
57. RDFS to Lexon
Lexons RDF Lexons results in
loss of information
58. RDFS to Lexons
• From RDF triples
<s:WebPage about=quot;http://starlab.vub.ac.be/staff/pdeleenheerquot;>
<dc:creator>Pieter De Leenheer</dc:creator>
<dc:title>Pierre’s Page</dc:title>
<dc:date>2002-06-15</dc:date>
</s:WebPage>
• From RDFS class and property definitions
<rdf:Property rdf:ID=“hasTeacherquot;>
<rdfs:comment>Teacher of a course</rdfs:comment>
<rdfs:domain rdf:resource=quot;#Coursequot;/>
<rdfs:range rdf:resource=quot;#Teacherquot;/>
</rdf:Property>
• From subclass definitions
<rdfs:Class rdf:ID=quot;Studentquot;>
<rdfs:comment>Student Class</rdfs:comment>
<rdfs:subClassOf rdf:resource=quot;#Personquot;/>
</rdfs:Class>
59. SOAP
• SOAP stands for Simple Object Access Protocol
• SOAP is a communication protocol
• SOAP is for communication between applications
• SOAP is a format for sending messages
• SOAP is designed to communicate via Internet
• SOAP is platform independent
• SOAP is language independent
• SOAP is based on XML
• SOAP is simple and extensible
• SOAP allows you to get around firewalls
• SOAP will be developed as a W3C standard
61. SOAP Message Format
<?xml version=quot;1.0quot;?>
<soap:Envelope xmlns:soap=quot;http://www.w3.org/2001/12/soap-
envelopequot; soap:encodingStyle=quot;http://www.w3.org/2001/12/
soap-encodingquot;>
<soap:Header>
...
...
</soap:Header>
<soap:Body> The xmlns:soap namespace should always
... have the value of http://www.w3.org/
2001/12/soap-envelope
...
and it defines the Envelope as a SOAP
<soap:Fault>
Envelope
...
...
</soap:Fault>
</soap:Body>
</soap:Envelope>
62. SOAP Message Format
<?xml version=quot;1.0quot;?>
<soap:Envelope xmlns:soap=quot;http://www.w3.org/2001/12/soap-
envelopequot; soap:encodingStyle=quot;http://www.w3.org/2001/12/
soap-encodingquot;>
<soap:Header>
...
...
</soap:Header>
<soap:Body>
A SOAP Envelope has no default encoding
...
style. It is a client-server agreement.
...
<soap:Fault>
...
...
</soap:Fault>
</soap:Body>
</soap:Envelope>
63. SOAP Message Format
<?xml version=quot;1.0quot;?>
<soap:Envelope xmlns:soap=quot;http://www.w3.org/2001/12/soap-
envelopequot; soap:encodingStyle=quot;http://www.w3.org/2001/12/
soap-encodingquot;>
<soap:Header>
...
...
</soap:Header>
<soap:Body> The optional Header contains application
... specific information (like authentication,
payment, etc) about the SOAP message.
...
<soap:Fault>
The attributes defined in the SOAP Header
...
defines how a recipient should process the
...
SOAP message.
</soap:Fault>
</soap:Body>
</soap:Envelope>
64. SOAP Message Format
<?xml version=quot;1.0quot;?>
<soap:Envelope xmlns:soap=quot;http://www.w3.org/2001/12/soap-
envelopequot; soap:encodingStyle=quot;http://www.w3.org/2001/12/
soap-encodingquot;>
<soap:Header>
...
The required SOAP Body element contains
...
the actual SOAP message intended for the
</soap:Header>
ultimate endpoint of the message.
<soap:Body>
Immediate child elements of the SOAP Body
...
element may be namespace-qualified.
...
SOAP defines one element inside the Body
<soap:Fault>
element in the default namespace (quot;http://
... www.w3.org/2001/12/soap-envelopequot;). This
... is the SOAP Fault element, which is used to
</soap:Fault> indicate error messages.
</soap:Body>
</soap:Envelope>
69. RDFS Shortcomings
• RDFS too weak to describe resources in sufficient detail
– No localised range and domain constraints
• Impossible to say that the range of hasChild is person when applied
to persons and elephant when applied to elephants
– No existence/cardinality constraints
• Impossible to say that all instances of person have a mother that is
also a person, or that persons have exactly 2 parents
– No transitive, inverse or symmetrical properties
• Impossible to say that isPartOf is a transitive property, that hasPart
is the inverse of isPartOf or that touches is symmetrical
– etc.
• Difficult to provide reasoning support
– No “native” reasoners for non-standard semantics
– May be possible to reason via first-order axiomatisation
70. Web Ontology Language
Desirable features identified for Web Ontology Language:
• Extends existing Web standards
– Such as XML, RDF, RDFS
• Easy to understand and use
– Should be based on familiar KR idioms
• Formally specified
• Of “adequate” expressive power
• Possible to provide automated reasoning support
71. RDF to OWL
• Two languages developed to satisfy above requirements
– OIL: developed by group of (largely) European researchers (several
from EU OntoKnowledge project)
– DAML-ONT: developed by group of (largely) US researchers (in DARPA
DAML programme)
• Efforts merged to produce DAML+OIL
– Development was carried out by “Joint EU/US Committee on Agent
Markup Languages”
– Extends (“DL subset” of) RDF
• DAML+OIL submitted to W3C as basis for standardisation
– Web-Ontology (WebOnt) Working Group formed
– WebOnt group developed OWL language based on DAML+OIL
– OWL language now a W3C Candidate Recommendation
72. OWL Specs
• Three species of OWL
– OWL full is union of OWL syntax and RDF
– OWL DL restricted to FOL fragment (¼ DAML+OIL)
– OWL Lite is “easier to implement” subset of OWL DL
• OWL DL based on SHIQ Description Logic
– In fact it is equivalent to SHOIN(Dn) DL
• OWL DL Benefits from many years of DL
research
– Well defined semantics
– Formal properties well understood (complexity,
decidability)
– Known reasoning algorithms
– Implemented systems (highly optimised)
73. OWL Constructors
• XMLS datatypes as well as classes in
– E.g.,
• Arbitrarily complex nesting of constructors
– E.g.,
80. References
1. Heflin, J. and Allamang. (2008) Semantic Web for the Working
Ontologist
2. Hjelm, J. (2001) Creating the Semantic Web with RDF, Wiley.
3. Powers, S. (2003) Practical RDF, O’Reilly.
4. Baader, F. and Nutt, W. (2002) Basic Description Logics. In the
Description Logic Handbook, Cambridge University Press, pp.
47-100.
5. http://www.w3.org/TR/owl-guide/
6. http://www.javaworld.com/javaworld/jw-03-2001/jw-0330-
soap.html
7. http://www.w3schools.com
81. Lecture outline next
week
• RDFS Semantics
• Web Ontology Language
• Description Logics