1 roger l. costello, david b. jacobs. © 2003 the mitre corporation. a two minute intro to xml roger...

25
1 Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The creation of this tutorial was sponsored by DARPA)

Upload: rachel-murphy

Post on 27-Mar-2015

220 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

A Two Minute Intro to XML

Roger L. Costello

David B. Jacobs

The MITRE Corporation(The creation of this tutorial was sponsored by DARPA)

Page 2: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

2 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

XML is an Acronym

• … standing for: eXtensible Markup Language

Page 3: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

3 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

You have data … How should you structure it?

medium-altitude, long-endurance unmanned aerial vehicle

14.7 meters

512 kilograms70 knots

Here's some data about an aircraft:

400 nautical miles

Page 4: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

4 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

The XML approach is to "wrap" each data item in start/end tags

<Aircraft> <wingspan>14.8 meters</wingspan> <weight>512 kilograms</weight> <cruise-speed>70 knots</cruise-speed> <range>400 nautical miles</range> <description> medium-altitude, long-endurance unmanned aerial vehicle </description></Aircraft>

RQ-1.xml

Page 5: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

5 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

XML Terminology

<wingspan>14.8 meters</wingspan>

Start tag End tag

Data

Element

Page 6: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

6 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

Why use XML?

• It is a universally accepted standard way of structuring data (syntax).

• It is a W3C recommendation (W3C = World Wide Web Consortium)

• The marketplace supports it with a lot of free/inexpensive tools.

• The alternative to using XML is to define your own proprietary data syntax, and then build your own proprietary tools to support the proprietary syntax (Not a very appealing idea).

Page 7: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

7 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

Why use OWL?

Roger L. Costello

David B. Jacobs

The MITRE Corporation(The creation of this tutorial was sponsored by DARPA)

Page 8: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

8 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

Why use OWL?

• The purpose of this document is to describe the role that OWL plays in data interoperability. [Note: this is not the only use of OWL, but it is an important one.]

• Contents:– Understanding Syntax versus Semantics

– An example that shows why standardizing syntax is necessary but not sufficient

– Migrating from defining semantics on a per-application basis to standardized semantics

Page 9: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

9 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

Syntax versus Semantics

• Syntax: the structure of your data– e.g., XML mandates that you structure your data by "wrapping"

each data item within a start tag and an end tag pair, with the end tag being preceded by / and both tags in <…> brackets.

– That is, XML specifies the syntax of your data. • Semantics: the meaning of your data

• Two conditions necessary for interoperability:1. Adopt a common syntax:this enables applications to parse the data. XML provides a common syntax, and thus is a critical first step. 2. Adopt a means for understanding the semantics: this enables applications to use the data. OWL provides a standard way of expressing the semantics.

Page 10: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

10 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

What is this XML snippet talking about, i.e., what are the semantics?

<Predator> …</Predator>

What is a Predator?

Page 11: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

11 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

Predator - which one?

• Predator: a medium-altitude, long-endurance unmanned aerial vehicle system.

• Predator : one that victimizes, plunders, or destroys, especially for one's own gain.

• Predator : an organism that lives by preying on other organisms.

• Predator: a company which specializes in camouflage attire.

• Predator: a video game.

• Predator: software for machine networking.

• Predator: a chain of paintball stores.

Page 12: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

12 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

Resolving Semantics

• The next few slides presents an approach that applications can take for understanding the meaning of data. This approach is often taken today.

• We will then examine the disadvantages of the approach, and then offer a better approach.

Page 13: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

13 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

Meaning (semantics) applied on a per-application basis

<Predator> …</Predator>

application

Semantics: A Predator is type ofAircraft.Actions: These actions must be performed on the Predator data: - identify ground control station. - determine onboard sensors. - determine ordnance.

Page 14: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

14 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

Meaning (semantics) applied on a per-application basis

XML

app#1Semantics: Code to interpret the dataAction: Code to process the data

app#2Semantics: Code to interpret the dataAction: Code to process the data

Page 15: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

15 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

Problem with attaching semantics on a per-application basis

applicationSemantics: Code to interpret the dataAction: Code to process the data

