html, xml, 그리고 시맨틱웹

18
HTML, XML and Semantic Web 관관관관 관관관관 IT 관관 관관관 관 관 관

Upload: jihoon-jeong

Post on 26-May-2015

974 views

Category:

Education


1 download

TRANSCRIPT

Page 1: Html, Xml, 그리고 시맨틱웹

HTML, XML andSemantic Web

관동의대 명지병원 IT 융합 연구소

정 지 훈

Page 2: Html, Xml, 그리고 시맨틱웹

HTML

Page 3: Html, Xml, 그리고 시맨틱웹

What is HTML?

• Publish online documents with headings, text, tables, lists, photos, etc.

• Retrieve online information via hypertext links, at the click of a button.

• Design forms for conducting transactions with remote services, for use in searching for information, making reservations, ordering products, etc.

• Include spread-sheets, video clips, sound clips, and other applications directly in their documents.

Page 4: Html, Xml, 그리고 시맨틱웹

CSS

• Language for describing the presentation of Web pages

– Colors, Layout, and Fonts – Allows to adapt the presentation to different types of

devices, such as large screens, small screens, or printers.

– CSS is independent of HTML and can be used with any XML-based markup language.

– The separation of HTML from CSS makes it easier to maintain sites, share style sheets across pages, and tailor pages to different environments.

– This is referred to as the separation of structure (or: content) from presentation.

Page 5: Html, Xml, 그리고 시맨틱웹

Example

<title>My first HTML document</title>

<h1>An important heading</h1><h2>A slightly less important

heading</h2><p>This is the first paragraph.</p><p>This is the second

paragraph.</p>

Page 6: Html, Xml, 그리고 시맨틱웹

Example: Image and Link

<img src="peter.jpg" width="200" height="150">

<img src="peter.jpg" width="200" height="150" alt="My friend Peter">

This a link to <a href="peter.html">Peter's page</a>

This is a link to <a href="http://www.w3.org/">W3C</a>

<a href="/"><img src="logo.gif" alt="home page"></a>

Page 7: Html, Xml, 그리고 시맨틱웹

Head and Body

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html> <head> <title> replace with your document's title </title></head> <body> replace with your document's content </body></html>

Page 8: Html, Xml, 그리고 시맨틱웹

XML

Page 9: Html, Xml, 그리고 시맨틱웹

What is XML?

• Extensible– Lets you define your own tags, the order in which they occur, and how

they should be processed or displayed.

• Markup Language– XML is a language that’s very similar to HTML.– It’s much more flexible than HTML because it allows you to create your

own custom tags. – It’s important to realize that XML is not just a language. – XML is a meta-language: a language that allows us to create or define

other languages.

• Example– With XML we can create other languages, such as RSS, MathML (a

mathematical markup language), and even tools like XSLT.

Page 10: Html, Xml, 그리고 시맨틱웹

Address Example: External to HTML

정지훈서울 관악구 신림동서울대학교

<em> 정지훈 </em><br>서울 관악구 신림동<br><strong> 서울대학교 </strong>

External Presentation:

HTML Markup:

HTML tags are stillpresentation-oriented

Page 11: Html, Xml, 그리고 시맨틱웹

Address Example: HTML to XML

<em> 정지훈 </em><br>서울 관악구 신림동<br><strong> 서울대학교 </strong>

HTML Markup:

XML tags are chosen forcontent-structuring needs

<address> <name> 정지훈 </name> <street> 서울 관악구 신림동 </street> <town> 서울대학교 </town></address>

XML Markup:

While not conveyingany formal semantics:

Page 12: Html, Xml, 그리고 시맨틱웹

Address Example: XML to External

<address> <name> 정지훈 </name> <street> 서울 관악구 신림동 </street> <town> 서울대학교 </town></address>

XML Markup:

정지훈서울 관악구 신림동서울대학교

External Presentations:

XML stylesheets are,e.g., usable to generatedifferent presentations

정지훈서울 관악구 신림동서울대학교. . .

Page 13: Html, Xml, 그리고 시맨틱웹

Address Example:Document Type Definition

<!ELEMENT address (name, street, town) ><!ELEMENT name (#PCDATA) ><!ELEMENT street (#PCDATA) ><!ELEMENT town (#PCDATA) >

Document Type Definition (DTD):

Document Type Tree:

address

PCDATA PCDATA PCDATA

name street town

address ::= name street townname ::= PCDATAstreet ::= PCDATAtown ::= PCDATA

Extended Backus-Naur Form (EBNF):

Page 14: Html, Xml, 그리고 시맨틱웹

A Complete XML Document Referring to an External DTD

<?xml version="1.0" standalone="no"?><!DOCTYPE address SYSTEM "address.dtd"><address> <name> 정지훈 </name> <street> 서울 관악구 신림동 </street> <town> 서울대학교 </town></address>

The XML declaration uses standalone attribute with "no" value: DTD import

The DOCument TYPE declaration names the root element address and, after the SYSTEM keyword, refers to an external DTD at "address.dtd"

XML Instance Document Referring to DTD (via root element):

Page 15: Html, Xml, 그리고 시맨틱웹

XML Schema Definition

<?xml version="1.0"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="address"> <xsd:complexType> <xsd:sequence> <xsd:element name="name" type="xsd:string"/> <xsd:element name="street" type="xsd:string"/> <xsd:element name="town" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element></xsd:schema>

Equivalent XML Schema Definition (XSD):

Page 16: Html, Xml, 그리고 시맨틱웹

Semantic Web

Page 17: Html, Xml, 그리고 시맨틱웹

Activity Stream

Page 18: Html, Xml, 그리고 시맨틱웹

ATOM + ActivityStreams