html, xml, 그리고 시맨틱웹

Post on 26-May-2015

974 Views

Category:

Education

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

HTML, XML andSemantic Web

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

정 지 훈

HTML

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.

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.

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>

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>

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>

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.

Address Example: External to HTML

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

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

External Presentation:

HTML Markup:

HTML tags are stillpresentation-oriented

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:

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

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

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):

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):

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):

Semantic Web

Activity Stream

ATOM + ActivityStreams

top related