XML - Why: The HTML-Dilemma HTML, SGML, XML - How: Syntax, Concept, Language Elements Basics Well-formed XML-Documents (without DTD) Valid XML-Documents.

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

XML/EDI Overview West Chester Electronic Commerce Resource Center (ECRC)
History Leading to XHTML
3 November 2008CIS 340 # 1 Topics To define XML as a technology To place XML in the context of system architectures.
HTML and XHTML Controlling the Display Of Web Content.
CS 898N – Advanced World Wide Web Technologies Lecture 21: XML Chin-Chih Chang
CSE 190: Internet E-Commerce Lecture 17: XML, XSL.
XML A brief introduction ---by Yongzhu Li. XML --- a brief introduction 2 CSI668 Topics in System Architecture SUNY Albany Computer Science Department.
Creating a Well-Formed Valid Document. 2 Objectives Introducing XHTML Creating a Well-Formed Document Creating a Valid Document Creating an XHTML Document.
Introduction to XML This material is based heavily on the tutorial by the same name at
Aalborg University – Department of Production XML Extensible Markup Language Kaj A. Jørgensen Aalborg University, Department of Production XML – Extensible.
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.
XML – Extensible Markup Language Sivakumar Kuttuva & Janusz Zalewski.
XP Tutorial 9New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
Copyright © 2003 Pearson Education, Inc. Slide 3-1 Created by Cheryl M. Hughes, Harvard University Extension School — Cambridge, MA The Web Wizard’s Guide.
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.
XML eXtensible Markup Language by Darrell Payne. Experience Logicon / Sterling Federal C, C++, JavaScript/Jscript, Shell Script, Perl XML Training XML.
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.
Chapter 1 Understanding the Web Design Environment Principles of Web Design, 4 th Edition.
Week 1 Understanding the Web Design Environment. 1-2 HTML: Then and Now HTML is an application of the Standard Generalized Markup Language Intended to.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
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.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
TEXT ENCODING INITIATIVE (TEI) Inf 384C Block II, Module C.
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.
Sheet 1XML Technology in E-Commerce 2001Lecture 1 XML Technology in E-Commerce Lecture 1 WWW, HTML, CSS, XML, Meta-modeling.
 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,
1 XML - Extensible Markup Language. 2 HTML - Hypertext Markup Language n HTML has a fixed tag set. n Use these tags to describe how information is to.
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.
Presentation Topic: XML and ASP Presented by Yanzhi Zhang.
XP Tutorial 9 1 Working with XHTML. XP SGML 2 Standard Generalized Markup Language (SGML) A standard for specifying markup languages. Large, complex standard.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
CP3024 Lecture 9 XML: Extensible Markup Language.
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.
Waqas Anwar Next SlidePrevious Slide. Waqas Anwar Next SlidePrevious Slide XML XML stands for EXtensible Markup Language.
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.
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.
Sheet 1XML Technology in E-Commerce 2001Lecture 2 XML Technology in E-Commerce Lecture 2 Logical and Physical Structure, Validity, DTD, XML Schema.
An Introduction to XML Paul Donohue May 8th 2002 Hotel Senator Zürich.
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.
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.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
XML A Language Presentation. Outline 1. Introduction 2. XML 2.1 Background 2.2 Structure 2.3 Advantages 3. Related Technologies 3.1 DTD 3.2 Schemas and.
SCHOOL OF LIBRARY, ARCHIVE AND INFORMATION STUDIES Andy Dawson LIS1510 Library and Archives Automation Issues XML and extensible systems Andy Dawson School.
XP Tutorial 9New Perspectives on HTML and XHTML, Comprehensive 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
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.
Tutorial 9 Working with XHTML. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Describe the history and theory of XHTML.
CIS 228 The Internet 9/20/11 XHTML 1.0. “Quirks” Mode Today, all browsers support standards Compliant pages are displayed similarly There are multiple.
 XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,
XP 1Creating Web Pages with XML Tutorial 1 New Perspectives on XML Tutorial 1 – Creating an XML Document.
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.
SNU OOPSLA Lab. A Tour of XML © copyright 2001 SNU OOPSLA Lab.
Beyond HTML: Extensible Markup Language (XML)
Extensible Markup Language (XML) Pat Morin COMP 2405.
XML BASICS and more…. What is XML? In common:  XML is a standard, simple, self-describing way of encoding both text and data so that content can be processed.
XML QUESTIONS AND ANSWERS
CSE591: Data Mining by H. Liu
Presentation transcript:

XML - Why: The HTML-Dilemma HTML, SGML, XML - How: Syntax, Concept, Language Elements Basics Well-formed XML-Documents (without DTD) Valid XML-Documents (with DTD) Attributes, Entities, Style Sheets More concepts from the „XML family“

The HTML-Dilemma HTML - a language to markup documents Heading 1 Heading 2 paragraph...

The HTML-Dilemma HTML is...  simple...but unfortunately...  Extensibility: No semantic markup  Structure: No complex structures beyond layout  Validity: Structural weakness

SGML SGML - Rules to define markup languages +Metalanguage: Highly flexible +Architecture to process data on different media without losing the structure of the data ¬Complexity (user, programmer)

