Presentation is loading. Please wait.

Presentation is loading. Please wait.

XML-I (eXtensible Markup Language) Instruction of XML

Similar presentations


Presentation on theme: "XML-I (eXtensible Markup Language) Instruction of XML"— Presentation transcript:

1 XML-I (eXtensible Markup Language) Instruction of XML
Jung, Jin A An append contents to PPT by bluejfet 2002/05/04 Multimedia Lab. Dept. of Electrical and Computer Eng. University of Seoul Seoul, Korea

2 1 Main Objectives of the presentation. 2. Overview or Introduction
0. Contents 1 Main Objectives of the presentation. 2. Overview or Introduction 3. Where has XML come from? 4. XML 관련 표준안 5. XML Document의 종류 6. XML Grammar 4. Summary or conclusion 단기 4352년 1월 11일 Jung, Jin A

3 1. Main Objectives XML의 등장 배경 XML의 특성 XML의 구성요소 XML 문법 overview
단기 4352년 1월 11일 Jung, Jin A

4 2. Overview or Introduction
XML(eXtensible Markup Language)는 차세대 Web Language로 주목 받는 언어이다. XML이 등장하게 되는 배경과, XML의 구성 요소 및 문법을 간략하게 살펴본다. 단기 4352년 1월 11일 Jung, Jin A

5 3. Where has XML come from? 3. Where has XML come from?
3. Where has XML come from? Markup Language SGML HTML XML 단기 4352년 1월 11일 Jung, Jin A

6 Markup 3.1 Markup Language(1/2) Stylistic Markup Structural Markup
Markup Stylistic Markup 문서의 외양에 대한 표현 (ex : font,font size,color..) Structural Markup 문서의 구조에 대한 표현 (ex : p) Semantic Markup 데이터의 내용에 의미 부여 (ex: title) 단독으로 쓰일 수 없고 본문 내용과 함께 사용되어 그 문서를 특정 시스템에서 재현 할 때 어떤 형태로 표현 할 것인지에 대한 정보를 전달 하는 역할. SGML , HTML , XML 단기 4352년 1월 11일 Jung, Jin A

7 Ref. 이묘희’s presentation
3.1 Markup Language(2/2) SGML XML HTML ISO 1986년 1998년 2월 1.0발표 1992년 공개 Ref. 이묘희’s presentation SGML invented by Charles Goldfarb, Ed Mosher, and Ray Lorie at IBM in the 1970s and developed by several hundred people around the world until its eventual adoption as ISO standard 8897 in 1986. 1996년 : XML 워킹그룹 생성 1996년 : SGML '96 컨퍼런스에서 이들은 처음으로 XML의 초안 발표 1997년 : XML Developers Day탄생 1997년 : SGML/XML 97 컨퍼런스 Candidate Recommendation 공포 1998년 : XML1.0 Recommendation 2000년 : XML 1.0(second edition)이 발표 단기 4352년 1월 11일 Jung, Jin A

8 3.2 SGML(1/2) SGML 이란? SGML의 목적 SGML의 구성
SGML 이란? Standard Generalized Markup Language. 문서에서 논리 구조와 내용 구조를 기술하기 위한 meta-language. SGML의 목적 Text ,Graphics , audio and video등을 포함하는 멀티미디어 전자 문서를 이기종 시스템들 간에 정보의 손실 없이 효율적으로 전송, 저장 및 자동 처리하는 데 있다. SGML의 구성 SGML Declaration 문서를 기술하기 위해 사용된 구문을 설명 DTD(Document Type Definition) 문서 구조와 논리적인 속성을 정의. SGML의 핵심. Document Instance DTD에서 정의한 규칙과 구조에 맞춰 정의된 실제 문서. 단기 4352년 1월 11일 Jung, Jin A

9 3.2 SGML(2/2) SGML의 장점 SGML의 단점 문서의 구조화 ( 모듈화, 재사용 가능)
SGML의 장점 문서의 구조화 ( 모듈화, 재사용 가능) 이식성(특정된 s/w에 구속되지 않음) 사용자 정의 tag set 사용 가능 형식과 구조의 분리 SGML의 단점 매우 복잡 SGML전체를 지원하는 소프트웨어의 개발이 어렵고, 비용이 많이 든다. Browser업체의 완전 지원 미흡 인터넷을 위한 목적으로 만들어지지 않았다. DTD 문서 반드시 존재해야 됨. 단기 4352년 1월 11일 Jung, Jin A

