Chapter 2 Structured web documents in XMl Grigoris Antoniou Frank van Harmelen 1 Chapter 2 A Semantic Web Primer
1 Chapter 2 A Semantic Web Primer Chapter 2 Structured Web Documents in XML Grigoris Antoniou Frank van Harmelen
An HTML Example Nonmonotonic Reasoning Context Dependent Reasoning by V Marek and M. Truszczynski Springer 1993 SBN0387976892 Chapter 2 A Semantic Web primer
Chapter 2 A Semantic Web Primer 2 An HTML Example Nonmonotonic Reasoning: ContextDependent Reasoning by V. Marek and M. Truszczynski Springer 1993 ISBN 0387976892
The Same Example in XML Nonmonotonic Reasoning: Context Dependent Reasoning v marek M. truszczynski Springer 1993 0387976892 3 Chapter 2 A Semantic Web primer
Chapter 2 A Semantic Web Primer 3 The Same Example in XML Nonmonotonic Reasoning: ContextDependent Reasoning V. Marek M. Truszczynski Springer 1993 0387976892
HTML Versus XML: similarities o Both use tags(e.g and ) o Tags may be nested(tags within tags) o Human users can read and interpret both HTML and XML representations quite easily But how about machines Chapter 2 A Semantic Web primer
Chapter 2 A Semantic Web Primer 4 HTML versus XML: Similarities ⚫ Both use tags (e.g. and ) ⚫ Tags may be nested (tags within tags) ⚫ Human users can read and interpret both HTML and XML representations quite easily … But how about machines?
Problems with automated Interpretation of HTML Documents An intelligent agent trying to retrieve the names of the authors of the book o Authors names could appear immediately after the title o or immediately after the word by Are there two authors? e Or just one, called"V Marek and M Truszczynski? 5 Chapter 2 A Semantic Web primer
Chapter 2 A Semantic Web Primer 5 Problems with Automated Interpretation of HTML Documents An intelligent agent trying to retrieve the names of the authors of the book ⚫ Authors’ names could appear immediately after the title ⚫ or immediately after the word by ⚫ Are there two authors? ⚫ Or just one, called “V. Marek and M. Truszczynski”?
HTML VS XML Structural Information e hTML documents do not contain structural information: pieces of the document and their relationships o XML more easily accessible to machines because Every piece of information is described Relations are also defined through the nesting structure E.g., the tags appear within the tags, so they describe properties of the particular book 6 Chapter 2 A Semantic Web primer
Chapter 2 A Semantic Web Primer 6 HTML vs XML: Structural Information ⚫ HTML documents do not contain structural information: pieces of the document and their relationships. ⚫ XML more easily accessible to machines because – Every piece of information is described. – Relations are also defined through the nesting structure. – E.g., the tags appear within the tags, so they describe properties of the particular book
HTML VS XML: Structural Information(2) e A machine processing the XML document would be able to deduce that the author element refers to the enclosing book element rather than by proximity considerations ●Ⅹ ML allows the definition of constraints on values E.g. a year must be a number of four digits 7 Chapter 2 A Semantic Web primer
Chapter 2 A Semantic Web Primer 7 HTML vs XML: Structural Information (2) ⚫ A machine processing the XML document would be able to deduce that – the author element refers to the enclosing book element – rather than by proximity considerations ⚫ XML allows the definition of constraints on values – E.g. a year must be a number of four digits
HTML VS XML: Formatting o The HTML representation provides more than the XML representation The formatting of the document is also described o The main use of an html document is to display information: it must define formatting XML: separation of content from display same information can be displayed in different Ways 8 Chapter 2 A Semantic Web primer
Chapter 2 A Semantic Web Primer 8 HTML vs XML: Formatting ⚫ The HTML representation provides more than the XML representation: – The formatting of the document is also described ⚫ Τhe main use of an HTML document is to display information: it must define formatting ⚫ XML: separation of content from display – same information can be displayed in different ways
HTML VS XML: Another Example ● In HTMl Relationship matter-energy E=M×c2<> ●nxML E M x C2 9 Chapter 2 A Semantic Web primer
Chapter 2 A Semantic Web Primer 9 HTML vs XML: Another Example ⚫ In HTML Relationship matter-energy E = M ×c2 ⚫ In XML Relationship matter energy E M ×c2
HTML VS XML: Different Use of Tags e In both hTml docs same tags In XML completely different HTML tags define display: color, lists XML tags not fixed: user definable tags XML meta markup language: language for defining markup languages 10 Chapter 2 A Semantic Web primer
Chapter 2 A Semantic Web Primer 10 HTML vs XML: Different Use of Tags ⚫ In both HTML docs same tags ⚫ In XML completely different ⚫ HTML tags define display: color, lists … ⚫ XML tags not fixed: user definable tags ⚫ XML meta markup language: language for defining markup languages