CP3024 Lecture 9 XML: Extensible Markup Language.

Slides:



Advertisements
Similar presentations
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.
Advertisements

1 © Netskills Quality Internet Training, University of Newcastle XML.
1 CP3024 Lecture 9 XML revisited, XSL, XSLT, XPath, XSL Formatting Objects.
Content Types: Markup and Multimedia. Introduction Markup languages use extra textual syntax to encode: –Formatting / display information –Structure information.
3 November 2008CIS 340 # 1 Topics To define XML as a technology To place XML in the context of system architectures.
Introduction to XML: DTD
Introduction to XLink Transparency No. 1 XML Information Set W3C Recommendation 24 October 2001 (1stEdition) 4 February 2004 (2ndEdition) Cheng-Chia Chen.
XML A brief introduction ---by Yongzhu Li. XML --- a brief introduction 2 CSI668 Topics in System Architecture SUNY Albany Computer Science Department.
1 XML and QUERY Shilpi Ahuja CSE Data Mining 4 th April 2002.
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
Tutorial 11 Creating XML Document
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.
XML – Extensible Markup Language Sivakumar Kuttuva & Janusz Zalewski.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
XML and XSL Institutional Web Management 2001: Organising Chaos.
Scientific Markup Languages Birds of a Feather A 10-Minute Introduction to XML Timothy W. Cole Mathematics Librarian & Professor of.
XML eXtensible Markup Language by Darrell Payne. Experience Logicon / Sterling Federal C, C++, JavaScript/Jscript, Shell Script, Perl XML Training XML.
XML and friends Part 1 - XML and DTD ELAG 2001 workshop 8 Jan Erik Kofoed © BIBSYS Library Automation.
XML CPSC 315 – Programming Studio Fall 2008 Project 3, Lecture 1.
XML The Overview. Three Key Questions What is XML? What Problems does it solve? Where and how is it used?
School of Computing and Management Sciences © Sheffield Hallam University To understand the Oracle XML notes you need to have an understanding of all these.
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.
Introduction to XML Eugenia Fernandez IUPUI. What is XML? From the World Wide Web Consortium (W3C) The Extensible Markup Language (XML) is the universal.
E0262 – MIS – Multimedia Storage Techniques XML (Extensible Markup Language)  XML is a markup language for creating documents containing structured information.
1 © Netskills Quality Internet Training, University of Newcastle Introducing XML © Netskills, Quality Internet Training University.
Introduction to XML. XML - Connectivity is Key Need for customized page layout – e.g. filter to display only recent data Downloadable product comparisons.
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
XML - Why: The HTML-Dilemma HTML, SGML, XML - How: Syntax, Concept, Language Elements Basics Well-formed XML-Documents (without DTD) Valid XML-Documents.
 XML is designed to describe data and to focus on what data is. HTML is designed to display data and to focus on how data looks.  XML is created to structure,
XML About XML Things to be known Related Technologies XML DOC Structure Exploring XML.
Tutorial 1: XML Creating an XML Document. 2 Introducing XML XML stands for Extensible Markup Language. A markup language specifies the structure and content.
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.
E0262 – MIS – Multimedia Storage Techniques XML (Extensible Markup Language  XML is a markup language for creating documents containing structured information.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
XML Extensible Markup Language Aleksandar Bogdanovski Programing Enviroment LABoratory
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation An Introduction to XML.
Introduction to XML This presentation covers introductory features of XML. What XML is and what it is not? What does it do? Put different related technologies.
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.
An Introduction to XML Sandeep Bhattaram
XML & varieties, e.g. VoiceXML By: Shawn Ramdass, Saji Abraham & Billy Santamorena.
XML D Nathan Intro and formalism. Roots  A computer is not a typewriter electronic texts are more than sequences of characters they have structure, and.
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.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
Web Technologies Lecture 4 XML and XHTML. XML Extensible Markup Language Set of rules for encoding a document in a format readable – By humans, and –
SCHOOL OF LIBRARY, ARCHIVE AND INFORMATION STUDIES Andy Dawson LIS1510 Library and Archives Automation Issues XML and extensible systems Andy Dawson School.
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
Games: XML Presented by: Idham bin Mat Desa Mohd Sharizal bin Hamzah Mohd Radzuan bin Mohd Shaari Shukor bin Nordin.
XML Technology. Emerging Importance of XML –HTML-tagging is display oriented. –XML-based content tagging has important uses: data mining role-oriented.
XML Validation. a simple element containing text attribute; attributes provide additional information about an element and consist of a name value pair;
Introduction to Informatics - Fall 02 I.What is XML? XML and HTML Where does it fit in with other markup languages? II. How does it work? Your own private.
XML The Overview. Three Key Questions What is XML? What Problems does it solve? Where and how is it used?
C Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Introduction to XML Standards.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 14 This presentation © 2004, MacAvon Media Productions XML.
XP 1Creating Web Pages with XML Tutorial 1 New Perspectives on XML Tutorial 1 – Creating an XML Document.
Extensible Markup Language (XML) Pat Morin COMP 2405.
Unit 4 Representing Web Data: XML
Session I - Introduction
Session I - Introduction
Chapter 7 Representing Web Data: XML
Creating an XML Document
CSE591: Data Mining by H. Liu
Allyson Falkner Spokane County ISD
Presentation transcript:

CP3024 Lecture 9 XML: Extensible Markup Language

What is a markup language?  Textual (i.e. person readable) language where significant elements are indicated by markers – XML  Examples are RTF, HTML, VRML, TEX etc.  Easy to process and can be manipulated by a variety of application programs

What does the Web use?  HTML –Hypertext Markup Language  Defined as the original Web language  Based on SGML (see later)  Suited for hypertext, multimedia, small simple documents  Currently at version 4.01 (the last?)

Why change? - 1  Change in Web usage –no longer a mechanism for exchanging scientific papers –presentational aspects are now seen as of greater importance –extracting the meaning of a document using a program will be a new growth area  HTML can't grow much more!

Why change? - 2  Extensibility –HTML does not allow users to specify their own tags  Structure –HTML cannot represent database schemas or object- oriented hierarchies  Validation –HTML does not allow applications to check that the structure of data is valid

What is SGML?  Standard Generalised Markup Language  ISO 8879  Can define any document format of any complexity  Enables, extensibility, structure and validation  Too many optional features for the Web

What is XML?  Simplified subset of SGML designed for Web applications  Differs from HTML –Can define new tags –Structures may be nested to any level of complexity –XML documents may define a grammar which enables structural validation of that document

Where has XML come from?  Emanates from the Word Wide Web consortium (W3C)  Developed by XML working group chaired by Jon Bosak (Sun Microsystems)  Group includes representatives from Microsoft, Netscape, HP, Adobe, etc.  Last bastion against proprietary markup and Web fragmentation

Design Goals for XML - 1  XML shall be straightforwardly usable over the Internet  XML shall support a wide variety of applications  XML shall be compatible with SGML  It shall be easy to write programs which process XML documents  The number of optional features is to be kept to the absolute minimum

Design Goals for XML - 2  XML documents should be human-legible  The XML design should be prepared quickly  The design of XML shall be formal and concise  XML documents shall be easy to create  Terseness in XML markup is of minimum importance

The XML View of a Document Taken from an example given by Jon Bosak

Structured Publishing Taken from an example given by Jon Bosak

XML Example Say Bye Bye, Sweep Bye Bye, Sweep

XML Markup  Elements  Entity references  Comments  Processing Instructions  Marked sections  Document type declarations (DTD)

Elements  Commonest form of markup  Delimited by angle brackets ( )  May be empty but normally consist of start tag and end tag  Start tag may contain attributes –

Entity References  In XML (and HTML) certain characters are reserved e.g. <  Entity references are used to insert these into documents  Entity references begin with an ampersand ( & ) and end with a semicolon ( ; )  You can define your own entities  Can be used to insert Unicode characters

Comments  Begin with <!--  End with -->  Can contain any data except --  XML processors are not required to pass comments to an application

Processing Instructions (PIs)  Provide information to an application  XML processors required to pass them on  Have the form  The name (PI target) identifies the PI  Data is optional and meaningful to an application that recognises the target

Marked Sections  Parsers ignore everything in CDATA sections <![CDATA[ if p ]]>  Only character string not allowed is ]]>  Data is passed on to the application

