Presentation is loading. Please wait.

Presentation is loading. Please wait.

HUFS MCLAB 1 April, 2006 Chap 14. XML and Multimedia 2006. 4. 11 ( 화 ) 한 민 규

Similar presentations


Presentation on theme: "HUFS MCLAB 1 April, 2006 Chap 14. XML and Multimedia 2006. 4. 11 ( 화 ) 한 민 규"— Presentation transcript:

1 HUFS MCLAB 1 April, 2006 Chap 14. XML and Multimedia 2006. 4. 11 ( 화 ) 한 민 규 hufs96mk@hufs.ac.kr

2 HUFS MCLAB 2 April, 2006 Contents DirectShow Overview DirectShow Filter Type Support various hardwares DirectShow Function Setup DirectShow SDK Microsoft Component Model 정지영상 캡쳐 프로그램 Appendix A. WDM

3 HUFS MCLAB 3 April, 2006 Overview

4 HUFS MCLAB 4 April, 2006 Overview(1/2) Since HTML’s tags are not sufficient for the class of Web pages as it has evolved, new tags are requried. ▲ why not sufficient?  Ex) search to “chocolate mousse’s” on the web HTML 에 Sort 하기 위한 어떤 정보 (new tag) 를 더 넣은 것은 HTML 을 더 무겁게 하고 unmanageable 하게 할 것이다. SGML (Standard Generalized Markup Language) ▲ 규정된 response time 동안 parsing 하기 어렵다. SGML Subset  XML ▲ Overhead 없이 SGML 에서 제공하는 것을 지원하게 설계되었다. ▲ XML 은 Web Doucment 를 만들기 위해 웹 디자이너가 자신의 Tag Set 을 define 할 수 있게 한다. ▲ HTML 의 제한에서 자유로워짐  규정된 Tag 의 사용으로써 Content 를 표현하려 하던 Web 에서 Content 를 중심으 로 한 Document 의 개념으로 확장됨  DTD (Document Type Definition)

5 HUFS MCLAB 5 April, 2006 Overview(2/2) XML 1.0 was adopted as a World Wide Web Consortium Recommendation early in 1998. DTD (Document Type Definition) formal definition of set of elements, their attributes and constraints on usage

6 HUFS MCLAB 6 April, 2006 XML(eXtensible Markup Language) Although XML itself has no direct support for multimedia, it underlies the more specialized markup language SMIL (Synchronized Multimedia Integration Language) and SVG (Scalable Vector Graphics). ▲ ‘ Like XHTML, except that you can make up your own tags and attribute names ’ ▲ …   Properly nested ▲ attribute-name = "attribute-value" ▲ &entity-reference

7 HUFS MCLAB 7 April, 2006 Well-formed XML

8 HUFS MCLAB 8 April, 2006 XML – Structure Model The structure which XML markup imposes on a document can be represented in the form of a tree, sometimes called a structure model Structure Model

9 HUFS MCLAB 9 April, 2006 DTDs(Document Type Definition) Validity : If a well-formed document has a specification attached to it and conforms to the rules in that specification, the document is said to be valid. In XML, there are two ways of providing such a specification. The older, better-established method is by means of a DTDs; a newer method, which is gaining in popularity, is by an XML Schema. DTD 에는 XML 문서의 구성요소 ( 태그 및 속성 ) 들을 어떻게 사용하는지를 정 의하고 그런 구성요소 ( 태그 및 속성 ) 들 사이의 관계나 데이터 타입, 출현빈 도 등의 규칙들을 정의한다. DTD 는 XML 문서내에서 작성될 수도 있고, 별도의 파일로 작성될 수도 있다.

