Presentation is loading. Please wait.

Presentation is loading. Please wait.

MSc IT Multimedia XML & XSLT P. Muneesawang. 2 Outline Why XML XSL.

Similar presentations


Presentation on theme: "MSc IT Multimedia XML & XSLT P. Muneesawang. 2 Outline Why XML XSL."— Presentation transcript:

1 MSc IT Multimedia XML & XSLT P. Muneesawang

2 2 Outline Why XML XSL

3 3 World Wide Web Consortium W3C, founded in October 1994: http://www.w3.org/ Purpose: develop common protocols that promote WWW’s evolution and ensure its interoperability User Interface Domain Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), Document Object Model (DOM), Scalable Vector Graphics (SVG), SMIL Technology and Society Domain Platform for Privacy Preferences (P3P), Platform for Internet Content Selection (PICS), Resource Description Framework (RDF) Architecture Domain Hypertext Transfer Protocol (HTTP), Extensible Markup Language (XML)...Follow links at http://www.w3.org/ for more details…

4 4 Why Many XML Issues Related to Multimedia: XML Data Representation XML Schemes and MPEG XML and Multimedia Data Indexing XML and Multimedia Data Caching Multimedia applications and XML XML DTDs and Database Schemas Security But.... We need to start with the basics….

5 5 Why Full Text Encoding or Mark-up allows: the representation of structure (original or otherwise - Headers, sections, cuts, divisions etc) to make explicit an interpretation or document searching (e.g. find by artist x, and/or by reference y) output in a specific format re-use in different formats (one document, many outputs e.g. PC, PDA, Phone, Print) platform & software-independence wide distribution preserve content

6 6 Why Particularly useful for: collating/providing different versions designing interactive multimedia editions recording metadata (date of creation, copyright status, change history, etc)

7 7 Mark-up Languages A set of rules that typically state: what kind of mark-up is allowed where it is allowed required how its elements relate to each other how to tell mark-up from content

8 eXtensible Makeup Language (XML)

9 9 XML XML is a method for putting structured data in a text file XML looks a bit like HTML but isn't HTML XML is text, can be read by humans and computers XML is a family of technologies XML is verbose, but that is less of a problem XML is new, but not that new XML is license-free, platform-independent and well-supported

10 10 What is XML? Interchange structured documents over the internet Start and end of each logical part (elements) DTD formal model allows users to check validity Does not require presence of DTD A family of languages e.g. XSLT, XSL, XPath

11 11 What is XML? XML allows users to: bring multiple files together to form compound documents identify where images, sounds, video should be incorporated provide processing control information add editorial comments to a file

12 12 What is XML? XML is not a predefined set of tags a standardized template for producing particular document types

13 13 HTML Example Apples £1 Oranges £2

14 14 XML Example Apples £1 Oranges £2

15 15 XML Tree Well-formed XML tree

16 16 XML tree Not well-formed XML tree

17 17 XML Components Documents composed of entities Entities can contain one or more logical elements Each element can have certain attributes

18 18 XML use Elements and attributes entered between matched pairs of angle brackets Entity references start with an ampersand and end with a semi-colon &….;

19 19 XML Use <! DOCTYPE memo SYSTEM “http://www.acme.com/memo.dtd> All Staff Ian Anderson 20 January Lottery The HATII syndicate has won the lottery and we can all quit tomorrow.

20 20 Defining your Tag Set Must create a DTD <! DOCTYPE memo [ <! ELEMENT memo (to, from, date, subject?, para+) > ] >

21 21 Using XML Coded Text XML Processing Instruction Document Type Declaration (internal or external subset) <! DOCTYPE memo SYSTEM “http://www.myco.com/memo.dtd > Document Instance Element type name must match document type name

22 22 Using XML Coded Text If all three components present, and document instance conforms to rules defined in document type definition, the document is valid. If only document instance is present all XML processor can do is check document is well- formed

23 23 Where now? XML Multimedia Developments PMML - Pervasive Multimedia Markup Language RDF - Resource Description Framework (Multimedia specific): an infrastructure that enables the encoding, exchange, and reuse of structured metadata. SMIL - Synchronized Multimedia Integration Language

24 24 Context: Informedia Digital Video Library

25 25 Sample XML for Informedia Results Set <im:doc> 55195 0 1667499 55195 0 1667499 1999 12 2 1999 12 2 100 29930 0:29 100 29930 0:29 The Maker of Cherry Garcia and Rainforest Crunch Ice Cream Could Soon be Scooped Up; Ice Cream Maker Didn't Name Potential The Maker of Cherry Garcia and Rainforest Crunch Ice Cream Could Soon be Scooped Up; Ice Cream Maker Didn't Name Potential </im:doc><im:doc> 54770 1 2111578 54770 1 2111578 1999 11 19 1999 11 19 70 196480 3:16 70 196480 3:16 So, While Ice Cream Parlor Closed, in Suite Next Door to where Tim and Heidi Manipulate Bones, Tim and Heidi now also Fill Jars So, While Ice Cream Parlor Closed, in Suite Next Door to where Tim and Heidi Manipulate Bones, Tim and Heidi now also Fill Jars </im:doc></IDVLResults>

26 26 Other W3C Recommendations XSLT – Extensible Stylesheet Language Transformations XPath – XML Path Language XML Schema

27 27 Adding Style to XML XML only text-based, not for visually presentation. Extensible Stylesheet Language (XSL) and XSL Transformations (XSLT) available (XSL as working draft, XSLT as W3C Recommendation Nov. 16, 1999, http://www.w3.org/TR/xslt) XSLT: a language for transforming XML documents into other XML documents XPATH: a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer

28 28 XML example 001 น. ส. ชลธิชา ศรีดา กรุงเทพ 02914-6758 chon@hotmail.com http://www.chon.com/ 002 นายศุภชัย สมพานิช กรุงเทพ 02524-1234 thaivb@chaiyo.com http://www.vbth.cjb.net/

29 29 XSL example เบื้องต้นการใช้งานภาษา XSL ร่วมกับภาษา XML รหัส ชื่อ ที่อยู่ โทรศัพท์ E-mail โอมเพจ

30 30 XSLT, larger font, 1 of 2 เบื้องต้นการใช้งานภาษา XSL ร่วมกับภาษา XML รหัส ชื่อ ที่อยู่ โทรศัพท์ E-mail โอมเพจ

31 31 XSLT, larger font, 2 of 2

32 32 XML in IE

33 33 Experiments Install XMLSPY 5 Enterprise Edition Follow the online tutorial: Step I: making XML schema Step II: making XML file Step III: making XSLT


Download ppt "MSc IT Multimedia XML & XSLT P. Muneesawang. 2 Outline Why XML XSL."

Similar presentations


Ads by Google