XML. Markup Languages A markup language is a formal way of annotating a document or collection of digital data using embedded encoding tags to indicate.

Slides:



Advertisements
Similar presentations
CSCI N241: Fundamentals of Web Design Copyright ©2004 Department of Computer & Information Science Introducing XHTML: Module B: HTML to XHTML.
Advertisements

DOCUMENT TYPES. Digital Documents Converting documents to an electronic format will preserve those documents, but how would such a process be organized?
XML and Enterprise Computing. What is XML? Stands for “Extensible Markup Language” –similar to SGML and HTML –document “tags” are used to define content.
HTML and XHTML Controlling the Display Of Web Content.
XHTML1 Building Document Structure. XHTML2 Objectives In this chapter, you will: Learn how to create Extensible Hypertext Markup Language (XHTML) documents.
IS 373—Web Standards Todd Will
Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
A Practical Introduction to XML in Libraries Marty Kurth NYLA October 22, 2004.
Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
Tutorial 11 Creating XML Document
Introduction to XML: Yong Choi CSU Bakersfield.
Upgrading to XHTML DECO 3001 Tutorial 1 – Part 1 Presented by Ji Soo Yoon 19 February 2004 Slides adopted from
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
Introduction to XML This material is based heavily on the tutorial by the same name at
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 XML. ECA 228 Internet/Intranet Design I HTML markup language very loose standards browsers adjust for non-standard.
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
XML – Extensible Markup Language Sivakumar Kuttuva & Janusz Zalewski.
Creating a Simple Page: HTML Overview
Pemrograman Berbasis WEB XML part 2 -Aurelio Rahmadian- Sumber: w3cschools.com.
XML introduction to Ahmed I. Deeb Dr. Anwar Mousa  presenter  instructor University Of Palestine-2009.
EAD: A Technical Introduction Julie Hardesty, Metadata Analyst June 3, 2014.
Why XML ? Problems with HTML HTML design - HTML is intended for presentation of information as Web pages. - HTML contains a fixed set of markup tags. This.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
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.
XML Technologies Surekha Akula
CISC 3140 (CIS 20.2) Design & Implementation of Software Application II Instructor : M. Meyer Address: Course Page:
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 © 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.
XHTML1 Building Document Structure Chapter 2. XHTML2 Objectives In this chapter, you will: Learn how to create Extensible Hypertext Markup Language (XHTML)
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.
 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,
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 TUTORIAL Portions from w3 schools By Dr. John Abraham.
How do I use HTML and XML to present information?.
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 eXtensible Markup Language. Topics  What is XML  An XML example  Why is XML important  XML introduction  XML applications  XML support CSEB.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
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.
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.
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 Introduction. What is XML? XML stands for eXtensible Markup Language XML stands for eXtensible Markup Language XML is a markup language much like.
What it is and how it works
XML for Text Markup An introduction to XML markup.
XML Introduction. Markup Language A markup language must specify What markup is allowed What markup is required How markup is to be distinguished from.
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
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 CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
Tutorial 9 Working with XHTML. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Describe the history and theory of XHTML.
 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.
SNU OOPSLA Lab. A Tour of XML © copyright 2001 SNU OOPSLA Lab.
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.
Unit 4 Representing Web Data: XML
XML QUESTIONS AND ANSWERS
Allyson Falkner Spokane County ISD
Presentation transcript:

XML

Markup Languages A markup language is a formal way of annotating a document or collection of digital data using embedded encoding tags to indicate the structure of the document or data file, and the contents of its data elements. This markup provides a computer with information about how to process and display marked-up documents.

What is XML? XML is a grammatical system for creating languages… a meta-language Use XML to design your own markup language, consisting of meaningful tags that describe the data they contain Create a language for describing…anything

SGML Standard Generalized Markup Language, ISO (International Standards Organization) standard ISO/IEC 8879:1986, first used by the publishing industry, for defining, specifying, and creating digital documents that can be delivered, displayed, linked, and manipulated in a system-independent manner. the parent of XML an international standard for the description of marked- up electronic text a metalanguage: a means of formally describing a language XML is a subset of SGML SGML is much more complex than XML