10 HUFS MCLAB 10 April, 2006 Referencing a DTD XML declaration ▲ Example of a Processing Instruction (PI)   PIs beginning with “xml” are used for special purposes in XML processing. DOCTYPE declaration ▲ If a DTD in an external file is being used, the XML declaration should be followed by a DOCTYPE declaration resembling the following:  http://www.digitalmultimedia/DTDs/books.dtd  XML 문서작성자는 XML 문서가 어떤 마크업 언어로 작성된 것인지를 XML 문서를 해석하는 측에 알려줄 목적으 로 문서 유형 선언을 하게 된다.  DOCTYPE document element  DOCTYPE books : books – document root element  PUBLIC 키워드를 사용해서 문서 유형을 선언하는 문법 : PUBLIC 키워드는 공개적인 사용을 위해서 업체 및 국제공인 단체에서 작성된 외부 DTD 서브셋 문서를 지정할 경우 사용된다.  “-//DMM/BOOK Bibliographic information 1.0//EN” : [+,-]//DTD 를 개발 및 유지보수 업체명 //DTD 명 및 버전번호 // 사용된 언어 + : IS 와 같은 국제적으로 공인된 단체, - : 국제적으로 공인된 단체가 아닌 업체  http://www.digitalmultimedia/DTDs/books.dtd : DTD 문서를 다운로드할 수 있는 URL 경로를 기술 http://www.digitalmultimedia/DTDs/books.dtd

