469 talk
Post on 15-Jun-2015
437 Views
Preview:
TRANSCRIPT
RDF/XMLA brief introduction
Alison Hunt March 26, 2011for LIS469 XML
RDF/XML is a data format
It represents information for a data model
called RDF
RDFResource Description Framework
is a data model
It structures metadata
for
the Semantic Web and
the RDA content standard(resource description and access)
RDFdescribes a resource
LIS469 Class Blog
A resource has properties
LIS469 Class Blog
creator
language
format
subject
Properties have valuesAaron
Rubinstein
English
Text/HTML
XML
LIS469 Class Blog
creator
language
format
subject
RDFdescriptions make
statements
The LIS469 class blog was created by Aaron Rubinstein.
The LIS469 class blog is written in English.
The LIS469 class blog is formatted as text/HTML.
The LIS469 class blog is about the subject of XML.
RDFstatements are triples
ResourceSubject
LIS469 class blog
LIS469 class blog
LIS469 class blog
LIS469 class
blog
PropertyPredicate
Creator
Language
Format
Subject
ValueObject
Aaron Rubinstein
English
Text/HTML
XML
RDF statements link two things in one direction.
Node
LIS469 class blog
LIS469 class blog
LIS469 class blog
LIS469 class blog
Arc
Creator
Language
Format
Subject
Node
Aaron Rubinstein
English
Text/HTML
XML
RDF statements link two things in one direction.
Properties may have multiple values.
RDF has several ways to model this:
blank nodes, bags, collections, etc.
However, the end result will be a set of triples
which link the subject with each value.
ResourceMust be a URI
<http://lis469.wordpress.com/>
<http://lis469.wordpress.com/>
<http://lis469.wordpress.com/>
<http://lis469.wordpress.com/>
RDF statements require URIs that have meaning
for computer applications
Here, the blog URL replaces its name
RDF ShinesBy using URIs,
RDF can describe things that cannot be located or retrieved on the
web.
People, institutions, cars, concepts…anything.
FRBR works, expressions or manifestations
Tiger Lily collective amnesia
RDF statements require URIs for properties
ResourceMust be a URI
<http://lis469.wordpress.com/>
<http://lis469.wordpress.com/>
<http://lis469.wordpress.com/>
<http://lis469.wordpress.com/>
PropertyMust be a URI
<http://purl.org/dc/elements/1.1/creator>
<http://purl.org/dc/elements/1.1/language>
<http://purl.org/dc/elements/1.1/format>
<http://purl.org/dc/elements/1.1/subject>
Here, Dublin Core URIs are used for the property
Values can be URIs or literal strings of characters
ResourceMust be a URI
<http://lis469.wordpress.com/>
<http://lis469.wordpress.com/>
<http://lis469.wordpress.com/>
<http://lis469.wordpress.com/>
PropertyMust be a URI
<http://purl.org/dc/elements/1.1/creator>
<http://purl.org/dc/elements/1.1/language>
<http://purl.org/dc/elements/1.1/format>
<http://purl.org/dc/elements/1.1/subject>
ValueCan be URI or literal
Aaron Rubinstein
English
Text/html
<http://id.loc.gov/authorities/sh97007825#concept>
Here, XML is identified by a URI
from Library of Congress Subject Headings
RDF graph with URIs
AaronRubinstein
English
<http://id.loc.gov/
authorities/
sh97007825#concept>
Text/HTM
L
<http://lis469.wordpress.com/>
<http://purl.org/dc/elements/1.1/creator>
<http://purl.org/dc/elements/1.1/language>
<http://purl.org/dc/elements/1.1/format>
<http://purl.org/dc/elements/1.1/subject>
Note:RDF graphs showliterals in a boxURIs in an oval
We are using a URI as the value of the subject property.
So the graph changes from box to oval.
This actually indicates a really significant change…
A value with a URI can be the subject of other statements
<http://id.loc.gov/
authorities/
sh97007825#concept>
<http://purl.org/dc/elements/1.1/creator>
<http://purl.org/dc/elements/1.1/language>
<http://purl.org/dc/elements/1.1/format>
<http://purl.org/dc/elements/1.1/subject>
<http://purl.org/dc/elements/1.1/creator>
Library ofCongress
LCSH
Subject Heading for
XML
RDF links stuff!
RDF shinesIt is easy
to work across different data sources, types and formats.
RDF can link things by tapping massive databases of RDF
statements called "triplestores."
There are more than 27 billion triples stored now.
RDF/XML is a data format
XML document serializes the RDF graph so it can beprocessed by computersfor storage and transmission
001111000010100010000100010010001111000000000011110000000111111111100000000000111111111110000000000011
RDF expressed as XMLRDF XML
Class BlogCreator
Aaron Rubinstein
LanguageEnglish
FormatText-HTML
SubjectXML URI
The XML format is closed; it will not link like the RDF graph does.
Starting the RDF/XML fileRDF
RDF is the root elementThe rdf: prefix is from the rdf namespace
We are also using Dublin Core elements
XML<?xml version="1.0"?>
<rdf:RDFxmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#xmlns:dc=http://purl.org/dc/elements/1.1/>
Where is the resource named?RDF
Each resource being described is tagged with the RDF element <description>
The about attribute spells out the URIOf the resource that is the subject of the RDF statement
XML
<?xml version="1.0"?>
<rdf:RDFxmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#xmlns:dc=http://purl.org/dc/elements/1.1/>
<rdf:Description
Rdf:about="http://lis469.wordpress.com/">
Properties and values?RDF
Properties become child elements of Description.They appear as tags.
Literal RDF values become the value of those child elements, between opening and closing tags.
When RDF values are expressed as URIs, they become an attribute, called "resource," of the child element.
XML
<?xml version="1.0"?>
<rdf:RDFxmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#xmlns:dc=http://purl.org/dc/elements/1.1/>
<rdf:DescriptionRdf:about="http://lis469.wordpress.com/">
<dc:creator>Aaron Rubinstein</dc:creator>
<dc:language>English</dc:language>
<dc:format>text/HTML</dc:format>
<dc:subject rdf:resource=" http://id.loc.gov/authorities/sh97007825#concept "/>
</rdf:Description></rdf:RDF>
But properties should be URIs!
Namespace declarations generate full URIs for each property
dc: is equivalent to http://purl.org/dc/elements/1.1/
<dc:format>text/HTML</dc:format>
is processed as
< http://purl.org/dc/elements/1.1/ format> text/HTML </ <http://purl.org/dc/elements/1.1/ format>
RDF expressed as XMLRDF XML
<?xml version="1.0"?>
<rdf:RDFxmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#xmlns:dc=http://purl.org/dc/elements/1.1/>
<rdf:DescriptionRdf:about="http://lis469.wordpress.com/">
<dc:creator>Aaron Rubinstein</dc:creator><dc:language>English</dc:language><dc:format>text/HTML</dc:format><dc:subject rdf:resource=" http://id.loc.gov/authorities/sh97007825#concept "/>
</rdf:Description></rdf:RDF>
RDF/XML is not the only choice
PROS
RDF/XML is the syntax primarily used by the W3C from the start
It plays well with the family of XML technologies.
XML uses namespaces and can tag (i.e. express RDF properties) with ultimate flexibility.
CONS
RDF/XML files are hard for people to read.
Namespaces don't always behave the way we expect
Most of the developers who have to actually generate linked data find RDF/XML clunky
RDF/XML obscures triples
Other RDF data formats are
RDFaEmbeds RDF metadata in html. Part of Drupal7.
TURTLEVery easy for people to read. Preserves RDF triples.
JSONSupported by major web applications like JavaScript,so easy to process and familiar to developer community.
You should knowW3C is overhauling its RDF recommendationshttp://www.w3.org/2011/01/rdf-wg-charter
You can create your own personal URIhttp://www.foaf-project.org/
For a great overview, skim the new e-bookLinked Data: Evolving the Web into a Global Data Spacehttp://linkeddatabook.com/editions/1.0
DBPedia is the hub of RDF-linked datahttp://dbpedia.org/About
The Linked World
Linking Open Data cloud diagram, by Richard Cyganiak and Anja Jentzsch. http://lod-cloud.net/
top related