HTML HyperText Markup Language, an SGML- derived markup language used to create documents for World Wide Web applications. HTML emphasizes design and appearance rather than the representation of document structure and data elements.

XML A simplified subset of SGML that is designed specifically for use with the World Wide Web and that provides for more sophisticated data structuring and validation than HTML. XML is widely held to be the successor to HTML as the language of the Web.

XML What is XML? –EXtensible Markup Language. XML is a set of rules for defining markup languages and describing data. Why XML? –XML is a standard means of delivering structured data via Web applications. –XML is extensible—both a blessing and a burden –Authors can define their own tags and attributes, e.g. CML Chemical markup language –You may hear someone from your IT department mention "well-formed" XML. A well-formed XML file conforms to a set of very strict rules that govern XML. If a file doesn't conform to those rules, XML stops working

XML vs. HTML HTML tells Web browsers how to display text, images, etc.— emphasis is on display Unlike HTML, XML can “take database information with it”; emphasis is on structure, relationships, and ‘meaning’ XML is a set of rules that are used to create markup languages while HTML is itself a markup language Use HTML to describe the appearance of a document and XML to describe the structure

XML vs. HTML HTML defines only the appearance of your data — it's a pure display language. XML describes the structure and meaning of your data. Using tags that describe the structure and meaning of your data makes it possible to reuse that data in any number of ways. For example, if you have a block of sales data, and each item in the block is clearly identified, you can load just the items that you need into a sales report and load other items into an accounting database. HTML is limited to a predefined set of tags that all users share. XML allows you to create any tag you need to describe your data and the structure of that data.

Classes of Documents Poetry Poem Stanza Verse Foot Caesura Monograph Title page Table of contents Chapters Sections Paragraphs Appendix Index

Types of Markup Procedural –Display: font, italic, bold, etc. Descriptive –Structural (document components) –Nominal e.g. Referential –Linking

Descriptive Markup Defines structural components of a class of documents Defines relationships between data elements Specifies frequency (repeatable, optional, mandatory) Establishes the sequence of elements Codified in a Document Type Definition (DTD) or an XML Schema User-friendly documentation in a tag library

Document Type Definitions/Schemas Class of Documents Literary texts Archival inventories Web pages Electronic commerce Catalog records Cultural objects Hypertext documents Protocol TEI EAD Dublin Core BizTalk MARC CDWA/VRA Core HTML

Separating Markup and Display Content Presentation Output MARC record ILS Software Browser

Separating Markup and Display Content Presentation Output EAD document Stylesheet file Browser, Print

Characteristics of Encoding Standards Class of documents Identifiable set of common elements Codification in a standard –MARC 21 standard –EAD DTD and Tag Library Standards maintenance process

Something to remember about XML XML does not do anything itself. It is pure information wrapped in XML tags. You must use other means to send, receive or display the data XML is used by XML technologies To create Detailed description to view in a browser PDF for print Summary entry to view in a browser

XML Concepts Document Type Definitions/Schemas –Defines document structure Elements –Informational units Attributes –Modify elements Entities –External files Style sheets –Prescribe presentation

Elements (nouns) Have start tags and end tags – Moby Dick Have formal names and tag names –Formal name = paragraph –Tag name (generic identifier) =

Elements (nouns) May contain text –PCDATA (parsable character data) Moby Dick</title May be empty – (line break) –XML syntax = (empty element syntax)

Elements (nouns) May contain other elements –Wrappers –Nesting –Example: September

XML: elements content English

Attributes (adjectives) Modify the meaning of elements – Honda Attributes of cars –Color –Year –Model Honda

XML attributes Attributes are simple name/value pairs associated with an element content English 20 Sept 2004

Entities A set of characters references as a unit –Special characters Language keyboard Character map: XML software Character entity: $141; &amp –Non-text files (images, sound files) –External data files

Style Sheets Separate file Controls presentation of data –Text format: font, size, color –Text layout: tabs, indents, line spacing, line breaks, tables Can supply default text and images

XML example OK Computer Radiohead pop 1997 Stanley Road Paul Weller pop 1995