10 3.3 HTML HTML이란? HyperText Markup Language
Web에서 사용되는 HyperText문서를 작성하기 위한 markup language. 인터넷에서 문서를 보여주는데 주안점. 장점 이식성 우수, 쉽고 간결한 문법 싸고 많은 종류의 편집기, viewer. Web Browser를 통한 통일된 인터페이스. 단점 확장성 제한 :고정된 tag set만을 사용. 구조적 정보 표현 한계 : 효과적인 재사용, 검색 ,검증이 불가능. 단기 4352년 1월 11일 Jung, Jin A

11 3.4 XML (1/2) XML의 특성 eXtensible Markup Language
HTML과 SGML의 한계를 극복하기 위한 대안. Web에서 구조화된 문서를 전송 가능하도록 설계된 표준화된 텍스트 형식. SGML의 특성 Extensibility – 사용자 tag정의 가능 문서 구조화 (Markup) 재사용, 검색용이 stylesheet를 분리함으로써 관리가 용이. HTML의 특성 인터넷에의 사용을 위해 최적화. 사용하기 쉽다. 단기 4352년 1월 11일 Jung, Jin A

12 3.4 XML (2/2) DTD가 존재하지 않더라도 XML문법에만 맞게 구성된 문서라면 well-formed document로 처리 가능. Primary Character set으로 8-bit ASCII와 Unicode사용. 양방향, 다방향 링크 제공. 단기 4352년 1월 11일 Jung, Jin A

13 4. XML의 관련 표준안 XML 관련 표준안 XLL (Link) XQL XSL (Query) (View/Translate)
DTD (Schema) XML (Contents) DOM (Access) 단기 4352년 1월 11일 Jung, Jin A

14 단기 4352년 1월 11일 Jung, Jin A

15 4.1 DTD(Document Type Definition)
SGML에서 온 개념 작성하고자 하는 문서의 구조를 정의하는 문서로, 문서에서 사용할 태그의 종류와 태그의 순서, 태그의 발생 횟수등 문서의 구조 정보를 정의한다. 단기 4352년 1월 11일 Jung, Jin A

16 4.2 XSL(eXtensible Stylesheet Language)
논리적 구조만 가지고 있는 XML문서가 보여지기 위해서는 formatting처리가 필요한데, 이를 제공하기 위해 XML에서는 SGML의 formatting언어인 DSSSL(Document Style Semantics and Specification Language)를 간소화해서 사용. XML XSL Web Browser Display 단기 4352년 1월 11일 Jung, Jin A

17 참고-StyleSheet 문서 StyleSheet SGML DSSSL HTML CSS XML CSS, XSL
문서의 Display를 위한 생성 규칙, 스타일 규칙 정보를 가진 문서 문서 StyleSheet SGML DSSSL HTML CSS XML CSS, XSL 단기 4352년 1월 11일 Jung, Jin A

18 4.3 XLL(eXtensible Linking Language)
인터넷 상에서 문서의 링크를 가리키는 부분 및 문서의 특정 부분을 가리키는 부분을 정의. Xlink와 Xpointer표준으로 구성 Xlink는 HTML의 기능 확장. 1:N 링크 가능. Xpointer는 TEI의 확장 포인터로부터 유래한 위치 지정자 구문 사용. IE5.0에서 XLL제공 못함. 단기 4352년 1월 11일 Jung, Jin A

19 5. XML Document의 종류 5. XML Document의 종류 Well-Formed Document
Valid Document 단기 4352년 1월 11일 Jung, Jin A

20 5.1 Well-Formed Document(1/2)
XML은 DTD 가 없는 문서의 작성이 가능 (XML 처리기가 DTD가 없는 XML문서의 경우 DTD를 만들어 주기 때문) 필수 조건 모든 element를 포함하는 하나의 root element 의 존재. 모든 요소들은 여는 태그와 닫는 태그가 반드시 쌍을 이루어야 한다. 중첩 규칙을 위반하지 않아야 한다. 단기 4352년 1월 11일 Jung, Jin A

