Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 14 This presentation © 2004, MacAvon Media Productions XML.

Slides:



Advertisements
Similar presentations
XML-XSL Introduction SHIJU RAJAN SHIJU RAJAN Outline Brief Overview Brief Overview What is XML? What is XML? Well Formed XML Well Formed XML Tag Name.
Advertisements

What is XML? a meta language that allows you to create and format your own document markups a method for putting structured data into a text file; these.
History Leading to XHTML
XML Unit 6 October 31. XML, review XML is used to markup data Used to describe information Uses tags like HTML –But all tags are user-defined –Must be.
3 November 2008CIS 340 # 1 Topics To define XML as a technology To place XML in the context of system architectures.
Tutorial 9 Working with XHTML
Introduction to XLink Transparency No. 1 XML Information Set W3C Recommendation 24 October 2001 (1stEdition) 4 February 2004 (2ndEdition) Cheng-Chia Chen.
 2002 Prentice Hall, Inc. All rights reserved. ISQA 407 XML/WML Winter 2002 Dr. Sergio Davalos.
26-Jun-15 XML. 2 HTML and XML, I XML stands for eXtensible Markup Language HTML is used to mark up text so it can be displayed to users XML is used to.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
Tutorial 11 Creating XML Document
COS 381 Day 14. Agenda Questions?? Resources Source Code Available for examples in Text Book in Blackboard
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
ECA 228 Internet/Intranet Design I Intro to XSL. ECA 228 Internet/Intranet Design I XSL basics W3C standards for stylesheets – CSS – XSL: Extensible Markup.
ECA 228 Internet/Intranet Design I Intro to XML. ECA 228 Internet/Intranet Design I HTML markup language very loose standards browsers adjust for non-standard.
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
XP New Perspectives on XML Tutorial 3 1 DTD Tutorial – Carey ISBN
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation Document Type Definition.
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
An Introduction to XML Patrice Bonhomme & Laurent Romary Lucid-ITLORIA eXtensible Markup Language version 1.0 Recommendation,
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
XML CPSC 315 – Programming Studio Fall 2008 Project 3, Lecture 1.
School of Computing and Management Sciences © Sheffield Hallam University To understand the Oracle XML notes you need to have an understanding of all these.
Representing Web Data: XML CSI 3140 WWW Structures, Techniques and Standards.
XP 1 CREATING AN XML DOCUMENT. XP 2 INTRODUCING XML XML stands for Extensible Markup Language. A markup language specifies the structure and content of.
XML What is XML? XML v.s. HTML XML Components Well-formed and Valid Document Type Definition (DTD) Extensible Style Language (XSL) SAX and DOM.
1 © Netskills Quality Internet Training, University of Newcastle Introducing XML © Netskills, Quality Internet Training University.
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
1 CIS336 Website design, implementation and management (also Semester 2 of CIS219, CIS221 and IT226) Lecture 6 XSLT (Based on Møller and Schwartzbach,
What is XML?  XML stands for EXtensible Markup Language  XML is a markup language much like HTML  XML was designed to carry data, not to display data.
Processing of structured documents Spring 2002, Part 2 Helena Ahonen-Myka.
1 Tutorial 13 Validating Documents with DTDs Working with Document Type Definitions.
Avoid using attributes? Some of the problems using attributes: Attributes cannot contain multiple values (child elements can) Attributes are not easily.
XPath. Why XPath? Common syntax, semantics for [XSLT] [XPointer][XSLT] [XPointer] Used to address parts of an XML document Provides basic facilities for.
XML A web enabled data description language 4/22/2001 By Mark Lawson & Edward Ryan L’Herault.
1 Chapter 10: XML What is XML What is XML Basic Components of XML Basic Components of XML XPath XPath XQuery XQuery.
XML Part 2 Josh Steele CS 6704, Spring XML Part 2 XSL/XSLT –Structure Revisited –Definition –Example –Components XML’s Linking Languages XML’s Uses.
XP Tutorial 9 1 Working with XHTML. XP SGML 2 Standard Generalized Markup Language (SGML) A standard for specifying markup languages. Large, complex standard.
Of 33 lecture 3: xml and xml schema. of 33 XML, RDF, RDF Schema overview XML – simple introduction and XML Schema RDF – basics, language RDF Schema –
CIS 451: XML DTDs Dr. Ralph D. Westfall February, 2009.
CP3024 Lecture 9 XML: Extensible Markup Language.
XML Extensible Markup Language Aleksandar Bogdanovski Programing Enviroment LABoratory
XML Instructor: Charles Moen CSCI/CINF XML  Extensible Markup Language  A set of rules that allow you to create your own markup language  Designed.
XP 1 Creating an XML Document Developing an XML Document for the Jazz Warehouse XML Tutorial.
Lecture 16 Introduction to XML Boriana Koleva Room: C54
1 Introduction to XML XML stands for Extensible Markup Language. Because it is extensible, XML has been used to create a wide variety of different markup.
The eXtensible Markup Language (XML). Presentation Outline Part 1: The basics of creating an XML document Part 2: Developing constraints for a well formed.
XML Design Goals 1.XML must be easily usable over the Internet 2.XML must support a wide variety of applications 3.XML must be compatible with SGML 4.It.
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
1 Tutorial 14 Validating Documents with Schemas Exploring the XML Schema Vocabulary.
Tutorial 13 Validating Documents with Schemas
INFSY 547: WEB-Based Technologies Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.2.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
Document Type Definition (DTD) Eugenia Fernandez IUPUI.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Linking XML Documents Ellen Pearlman Eileen Mullin Programming the Web.
Tutorial 9 Working with XHTML. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Describe the history and theory of XHTML.
C Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Introduction to XML Standards.
 XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
XML Introduction to XML Extensible Markup Language.
XML Notes taken from w3schools. What is XML? XML stands for EXtensible Markup Language. XML was designed to store and transport data. XML was designed.
1 Extensible Stylesheet Language (XSL) Extensible Stylesheet Language (XSL)
Extensible Markup Language (XML) Pat Morin COMP 2405.
Unit 4 Representing Web Data: XML
Tutorial 9 Working with XHTML
Chapter 7 Representing Web Data: XML
Document Type Definition (DTD)
Presentation transcript:

Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 14 This presentation © 2004, MacAvon Media Productions XML

© 2004, MacAvon Media Productions 14 eXtensible Markup Language Simplified version of SGML W3C Recommendation XML 1.0, 1998 Define your own set of elements for any type of document DTD (Document Type Definition) formal definition of set of elements, their attributes and constraints on usage XML 462–463

© 2004, MacAvon Media Productions 14 SMIL (Synchronized Multimedia Integration Language) SVG (Scalable Vector Graphics) MathML (Math Markup Language) XHTML These and others are all formally defined by XML DTDs XML-based Languages 463

© 2004, MacAvon Media Productions 14 ‘Like XHTML, except that you can make up your own tags and attribute names’ … Properly nested attribute-name = "attribute-value" &entity-reference A document that follows the syntax rules is well-formed XML Document Syntax 464

© 2004, MacAvon Media Productions 14 Nested tags => hierarchical structure, which can be represented as a tree, k/a structure model Each element and text section represented by a node Each node corresponding to an element that is not empty has some child nodes, corresponding to its content Structure Model 466

© 2004, MacAvon Media Productions 14 Specification of a set of permitted elements, the attributes each may have and which elements they can contain defines a class of documents with a certain structure (e.g. the class of all XHTML documents) A well-formed document which conforms to the rules in a specification attached to it is said to be valid Validity 466–467

© 2004, MacAvon Media Productions 14 DTD Established form of specification Uses special syntax Cannot express all constraints Schema Newer form of specification Uses ordinary XML syntax More powerful than DTD DTDs and Schemas 467–468

© 2004, MacAvon Media Productions 14 XML declaration (Example of a Processing Instruction, PI) DOCTYPE declaration e.g. public name, system identifier Referencing a DTD 468–469

© 2004, MacAvon Media Productions 14 Elements e.g. Markup Declarations 470

© 2004, MacAvon Media Productions 14 EMPTY – no content (#PCDATA)* text e.g. + one or more, ? optional, * zero or more e.g. Content Models 470–471

© 2004, MacAvon Media Productions 14 Sequence: elements &c separated by commas e.g. Choice | e.g. (Note use of brackets) Content Models 471

© 2004, MacAvon Media Productions 14 Attribute lists <!ATTLIST element name attribute name type requirement … > e.g. <!ATTLIST price sterling CDATA #REQUIRED euro CDATA #IMPLIED > Markup Declarations 471–472

© 2004, MacAvon Media Productions 14 CDATA – character data, i.e. strings, including numeric strings Enumerations e.g. (mon|tue|wed|thu|fri|sat|sun) ID – unique identifiers Attribute Types 472

© 2004, MacAvon Media Productions 14 #REQUIRED – attribute must be given a value in start tag #IMPLIED – attribute is optional Default value – if attribute is omitted, takes on specified value e.g. <!ATTLIST numberinstock ordered CDATA "0" > Required/Optional 472–473

© 2004, MacAvon Media Productions 14 Two-level naming system resolves potential name clashes Element or attribute names preceded by a prefix, separated from name by a colon e.g., Each prefix is associated with a URL Prefixed name is an abbreviation for combination of URL + name, URLs are always unique, so combination is unique Namespaces 473–475

© 2004, MacAvon Media Productions 14 Assign namespace URL to an attribute xmlns:prefix Usually done in start tag of the document element, so prefix is in scope throughout document e.g. N.B. The document, if any, at the namespace URL has no significance Declaring Namespaces 475

© 2004, MacAvon Media Productions 14 Assign namespace URL to attribute xmlns All names without prefixes belong to the namespace identified by the URL e.g. All HTML tags can be used without any prefix Default Namespace 476

© 2004, MacAvon Media Productions 14 No layout information at all in XML – purely structure and content Use PI to associate a stylesheet with an XML document e.g. Stylesheets and XML 478

© 2004, MacAvon Media Productions 14 display property (no a priori distinction between block and inline elements) values: block, inline, list-item, none, compact content property used with :before and :after pseudo-classes attr(X) to insert value of X attribute Attribute selectors CSS and XML 479–480

© 2004, MacAvon Media Productions 14 Both XML languages XSLT (eXtensible Stylesheet Language for Transformations) Transform structure tree of an XML document into a different tree (e.g. XML → XHTML) XML - Formatting Objects Tags that describe how a document should appear when displayed XSLT and XSL-FO 482–484

© 2004, MacAvon Media Productions 14 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 Linking in XML 484

© 2004, MacAvon Media Productions 14 Special syntax, not XML 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 XPath 484–485

© 2004, MacAvon Media Productions 14 / – root node Location paths beginning with / are absolute Element name Set of nodes of that type among the children of the context node Element name [number], e.g. book[2] Particular child node of that element type, e.g. 2nd book child Location Steps 485–486

© 2004, MacAvon Media Productions 14 axis::element name selects all elements of that type in that axis e.g. following::book – all the book nodes in the following axis name is shorthand for child::name Axes 486

© 2004, MacAvon Media Productions –487

© 2004, MacAvon Media Productions –487

© 2004, MacAvon Media Productions –487

© 2004, MacAvon Media Productions 14 Define fragment identifiers Uses XPath to identify parts of a document in terms of structure, where necessary Shorthand pointer: #id, matches element with attribute of type ID, value id (equivalent to named anchor) Scheme-based pointer: #scheme name(data) #xpointer(XPath expression) #element(/n 1 /n 2 /…) XPointer 487–489

© 2004, MacAvon Media Productions 14 Namespace containing a collection of attributes xmlns:xlink=" " Any element with XLink attribute can be treated as a linking element xlink:type determines type of link If xlink:type = X, we have an X-type link e.g. xlink:type="simple" ⇒ simple-type link XLink 489–490

© 2004, MacAvon Media Productions 14 xlink:href – locator attribute (like in HTML) xlink:show like target = "replace" – display in same window = "new" – display in new window = "embed" – display as part of document (like ) xlink:actuate – when is link followed = "onLoad" – when page loads = "onRequest" – when an event occurs (mouse click) Simple-type Links 490–491

© 2004, MacAvon Media Productions 14 Generalize simple-type links to bi-directional links and multi-links Use locator-type elements to point to resources, combine them into relationships as content of extended-type elements Add arc-type links to specify traversals Store extended-type links in linkbases Extended-type Links 491–495