Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Semantic Web – WEEK 3: XML Schema Tutorial/Practical: Exercises using the Suns Today’s lecture will include material relevant to Advanced DBs and Language.

Similar presentations


Presentation on theme: "The Semantic Web – WEEK 3: XML Schema Tutorial/Practical: Exercises using the Suns Today’s lecture will include material relevant to Advanced DBs and Language."— Presentation transcript:

1 The Semantic Web – WEEK 3: XML Schema Tutorial/Practical: Exercises using the Suns Today’s lecture will include material relevant to Advanced DBs and Language Specification and Implementation modules! Lee McCluskey

2 The Semantic Web Recap of last week n Well formed XML documents n Valid XML documents - XML DTDs n API’s for XML – DOMs n URIs n XML namespaces: XML namespace is a collection of names, identified by a URI reference, which are used in XML documents as element types and attribute names.

3 The Semantic Web Semantic Web Technological Infrastructure OWL- web ontology RDF RDF(S)- resource descriptions XML XML Schema - basic meta-language

4 The Semantic Web Relational DB =>XML Name Module Mark Smith Semantic Web 86 Smith Advanced Databases 45 Jones Artificial Intelligence 95 Smith Semantic Web 86 Smith …….. => Users can exchange data with a uniform textual representation..

5 The Semantic Web XML Schema - general idea We can capture in XML n typical database applications n formal languages such as programming languages, query languages, mark-up languages etc n text documents such as bibliographies, dictionaries, ontologies (later!) etc n communication/messaging languages eg it is the language of SOAP - Simple Object Access Protocol

6 The Semantic Web XML Schema – the need n XML DTDs are limited for defining docs – they just define internal syntax structure n XML Schema gives a way of defining a document an expressive data structure (with built in data types and complex types) n Document constructs should have universal names, whose scope extends beyond their containing document. XML Schema allows others to re-use ‘mark- up’ vocabulary via namespaces The Schema standard proposal is in http://www.w3.org/2001/XMLSchema XML/XML schema is being widely accepted cf in the.NET

7 The Semantic Web XML / XML Schema Warning These languages are the MOST verbose you will ever encounter!!!

8 The Semantic Web XML Schema The basic idea is the SAME as with DTDs: that with XML data document we have a Schema document (written in XML of course!) which tightly defines the data document’s content. This document in very similar to a user defined ‘data definition’ as found in high level programming languages.

9 The Semantic Web XML Schema – Example1 From XML.com (E.Van der Vlist) Being a Dog Is a Full-Time Job Charles M. Schulz Snoopy Peppermint Patty 1950-10-04 extroverted beagle Peppermint Patty 1966-08-22 bold, brash and tomboyish

10 The Semantic Web XML Schema – Example1 <xs:element name="friend-of" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>

11 The Semantic Web XML Schema – Example 2 Example from LSI module – capturing the syntax structure of a simple programming language data Cmd = Assigns Identifier Exp | Sequence Cmd Cmd | While Exp Cmd | Block Dec Cmd data Dec = Const Identifier Exp | Var Identifier Exp data Exp = SN Int | SB Bool | SV Identifier | SC Identifier | Plus Exp Exp | Minus Exp Exp | GT Exp Exp

12 The Semantic Web XML Schema – Example 2 (Block (Var 'r' (SV 'y')) (Block (Var 'q' (SN 0)) (While (GT (SV 'r') (SV 'x')) (Sequence (Assigns 'r' (Minus (SV 'r') (SV 'x') )) (Assigns 'q' (Plus (SV 'q') (SN 1 ) )) ) “Concrete Syntax”.. Var r = y; Var q = 0; while r > x do r = r-x; q = q+1 endwhile

13 The Semantic Web XML Schema – Example 2 x = q+1 represented as: x q 1

14 The Semantic Web Summary XML Schema is being used extensively now in new technologies It is just a Standard by which we can specify complex data structures quite precisely, in such a way that the structures can be shared via the internet.


Download ppt "The Semantic Web – WEEK 3: XML Schema Tutorial/Practical: Exercises using the Suns Today’s lecture will include material relevant to Advanced DBs and Language."

Similar presentations


Ads by Google