Problems with burying semantic definitionswithin each application:- Duplicate effort - Each application must express the semantics- Variability of interpretation - Each application can take its own interpretation - Example: Mars probe disaster - one application interpreted the data in inches, another application interpreted the data in centimeters.- No ad-hoc discovery and exploitation - Applications have the semantics pre-wired. Thus, when new data (e.g., new type of aircraft) is encountered an application may not be able to effectively process it. This makes for brittle applications.

What's a better approach?

Page 16: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

16 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

Better approach:(1) Extricate semantic definitions from applications (2) Express semantic definitions in a standard vocabulary

XML

app#1Action: Code to process the data

app#2Action: Code to process the data

OWL DocumentSemantic Definitions

Page 17: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

17 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

RecapSuppose that an application is looking for Aircraft information, and encounters Predator data.

Consider the steps the application takes to process the data:

(1) Parse the data (this is a syntax issue).

(2) Determine the relationship between Predator and Aircraft (this is a semantic issue). Somewhere the following relationship must be made known:

(2.1) Predator is a type of Aircraft.

Once this information is made known to the application it can then do the following (action) step:

(3) If the document contains Aircraft data then do ... Else do ...

Issue: Should the semantic definition (2.1) be: (a) hardcoded and buried within each application? or, should it be: (b) declaratively stated in a separate document, using an agreed-upon, well-defined vocabulary (i.e., OWL)? Better approach

Page 18: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

18 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

OWL provides an agreed-upon vocabulary for expressing semantics

A Sampling of the OWL Vocabulary:

subClassOf: this OWL element is used to assert that one class of items is a subset of another class of items. Example: Predator is a subClassOf Aircraft.

FunctionalProperty: this OWL element is used to assert that a property has a unique value. Example: sensorID is a FunctionalProperty, i.e., sensorID has a unique value.

equivalentClass: this OWL element is used to assert that one Class is equivalent to another Class. Example: Platform is an equivalentClass to Aircraft.

Page 19: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

19 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

OWL Enables Machines to Understand Data!

XML/DTD/XML Schemas

OWL

Syntax

Semantics

OWL enables machine-processable semantics!

Page 20: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

20 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

Ontology (definition)

• An Ontology is the collection of semantic definitions for a domain.

• Example: an Aircraft Ontology is the set of semantic definitions for the Aircraft domain, e.g.,– Predator is a subClassOf Aircraft.– sensorID is a FunctionalProperty.– Platform is an equivalentClass to Aircraft.

Page 21: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

21 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

Why use OWL?• Benefits to application developers:

– Less code to write (save $$$).– Less chance of misinterpretation (save $$$).

• Benefits to community at large:– Everyone can understand each other's data's semantics, since

they are in a common language.– OWL uses the XML syntax to express semantics, i.e., it builds

on an existing technology.• Don't have to learn new syntax.• Common XML tools (e.g., parsers) can work on OWL.

– OWL will soon be a W3C recommendation.

Page 22: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

22 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

OWL Tutorial

Roger L. Costello

David B. Jacobs

The MITRE Corporation(The creation of this tutorial was sponsored by DARPA)

Page 23: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

23 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

Location of the Tutorial

http://www.xfront.com/owl/

Page 24: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

24 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

Layout of the OWL Materialowl examples example01 example02 labs lab01 lab02 lab03 OWL.ppt Why-use-OWL.ppt OWL-quick-intro.ppt Summary-of-OWL-Capabilities.ppt license.html README.ppt TheRobberAndTheSpeeder.ppt Camera.ppt

This Powerpoint documentcontains the OWL Tutorial.

We recommend that you read this document first.

A "cheat sheet" thatlists (briefly) all of the OWL capabilities.Read this document last.

NaturallyOccurringWaterSource Ontology

Camera Ontology

We recommend that you read this document second.

Interesting examples using OWL!

Page 25: 1 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation. A Two Minute Intro to XML Roger L. Costello David B. Jacobs The MITRE Corporation (The

25 Roger L. Costello, David B. Jacobs. © 2003 The MITRE Corporation.

Acknowledgment

• Many thanks to Joe Rockmore for his excellent insight and input into the creation of this document. Thanks Joe!