Document Type Declarations  Optional in XML (not in SGML)  Specify constraints on the sequence and nesting of tags  Communicates meta-information to the parser about content  Sequence and nesting of tags, attribute values, external files, entities

Kinds of Declaration  Element type declarations  Attribute list declarations  Entity declarations  Notation declarations

Element Type Declaration  A sweepjoke consists of a harry element followed by a sweep element and a laughter element  The harry element may be repeated (+) –+ indicates one or more  The laughter element is optional (?)

Sweepjoke Declaration  PCDATA indicates parseable character data  | indicates 'or'  * indicates 'zero or more'

Attribute List Declaration  Identifies –which elements may have attributes –what attributes they may have –what values are permitted for an attribute –what value is the default <!ATTLIST sweepjoke name ID #REQUIRED label CDATA #IMPLIED status ( funny | notfunny ) 'funny'>

Entity Declarations  Allow a name to be associated with some other content  Internal entities associate a name with a string of literal text (e.g. < )  External entities associate a name with the content of another file  Parameter entities enable text replacement within the DTD

Adding a DTD to an XML File  Inline  External –

Links in XML  HTML anchors are a very limited form of hypertext  XML introduces –XPointers –XLinks  These standards are outside the scope of the XML standard

Presentation Issues  Use of a stylesheet is implicit  Possible standards: –DSSSL Document Style and Semantics Specification Language (ISO 10179) –CSS Cascading Stylesheet Specification –XSL Extensible Style Language (uses XML syntax)

XSL  XSL is an XML sylesheet language –XSLT is a language for transforming XML documents –XSL formatting objects specify formatting semantics  A set of rules to transform a document  XML can be transformed into HTML

XML Application Areas  Mediation between heterogeneous databases on the Web  Client centric web applications  Applications requiring different views of the same data  Information discovery tailored to the needs of differing individuals

Languages based on XML  MathML  SMIL  RDF  XHTML  CML

RDF  Resource Description Framework  Integrates a variety of web-based metadata activities  Provides interoperability between applications that exchange metadata  Allows machine readable description of Web resources

RDF Example <?xml:namespace ns = " prefix ="RDF" ?> <?xml:namespace ns = " prefix = "DC" ?> <RDF:Description RDF: HREF = " John Smith

XHTML  New Web languages are defined using XML  HTML 4.0 cannot be defined using XML  XHTML is XML compliant HTML

Major Changes  Documents must be well-formed  Elements and attributes must have lower case names  End tags required in non-empty elements  Attribute values must be in quotes  Empty tags must be terminated  Scripts will be processed by XHTML

XHTML Compatibility  Current browsers unlikely to understand all XHTML  E.g. may cause an error  Compatibility guidelines defined in XHTML standard  See Appendix C

Summary  XML significantly expands what is possible on the Web  XML preserves the basic Web ideas  Using XML is an order of magnitude more difficult than writing HTML  Software is out there and more will soon follow  The opportunities are endless!