21 5.1 Well-formed Document(2/2)
<?xml version="1.0" encoding="EUC-KR"?> <profile> <name>이똘똘</name> <major>전기전자공학</major> <interest> <hobby>강아지 기르기</hobby> </interest> </profile> 단기 4352년 1월 11일 Jung, Jin A

22 XML문서를 위한 DTD가 따로 있는 XML문서.
5.2 Valid Document(1/2) XML문서를 위한 DTD가 따로 있는 XML문서. Well-formed XML의 요건을 모두 갖추고 DTD에 의해 미리 정의된 문서 구조를 가져야 한다. Valid Document DTD가 있는 XML문서인 경우, DTD의 정의대로 작성되었는지 검사하여 아무런 오류도 발견되지 않은 문서 단기 4352년 1월 11일 Jung, Jin A

23 5.2 Valid Document(2/2) <?xml version="1.0" encoding="EUC-KR"?>
<!Doctype profile system “profile.dtd”> <profile> <name>이똘똘</name> <major>전기전자공학</major> <interest> <hobby>강아지 기르기</hobby> </interest> </profile> 단기 4352년 1월 11일 Jung, Jin A

24 6. XML Grammar 6. XML Grammar Element Attribute Entity Comment
Processing Instructions CDATA 단기 4352년 1월 11일 Jung, Jin A

25 Example XML Document <MultimediaLab since="1994">
<?xml version="1.0" encoding="EUC-KR" standalone="yes"?> <!--?xml-stylesheet type="text/css" href="recipe.css"?--> <MultimediaLab since="1994"> <professor><name>최성종</name></professor> <student> <name>김현수</name> <name>김병현</name> <name>강명헌</name> <name>김응상</name> <name>이두희</name> <name>이은성</name> </student> </MultimediaLab> Prolog Document Elements 단기 4352년 1월 11일 Jung, Jin A

26 <MultimediaLab since="1994"> root element
<?xml version="1.0" encoding="EUC-KR" standalone="yes"?> <!--?xml-stylesheet type="text/css" href="recipe.css"?--> <MultimediaLab since="1994"> <professor><name>최성종</name></professor> <student> <name>김현수</name> <name>김병현</name> <name>강명헌</name> <name>김응상</name> <name>이두희</name> <name>이은성</name> </student> </MultimediaLab> root element Content (Text String) One element Its type is name Opening [Start Tag] Closing [End Tag] 단기 4352년 1월 11일 Jung, Jin A

27 <MultimediaLab since="1994">
<?xml version="1.0" encoding="EUC-KR" standalone="yes"?> <!--?xml-stylesheet type="text/css" href="recipe.css"?--> <MultimediaLab since="1994"> <professor><name>최성종</name></professor> <student> <name>김현수</name> <name>김병현</name> <name>강명헌</name> <name>김응상</name> <name>이두희</name> <name>이은성</name> </student> </MultimediaLab> Attribute 단기 4352년 1월 11일 Jung, Jin A

28 <MultimediaLab since="1994">
<?xml version="1.0" encoding="EUC-KR" standalone="yes"?> <!--?xml-stylesheet type="text/css" href="recipe.css"?--> <MultimediaLab since="1994"> <professor><name>최성종</name></professor> <student> <name>김현수</name> <name>김병현</name> <name>강명헌</name> <name>김응상</name> <name>이두희</name> <name>이은성</name> </student> </MultimediaLab> Comment 단기 4352년 1월 11일 Jung, Jin A

29 <MultimediaLab since="1994">
<?xml version="1.0" encoding="EUC-KR" standalone="yes"?> <?xml-stylesheet type="text/css" href="recipe.css"?> <MultimediaLab since="1994"> <professor><name>최성종</name></professor> <student> <name>김현수</name> <name>김병현</name> <name>강명헌</name> <name>김응상</name> <name>이두희</name> <name>이은성 & 은성친구 </name> </student> </MultimediaLab> Processing Instruction Entity Reference 단기 4352년 1월 11일 Jung, Jin A