11 HUFS MCLAB 11 April, 2006 Element Declarations in DTDs ▲  EMPTY – no content. ▲  (#PCDATA)* - obscure way of referring to textual content. ▲  Books must consist of one or more book elements. ▲  Where a sequence of elements must occur in order, ther are writeen on affter another, separated by commas. ▲  Note the use of brackets to delimit the choice.

12 HUFS MCLAB 12 April, 2006 Attribute-list declarations in DTDs(1/2) In a DTD, an element’s attributes are listed in a separate attribute-list declaration. ▲  CDATA indicates that the attribute takes values which are character data(strings)  #REQURIED  must be given an explicit value  #IMPLED  attribute is optional

13 HUFS MCLAB 13 April, 2006 Attribute-list declarations in DTDs(2/2) Default value – if attribute is omitted, takes on specified value ▲

14 HUFS MCLAB 14 April, 2006 Namespaces In order to make it easy to generate unique names, XML namespaces define a two-level naming system that ensures that different names can be referred to differently, without requiring any administrative mechanism to control the use of names globally. Where namespaces are being used, an element or attribute name may have a prefix, which is separated form the name by a colon. (paper prefix bbl:title, lecturers prefix ppl:title) Dr … On the use of brains Dr … On the use of brains

15 HUFS MCLAB 15 April, 2006 Namespaces Prefixed name is an abbreviation for combination of URL + name, URLs are always unique, so combination is unique Assign namespace URL to an attribute ▲ Xmlns:prefix Usually done in start tag of the document element, so prefix is in scope throughout document ▲ You can also assign a namespace URL to an attribute simply called xmlns, with no colon or suffix ▲ ▲ You can’t use a namespace declaration inside a DTD, but you can use prefixed names, so that, after the DTD has been processed, documents that use it will be valid.

16 HUFS MCLAB 16 April, 2006 Stylesheets No layout information at all in XML ▲ This must be done with an external stylesheet ▲ Use xml-stylesheet instruction  CSS and XML(1/3) ▲ Using CSS with XML is a straightforward generalization of using CSS with HTML  You simply define rules for each element type in your XML document.  XML tends to be used in a slightly different way from HTML.  CSS1  Support HTML & CSS2  Support HTML & XML  In CSS2, it has a lengthy list of possible values, many of them concerned with table elements

17 HUFS MCLAB 17 April, 2006 CSS and XML(2/3) 스타일 쉬트는 여러 개의 룰셋 (Rule set) 으로 구성된다. CSS example Book { display:block; } Title { font-family:fantasy; font-size:large; color:blue; display:block; } author { font-family:fantasy; font-size:large; color:green; display:block; } Selector Rule set Attribute name : value display attribute Block Inline List-item none 앞, 뒤의 element 에 대해 줄바꿈 사용 앞, 뒤의 element 에 대해 줄바꿈 없음 Block 과 동일한 기능에 목록 표시 추가 지정한 element 에 대해 출력안함

18 HUFS MCLAB 18 April, 2006 CSS and XML(3/3) attr(x) to insert value of X attribute Use element Selector ▲ Price:before { content: “\00A3” attr(sterling);} Use attribute Selector ▲ Price[euro]:after { content:”/\20AC” attr(euro);}

19 HUFS MCLAB 19 April, 2006 Problems of CSS & XSL CSS 는 출력되는 내용을 XML 문서의 원래 구조대로 출력하는 것을 원칙으로 한다. 입력 XML 문서와 전혀 다른 구조로 출력 하는 것은 불가능 하다. CSS 는 XML 문서에 없는 새로운 내용이나 계산된 결과를 출력 할 수 있는 기능을 제공하지 않는다. 폰트나 색깔, 여백주기 그 리고 불릿기호, 순번, 라벨을 엘리먼트의 앞뒤에 삽입할 수 있 는 정도의 간단한 스타일 밖에 지정할 수 없다. CSS 는 XML 문서의 모든 내용을 출력할수 없다. 예를 들어 속 성값을 출력할 수 있는 방법은 전혀 제공되지 않는다.

20 HUFS MCLAB 20 April, 2006 XSLT and XSL-FO(1/2) CSS does not really incorporate a layout model suitable for paged media, such as print The Extensible Stylesheet Language(XSL) was devised to overcome these deficiencies of CSS. ▲ It is a much more complex language than CSS, having many of the characteristics of a functional programming language with pattern matching. ▲ Its approach to formatting uses a two-stage process. XML DOC XSL DOC + XSLD Transformation Formatter PDF DOC Acrobat Reader App XSL-FO Document Result Tree XSL Processor Transformation ProcessFormatting Process

21 HUFS MCLAB 21 April, 2006 XSLT and XSL-FO(2/2) XSLD Three Part ▲ XSLT(XSLD Transformation) ▲ XPath(XML Path Language) ▲ XSL-FO(XSL formatting Objects) In order to transform the nodes of a tree, it is necessary to be able to address them using their position in the hierarchy of the tree structure. ▲ XPath can be used to define links between XML documents. ▲ XSLD-FO comprises the formatting objects themselves. Formally, this is now known simply as XSLD, but because of the possible confusion this may cause, it is more often referred to as XSL-FO, where the FO stands for ‘formatting objects’ ▲ XSLT and XSL-FO are themselves XML. That is, an XSLT stylesheet is an XML document that uses a vocabulary of elements suitable for specifying tree transformations. Essentially, an XSLT stylesheet comprises a collection of templates, which define how to build part of a new tree out of parts of the old one.

22 HUFS MCLAB 22 April, 2006 Linking in XML Three components ▲ XPointer – language for identifying link destinations ▲ XPath – language for addressing nodes in a structure tree, used by XPointer ▲ XLink – a set of attributes for constructing elements that serve as links XPath ▲ XPath does not use the syntax of XML proper. It uses its own notation, which is more suited for the purpose of describing locations in a document. ▲ A location or set of locations is described in XPath by a location path. ▲ Location path  Set of instructions (location steps), separated by /s, telling you how to reach a specific point in a document. ▲ Context node  The node reached by following any preceding location steps.

23 HUFS MCLAB 23 April, 2006 Location Steps / - root node A location path that begins with a / is an absolute path The simplest form of location step consists of the name of an element type. ▲ Element name[number], e.g. book[2]  Particular child node of that element type, e.g. 2 nd book child ▲ Instead of selecting a node by name from among the context node’s children, you can select it from various other sets of nodes, which are structurally related to the context node in various ways.  Axes is simple method for select a node.

24 HUFS MCLAB 24 April, 2006 XML Document Tree Root Element Attribute Text Element Text 2 nd Node Set Element Node Text Node Attribute Node Location path /root element/child element/ …/ child element Absolute path /root element node/ child element node/ … / child element node Relative path./child element node/ … /child element node Sibling path../sibling element node

25 HUFS MCLAB 25 April, 2006 Axis Syntax Axis::NodeTest[Predicate] Axis

26 HUFS MCLAB 26 April, 2006 Axis(Con’t) Nodetest[Predicate]

27 HUFS MCLAB 27 April, 2006 Axes Tree

28 HUFS MCLAB 28 April, 2006

29 HUFS MCLAB 29 April, 2006

30 HUFS MCLAB 30 April, 2006 XPointer

31 HUFS MCLAB 31 April, 2006 XLink


Download ppt "HUFS MCLAB 1 April, 2006 Chap 14. XML and Multimedia 2006. 4. 11 ( 화 ) 한 민 규"

Similar presentations


Ads by Google