Problems with XML - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Problems with XML

Description:

rdf:Description ID='MiniVan' rdf:type resource='http://www.w3.org/2000/01/rdf-schema#Class' ... rdfs:domain rdf:resource='#Minivan' ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 8
Provided by: var77
Category:
Tags: xml | minivan | problems

less

Transcript and Presenter's Notes

Title: Problems with XML


1
Problems with XML XML Schemas
  • XML falls apart on the Scalability design goal.
  • The order in which elements appear in an XML
    document is significant and often
  • very meaningful. This seems highly unnatural in
    the metadata world.
  • Furthermore, maintaining the correct order of
    millions of data items is expensive
  • and difficult, in practice.
  • XML allows constructions which mixes up some text
    along with child elements.
  • Ex.
  • When such XML documents are represented in
    computer memory, you get weird
  • data structures that mix trees, graphs, and
    character strings. In general, these are

lttopelemgtThis is some character string data
ltelemgt this is a child
ltsubelemgtthis is another childlt/subelemgt
lt/elemgt lt/topelemgt
2
RDF (Resource Description Framework)
  • RDF provides a way of describing resources via
    metadata (data about data)
  • It restricts the description of resources to
    triplets (subject,predicate,object)
  • 2. It provides interoperability between
    applications that exchange machine
  • understandable information on the Web.
  • The broad goal of RDF is to define a mechanism
    for describing resources
  • that makes no assumptions about a particular
    application domain,
  • nor defines (a priori) the semantics of any
    application domain.
  • 4. Uses XML as the interchange syntax.
  • 5. Provides a lightweight ontology system.
  • The formal specification of RDF is available at
  • http//www.w3.org/TR/REC-rdf-syntax/

3
RDF Syntax
  • Concept of Subject, Predicate and Object Triplets
    (Tuples)
  • Subject The resource being described.
  • Predicate A property of the resource
  • Object The value of the property
  • A combination of them is said to be a Statement
    (or a rule)

John Doe
http//foo.bar.org/index.html
Author
A web page being described Subject
A property of the web page (author) Predicate
The value of the predicate (here the
author) Object
4
RDF Example
lt?xml version"1.0"?gt ltrdfRDF
xmlnsrdf"http//www.w3.org/TR/WD-rdf-syntax"
xmlnss"http//description.org/schema/"gt
ltrdfDescription about"http//foo.bar.org/index
.html"gt ltsAuthorgtJohn Doelt/sAuthorgt
lt/rdfDescriptiongt lt/rdfRDFgt
Namespace for the RDF specs
Namespace s, a custom namespace
Subject
Author (property of the subject) (Also a resource)
Object. Can also point to a resource
The above statement says The Author of
http//foo.bar.org/index.html is John Doe
In this way, we can have different objects
(resources) pointing to other objects
(resources) , thus forming a DLG (Directed Line
Graph) You can also make statements about
statements reification Ex xyz says that
The Author of http//foo.bar.org/index.html is
John Doe
5
RDF Schema
  • Needed to express meaning in an RDF Document
  • A schema is a kind of an ontology. It defines the
    terms that will be used in
  • the RDF statements and gives specific meanings
    to them.
  • Example

ltrdfRDF xmllang"en" xmlnsrdf"http//www.w3
.org/1999/02/22-rdf-syntax-ns"
xmlnsrdfs"http//www.w3.org/2000/01/rdf-schema"
gt ltrdfDescription ID"MotorVehicle"gt ltrdftype
resource"http//www.w3.org/2000/01/rdf-schemaCla
ss"/gt ltrdfssubClassOf rdfresource"http//www
.w3.org/2000/01/rdf-schemaResource"/gt lt/rdfDescr
iptiongt ltrdfDescription ID"PassengerVehicle"gt
ltrdftype resource"http//www.w3.org/2000/01/rdf-
schemaClass"/gt ltrdfssubClassOf
rdfresource"MotorVehicle"/gt lt/rdfDescriptiongt
ltrdfDescription ID"Truck"gt ltrdftype
resource"http//www.w3.org/2000/01/rdf-schemaCla
ss"/gt ltrdfssubClassOf rdfresource"MotorVehicl
e"/gt lt/rdfDescriptiongt
RDF Schema Namespace
An ID attribute actually defines a new resource
Resource is the top level class
PassengerVehicle inherits from MotorVehicle
6
Example (cont..)
ltrdfDescription ID"Van"gt ltrdftype
resource"http//www.w3.org/2000/01/rdf-schemaCla
ss"/gt ltrdfssubClassOf rdfresource"MotorVehicl
e"/gt lt/rdfDescriptiongt ltrdfDescription
ID"MiniVan"gt ltrdftype resource"http//www.w3.o
rg/2000/01/rdf-schemaClass"/gt ltrdfssubClassOf
rdfresource"Van"/gt ltrdfssubClassOf
rdfresource"PassengerVehicle"/gt lt/rdfDescripti
ongt ltrdfDescription ID"registeredTo"gt
ltrdftype resource"http//www.w3.org/1999/02/22-r
df-syntax-nsProperty"/gt ltrdfsdomain
rdfresource"MotorVehicle"/gt ltrdfsrange
rdfresource"Person"/gt lt/rdfDescriptiongt ltrdf
Description ID"rearSeatLegRoom"gt ltrdftype
resource"http//www.w3.org/1999/02/22-rdf-syntax-
nsProperty"/gt ltrdfsdomain rdfresource"Passen
gerVehicle"/gt ltrdfsdomain rdfresource"Minivan
"/gt ltrdfsrange rdfresource"http//www.w3.org/2
000/03/example/classesNumber"/gt lt/rdfDescription
gt lt/rdfRDFgt
Multiple Inheritance
A Domain refers to which Objects can use this
resource as a property
The Range refers to the objects that it can use
as a property
7
Tools/Resources
SirPAC A Simple RDF Parser Compiler. It parses
the RDF, and validates it. It also generates the
tuples and even draws a graph of the data
model. www.w3.org/RDF/Implementations/SiRPAC/
Reggie A Nice Metadata Editor. Java based
simple user interface to describe a web
resource. Can mail the metadata file to yourself
after finished editing. http//metadata.net/dstc/
Write a Comment
User Comments (0)
About PowerShow.com