30 <MultimediaLab since="1994">
<?xml version="1.0" encoding="EUC-KR" standalone="yes"?> <!--?xml-stylesheet type="text/css" href="recipe.css"?--> <MultimediaLab since="1994"> <professor><name>최성종</name></professor> <student> <name>김현수</name> <name>김병현</name> <name>강명헌</name> <name>김응상</name> <name>이두희</name> <name>이은성</name> </student> </MultimediaLab> XML Declaration The XML declaration must appear as the first line of the document without other content, including white space, in front of the start <. The version number, <?xml version="1.0"?>. This is mandatory. The encoding declaration encoding="EUC-KR" This is optional. 단기 4352년 1월 11일 Jung, Jin A

31 <MultimediaLab since="1994">
<?xml version="1.0" encoding="EUC-KR" standalone="yes"?> <!--?xml-stylesheet type="text/css" href="recipe.css"?--> <MultimediaLab since="1994"> <professor><name>최성종</name></professor> <student> <name>김현수</name> <name>김병현</name> <name>강명헌</name> <name>김응상</name> <name>이두희</name> <name>이은성</name> </student> </MultimediaLab> Professor element is called the parent of the name element. The professor and student element is called one another siblings. 단기 4352년 1월 11일 Jung, Jin A

32 <Song> I’v Got You Bebe </Song>
6.1 Element Element는 시작 tag 와 마침 tag로 묶어진 논리적 문서 단위이다. XML에서는 반드시 시작태그와 마침태그가 쌍을 이루워야 한다. XML tag are case sensitive. : 대소문자 구분. Example : <Song> I’v Got You Bebe </Song> 단기 4352년 1월 11일 Jung, Jin A

33 <Song era=“60s” > I’v Got You Bebe </Song>
6.2 Attribute Element의 특성을 표현하기 위해서 쓰여지는 정보를 의미한다. Case-sensitive Quote attribute values Example : <Song era=“60s” > I’v Got You Bebe </Song> 단기 4352년 1월 11일 Jung, Jin A

34 Recommendations 6.3 Element vs Attribute 데이터 자체는 element에 저장.
데이터에 관한 정보(meta-data)는 속성에 저장. Element- 변화가 생겼을 경우 확장이 용이. Attribute- sub-element를 포함 불가능. 단기 4352년 1월 11일 Jung, Jin A

35 Entity는 문서 내에서 참조 될 수 있는 문자 집합의 단위. (C++의 macro나 상수 같은 것) 구성 종류
선언 , 참조 종류 General Entity : Document Instance 안에서 사용을 위한 개체.(&, ;) Parameter Entity : DTD or 조건 처리시 사용 (%, ;) 참조 대상의 위치 Internal Entity External Entity 단기 4352년 1월 11일 Jung, Jin A

36 6.4 이미 정의된 Character Entity(2/2)
개체 이름 기호(의미) lt < < (Less than) gt > > (Greater than) amp & &(Ampersand) quot " “(Quote) apos &apos; ‘(Apostrophe) 단기 4352년 1월 11일 Jung, Jin A

37 6.5 Comment & Processing Instructions(PI)
표현 방법 : <!- - 문자열 - - > “- -”기호를 제외하고 어떤 문자도 사용 가능 Processing Instructions(PI) 외부 application의 기능을 사용하려 할 때 필요한 것이 Processing Instruction(PI) 이다. Application/application parser를 parser에게 분명히 알리고 싶을 때 이용한다. Example <?XML-stylesheet href=“ .xsl”?> 단기 4352년 1월 11일 Jung, Jin A

38 <![CDATA[<greeting>Hello, World</greeting>]]>
parsing 되지 않는 문자 데이터. CDATA(Character DATA) section은 모든 text가 markup이 아니라 문자 data로 해석되기 원할 때 사용. Element의 내용에만 나타난다. CDATA에서 허용하지 않는 text : ]] Example : <![CDATA[<greeting>Hello, World</greeting>]]> 단기 4352년 1월 11일 Jung, Jin A

39 XML Document는 DTD의 여부에 따라 Well-formed Document와 Valid Document로 구분된다.
7. Summary or Conclusion XML은 SGML과 HTML의 한계를 극복하기 위한 대안으로 제시된 언어로 Web에서 구조화된 문서를 전송,처리를 가능하도록 한다. XML Document는 DTD의 여부에 따라 Well-formed Document와 Valid Document로 구분된다. 단기 4352년 1월 11일 Jung, Jin A


Download ppt "XML-I (eXtensible Markup Language) Instruction of XML"

Similar presentations


Ads by Google