XML must be well-formed a root element is required …..all your tags and content… closing tags are required

XML must be well-formed (2) elements must be properly nested 10 boxes 10 boxes

XML must be well-formed (3) case matters attribute values must be enclosed in quotation marks, e.g. langcode=“fre” element names must obey some basic rules, e.g. cannot start with numbers or punctuation characters, cannot contain spaces

Valid XML Valid XML: rules specify elements and attributes used and how used Valid XML provides consistency and facilitates the exchange of data Valid XML is important for displaying, processing and exchanging XML in a wider environment Must conform to a Document Type Definition (DTD) or Schema Archives: Encoded Archival Description - EAD version 1; EAD 2002

Valid XML John Rylands University Library of Manchester GB 0133 NCN Papers of Norman Nicholson cu.m; 1,201 items English Nicholson, Norman Cornthwaite, Created by the John Rylands Library archivist ………..

Document Type Definitions A Document Type Definition defines the building blocks of an XML document It specifies elements and attributes and defines how they can be used People can agree to use a common DTD for interchanging data You can include a DTD in your XML source file, or point to an external DTD

Schemas Schemas perform the same task as DTDs Schemas use XML syntax Schemas support complex data types Schemas are extensible One XML document can point to more than one schema

A simple XML document Rachel John Reminder Don't forget the concert!

HTML vs. XML (1) HTML is ONLY for display, typically in a Web browser HTML tags do not describe the content HTML cannot easily be extracted HTML: Papers of Peter Rowe XML: Papers of Peter Rowe HTML: 21 May 2004 XML: 21 May 2004

HTML vs. XML (2) XML tags are self-describing XML tags can be specified by anyone XML is user and machine readable

Why use XML? Because everyone else is! International standard, supported by the W3C XML is open, licence free and platform neutral XML is human and machine readable XML documents are text documents

More reasons to use XML Separation of content and presentation –With proprietary systems content is inextricably bound up with format XML does not determine the presentation of the data - You can use style sheets to present XML data

..and even more reasons Hierarchical structure - XML documents are hierarchical in nature – with one top-level root element, and hence XML is an excellent choice for setting out hierarchical data in an easy-to-read fashion The ability to manipulate and customise - data can be shaped and additions made as the author wishes

and for data exchange XML is the main basis for defining data exchange languages Meaningful tags facilitate extraction – data can be manipulated as required Text based - highly portable

Summary XML is simple, flexible and great for data exchange XML must be well-formed and valid DTDs and Schemas provide tags, attributes and rules EAD is a DTD for archive descriptions

A brief detour into metadata: Two ways to designate content In MARC: $a The Big heat In XML: Big heat value

In XML the name-value pair comprises an element An element has these parts: –Start tag –Element content –End tag content Goldfinches

Element rules and features Elements can hold data Boston Elements can hold other elements ad infinitum A letter to Orestes A. Brownson Hildreth, Richard, Elements must be “properly” nested

A quick look at other XML entities Attributes qualify elements Caption title. Document Type Definitions (DTDs) control the structure of XML documents XML Schemas give more control than DTDs Extensible Stylesheet Language Transformation (XSLT) stylesheets transform one XML document into another (or into HTML)

What does XML allow us to do? Structure data with a flexible and extensible set of rules Share data in a non-proprietary format, especially among “incompatible” systems Reuse data, e.g., in different presentation formats for different purposes

Namespaces A namespace identifies a specific set of elements Namespaces allow metadata terms to be unambiguously used across applications –Defines what ‘Date’ or ‘Title’ means in a specific usage, or namespace Each namespace has a unique identifier associated with it

Namespaces - Example Internet Ethics Duncan Langford Book ISBN

Namespaces - Example <d:student xmlns:s=' ' xmlns:w='urn:schemas.develop.com:workshop'> Jeff Smith Emerging Metadata Topics XNL

Purpose of Using Namespace in XML To group all the related elements and attributes from a single XML application together so that software can easily recognize them. To distinguish between elements and attributes from different vocabularies with different meanings and that happen to share the same name. xmlns:dc=" “