XML: The Language Concept What is XML ? Extensible Markup Language (XML) is a text-based meta- markup language which allows you to define an infinite number of markup languages based upon the standards defined by XML. Rather than providing a set of pre-defined tags, as with HTML, XML specifies the standards with which you can define your own markup languages with their own sets of tags.

XML is - as SGML - based upon the idea of structured markup of data XML: The Language Concept

Tags and attributes can be defined individually Document structure in any complexity can be described XML-documents can - but don‘t have to - contain a formal description of their grammar

XML: The Language Concept XML consists of tags content...that are nested content...and that constitute an XML- document, if some well- formedness rules are met.

Well-formed documents Every open tag must explicitly be closed Empty elements ( in HTML) in XML are written as or closed Attribute-values are to be put in quotation marks: Child markup must nest completely within parent markup, i.e. markup needs to be completely hierarchical (as SGML) No markup-character ( < or &) in text, all attributes are CDATA by default You should declare your XML version at the start:

Well-formed document „ORDER“ Mustermann cd rom drive monitor

XML Basics XML-documents are well- formed if they conform with basic syntax requirements XML provides rules for defining markup languages. There are two ways of defining these rules (i.e. the grammar of a particular markup language XML-documents can contain an explicit definition of required/allowed tags and their structure, i.e. a Document Type Definition (DTD). XML-documents that confirm with a DTD are valid

Valid document „Order“ Mustermann cd rom drive monitor

DTD of valid document „Order“ ORDER.DTD

Declaration of elements in a DTD Elements can contain other elements or character data Elements can have mixed content Elements can be defined as mandatory, optional, etc. <!ELEMENT a (b, c?, (d|e)+, f*) <!ELEMENT (address, cc*, message, signature?)

Attributes All elements can contain attributes: Attributes have to be declared similar to elements: Attributes can be optional, mandatory or „fixed“ <!ATTLIST DESCRIPTION ean CDATA #REQUIRED picture CDATA #FIXED „ status(sale | normal) „normal“>

Valid XML-Document Mustermann <DESCRIPTION ean=„ “ picture=„ status=„sale“>cd rom drive

DTD <!ATTLIST DESCRIPTIONean CDATA #REQUIRED picture CDATA #FIXED „ status(sale | normal) „normal“>

Valid XML-documents An XML-document is valid if it is well-formed and conforms with the specifications as defined in a DTD. Any well-formed XML-document can become valid if it is made compliant with a DTD. Functionally, a DTD is analogous to a relational database schema or an IDL. Applications can use the DTD to check an XML-document instance for structural validity and to create new instances of the defined document type.

Internal DTDs <!DOCTYPE ORDER [ ]> Mustermann DTDs can also be part of a document instance

Logical and physical structure of XML-documents The logical structure is determined by the sequence of tags in the document. Irrespective of the logical structure, an XML-document can be divided into any number of physical entities. Thus, it is possible to combine physically distributed XML-data into one XML-document. Entities references are used to refer to external data. References pointing to entities are written between „ & “ and „ ; “

External entity referneces <!doctype ORDER [ ]> &Head; &ItemsPC; &ItemsCD-ROM; XML-documents can be spread over different files:

XML Entities, Unicode <!DOCTYPE EXAMPLE [ ]> The new standard &xml; supports international character sets (ISO (Unicode)); the example shows different notations for number „1“: 1 (in ASCII), ١ (in Devanagari), १ (in Arabisch) and ൧ (in Malayalam).

Presentation of XML-documents XML-documents are presented using style sheets. A style sheet determines the document’s layout. Style Sheets are referred to by a processing instruction, e.g.: W3C is developing XSL, a style sheet language for XML. In addition, presentation of XML-documents in a browser, for example, is possible using CSS which is also used to display HTML.

Why 2 Style-Sheet-Languages? 1) CSS: Simple; every element is assigned a layout 2) XSL: More than CSS (Scripting, Transformation), but more complex ORDER {background-color:blue} NAME, DATE, {Display:Block; font-size:28pt; font-family:Times,serif} {color:yellow}

XML and CSS Mustermann ORDER { Display: Block; background-color: blue; float: left; padding: 15pt} NAME, DATE, {Display: Block; font-size: 28pt; font-family: Times, serif} {color:yellow} BODY {Display: Block; background-color: green; float: left; padding: 12pt} DESCRIPTION {font-size: 28pt; font-family: Times, sans-serif} +=

The XML-family Besides the specifications of XML 1.0 (recommendation since ) there are more W3C initiatives on XML. The most important related standards are: XLink (Working Draft, ) XPointer (Working Draft, ) XML Namespaces (Recommendation, ) XSL (Working Draft ) DOM (Recommendation, ) RDF (Recommendation, ) XML Schemas (Working Drafts, ) (XML-Data, DCD, SOX, DDML)

Linking in XML XML supports much more powerful linking capabilities than HTML. XLink describes uni- as well as sophisticated multi-directional links. XPointer specifies a mechanism for pointing to fragments of a target document, even without identifiers: “book.html#section2”. simple link extended link (XLink) link to element in instance (XPointer)

Namespaces in XML How can an application know which namespace is relevant if different DTDs are in use (i.e. for own documents, data exchange or search engines)? In order to prevent element and attribute names from colliding namespaces have been developed. Example: „Title“ (heading, evidence of ownership) <EXAMPLE xmlns:h=" xmlns:b=" xmlns:p=" My XML text XML, Java and the future of the Web realty