Sie sind auf Seite 1von 12

Resource

Description
Framework
VS.

eXtensible
Markup
Language
Arunabh Nag 03/02/10
1
Introduction

• The Extensible Markup Language


(XML)
• The Resource Description Framework
(RDF)
• Semantic Web – Distributing knowledge

03/02/10
2
XML – basic stats

• design goals - emphasize simplicity, generality,


and usability over the Internet.
• textual data format, with strong support via
Unicode.
• designed to transport and store data, with focus on
what data is.

• allows the author to define his own tags and his


own document structure.
03/02/10
3
RDF – basic stats

• a framework for describing resources on the web.


• designed to be read and understood by computers.
• written in XML.
• RDF is a data model, not a data format.
• The most exciting uses of RDF aren't in encoding information
about web resources, but information about and relations
between things in the real world: people, places, concepts,
etc.

03/02/10
4
RDF vs. XML
• RDF is constituted of • XML documents are made
Properties, Values, and up of storage units called
Statements that can be entities, which contain
resources and include either text Or binary data.
metadata created by other Text is made up of
people and organizations characters, some of which
form the character data in
the document, and some of
which form markup.

03/02/10
5
RDF vs. XML
• Order of properties is not • Order of elements matters a
a primary concern, hence lot in XML
RDF offers a very
appealing and flexible • Since XML has a tree
solution to any web based data model, the
designer. entity always starts with the
root element and goes on to
• This is due to the fact that the child elements in an
RDF has a graphical data orderly manner.
model hence the structure
is defined by relations
among prperties.

03/02/10
6
RDF vs. XML
• RDF allows us to actually • XML only queries data
extract the meaning of a without any emphasis on
data. the meaning.
• Consider an example of a • Considering the same
text to speech engine example of a text to speech
where the program engine, the program, as in
actually reads the text with case with e.g. Microsoft
emotions e.g. with only reads the written data
stresses on the keywords, without any clear emphasis
even though the scope of on the associated emotion,
understood data is limited. with unlimited data scope.

03/02/10
7
RDF vs. XML
• There is a XML notation • the name XML means two
for RDF but this is one of things.
many notations that share
a common data model. • First is the notation.
• The data model is crucially • Secondly there is the data
not a tree, but roughly a model behind that: a tree
graph. The data model
also makes particular use with several types of nodes
of URIs and other things (elements, attributes, etc.).
which XML is agnostic to. The data model is clear
Thus the tools that work when you think about XML
on top of RDF work on top APIs and libraries.
of a graph data model, not
a tree data model.
03/02/10
8
RDF vs. XML
• Consider a simple • this information be typically
example : The author of a be represented in XML as :
page is Ora.
<author>
• In RDF this is a triple
<uri>page</uri>
triple(author, page, Ora)
<name>Ora</name>
</author>

• Or Maybe :
<document href="page">
<author>Ora</author>
</document>

03/02/10
9
RDF vs. XML
• Since the schema is limited and • These are all perfectly good
defined, the RDF graph, though
parsed in any way will only yield XML documents - and to a
one sequence. person reading then they
• Like in the above example : mean the same thing. To a
machine parsing them, they
The understood graph will always
be : produce different XML trees.
• The tree in this case may be
as that of the RDF graph, yet
it may not be, so the queries
must always be choice
independent, hence reducing
the flexibility.

03/02/10
10
Using RDF instead of XML
• RDF allows us to parse the semantic tree, which end up
giving us a set of (possibly mutually referential) triples and
then we can use the ones you want ignoring the ones you
don't understand.
• Consider a layman example :
A label on a food product reads that it expires on December 2010. The
possible solutions using XML are that either the label or the product expires.
But using RDF, the associated schema properties produce only one result –
the espiry of the food product mentioned on a label.

• XML allows us to create schemas for refined queries, but


using RDF is both easier and more efficient.
03/02/10
11
Conclusion
• Sometimes it seems there is a set of people for whom the
semantic web is the only graph which they would consider,
and another for whom the document tree (or graph if you
include links) is all they would consider. But it is important to
recognize the difference.
• While using RDF is easier that XML, yet developers prefer the
order in XML, which is mostly due to the constraints of
processing the human readable documents

03/02/10
12

Das könnte Ihnen auch gefallen