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.

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

CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
XML and Enterprise Computing. What is XML? Stands for “Extensible Markup Language” –similar to SGML and HTML –document “tags” are used to define content.
XML: Managing Data Exchange Stylesheets. Lesson Contents CSS The basic XSL file XSL transforms Templates Sort Numbering Parameters and Variables Datatypes.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
History Leading to XHTML
XHTML 16-Apr-17.
CS 898N – Advanced World Wide Web Technologies Lecture 21: XML Chin-Chih Chang
CSE 190: Internet E-Commerce Lecture 17: XML, XSL.
17-Jun-15 XHTML 2 What is XHTML? XHTML stands for Extensible Hypertext Markup Language XHTML is aimed to replace HTML.
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.
XML Introduction What is XML –XML is the eXtensible Markup Language –Became a W3C Recommendation in 1998 –Tag-based syntax, like HTML –You get to make.
CS 898N – Advanced World Wide Web Technologies Lecture 22: Applying XML Chin-Chih Chang
XML(EXtensible Markup Language). XML XML stands for EXtensible Markup Language. XML is a markup language much like HTML. XML was designed to describe.
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.
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.
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
XML – Extensible Markup Language Sivakumar Kuttuva & Janusz Zalewski.
Creating a Basic Web Page
Working with XHTML Creating a Well-Formed Valid Document.
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.
XML and XSL Institutional Web Management 2001: Organising Chaos.
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.
An Introduction to XML Presented by Scott Nemec at the UniForum Chicago meeting on 7/25/2006.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
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.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
XML - Why: The HTML-Dilemma HTML, SGML, XML - How: Syntax, Concept, Language Elements Basics Well-formed XML-Documents (without DTD) Valid XML-Documents.
Sheet 1XML Technology in E-Commerce 2001Lecture 7 XML Technology in E-Commerce Lecture 7 XSL Formatting Objects, Java Data Binding.
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.
Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL.
Session IV Chapter 9 – XML Schemas
Chapter 27 The World Wide Web and XML. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-2 Topics in this Chapter The Web and the Internet.
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.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter X IXXXXXXXXXX XXXXXX.
COP 3813 Intro to Internet Computing Prof. Roy Levow Lecture 3.
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.
WEB BASED DATA TRANSFORMATION USING XML, JAVA Group members: Darius Balarashti & Matt Smith.
Waqas Anwar Next SlidePrevious Slide. Waqas Anwar Next SlidePrevious Slide XML XML stands for EXtensible Markup Language.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
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.
Chapter 27 The World Wide Web and XML. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-2 Topics in this Chapter The Web and the Internet.
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.
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.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
Introduction to CSS. Why CSS? CSS Provides Efficiency in Design and Updates CSS relatively easy to use Can give you more flexibility and control Faster.
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.
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 –
When we create.rtf document apart from saving the actual info the tool saves additional info like start of a paragraph, bold, size of the font.. Etc. This.
Unit 3 — Advanced Internet Technologies Lesson 11 — Introduction to XSL.
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.
C Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Introduction to XML Standards.
Rendering XML Documents ©NIITeXtensible Markup Language/Lesson 5/Slide 1 of 46 Objectives In this session, you will learn to: * Define rendering * Identify.
XML Schemas Dr. Awad Khalil Computer Science Department AUC.
Java XML IS
XML QUESTIONS AND ANSWERS
Presentation transcript:

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 be presented. n e.g. My Header n Example - next slide

3 My HTML Table My HTML Table name address Jessica Peter Alen

4 HTML Example Viewed in Browser

5 HTML Example - Advantages n It's fairly readable. n The HTML can be displayed by just about any HTML browser, n HOWEVER -- The meaning of the various pieces of data in the document is lost.

6 HTML: Not Suitable for Powerful Information Systems n HTML isn't extensible n HTML is very display-centric n HTML isn't usually directly reusable n HTML only provides one 'view' of data n HTML has little or no semantic structure How do we get a language that's roughly as easy to use as HTML but has none of these disadvantages?

7 XML - Extensible Markup Language n XML, unlike HTML, is really a meta-language for describing markup languages. That is, XML provides a facility to define tags and the structural relationships between these tags. n User-defined tags n Defines "what" is in the data instead of how the data to be presented. n Why is XML useful? –Neutral Source of data (text format, structured) –Easy data format transformation

8 XML and E-Commerce n Has the potential for transferring data between enterprises with different computer and DB systems. n Fundamental to e-commerce. AB Conversion XML

9 XML Notation n Meaning of data is clearly stated n No display information n Data in tags:

10 XML Example Jessica Peter

11 Creating XML n Can use text editor n Save file as *.xml n Can view in browser or use the data

12 XML Document must be Well-Formed n No unclosed tags n Every start tag must have a corresponding end tag. n No overlapping tags Let's call the whole thing off n Attribute values must be enclosed in quotes. n Parsers can check for this. Can also have parsers that validate that the structure and number of tags make sense.

13 XML n Straightforward concept. n Can be used: –View data in a browser Can alter appearance with Cascading Style Sheets (CSS) or with Extensible Stylesheet Language (XSL) –Manipulate data –Placed in an application e.g. database, spreadsheet

14 Cascading Style Sheets n Have file containing formatting information (can also include in HTML file). n Example (see next page for details): Mylabel_1 {display: block;} Mylabel_2 {display: block;} Mylabel_3 {display: block;} Mylabel_4 {display: block;} Save as a file named "mycssadv.css" in the same directory of the xml file Add this line to the XML file below the statement:

15 class{display: block; border: 2px solid black; padding: 1em; background-color: #888833; color: #FFFFDD; font-family: Times, serif; font-style: italic; text-align: center; } student{display: block; border: 2px solid black; padding: 1em; background-color: #008833; color: #FFFFFF; font-family: Times, serif; font-style: italic; text-align: center; } name{ display: block; border: 0px solid black; padding: 1em; background-color: #008833; color: #FFDDAA; font-family: Times, serif; font-style: italic; text-align: center; } {display: block;}

16 Viewing XML with Example CSS

17 CSS - Detailed Information

18 CSS n Cascading style sheets n styles (like fonts, colors, and so on) for one markup element "cascade" down, and apply to all of the element's contents. n Can be a separate file. n Limited to “styling” a file.

19 XSL (Extensible Stylesheet Language) XSL can: n Specify display characteristics n Convert XML through querying, sorting and filtering

20 XML and XSL XMLXSL BROWSER

21 Example XSL file (using an HTML template) Name Address

22 View Results

23 Advanced Features: Sorting with an XSL file n Modify the xsl file:

24 XML and XSL XMLXSL BROWSER

25 XSL: Extended Style Language n Can style a file n Can also restructure a file n See example n Builds an html page from XML code n XSL's design also includes embedded scripting (JavaScript) - limited implementation of this

26 Modeling information structure in XML n XML forms a structure. n The Document Object Model (DOM) Level 1 Recommendation describes a set of language-neutral interfaces capable of representing any well-formed XML or HTML document.

27 DOM n Use of DOM allows program or script to use the XML or HTML n Dynamic HTML is an example n The DOM opens the door to using XML as the lingua franca of data interchange on the Internet, and even within applications.

28 SAX n The easiest way to process an XML file in Java is by using the Simple API for XML, or SAX. n SAX is a simple Java interface that many Java parsers can use. n A SAX parser is a class that implements the interface org.xml.sax.Parser n This parser "walks" the tree of document nodes in an XML file, calling the methods of user-defined handler classes.

29 Using XML AB Conversion/ Program Conversion/ Program XML Can present data differently Can add to database Can have program manipulate data

30

31 Further XML Information

32 Document Type Definition n While a well-formed document is well-formed because it follows rules defined by the XML spec, a valid document is valid because it matches its document type definition (DTD). n The DTD is the grammar for a markup language, defined by the designer of the markup language. n The DTD specifies: –what elements may exist, –what attributes the elements may have, –what elements may or must be found inside other elements, and in what order.

33 DTD n The DTD defines the document type. n DTDs currently are being written for an enormous number of different problem domains, and each DTD defines a new markup language. n Determining a DTD is an essential step in using XML for e-commerce

34 See readings for explanation <!ATTLIST Item optional CDATA "0" isVegetarian CDATA "true">

35 DTD n Parser can check if XML code is following DTD. n A DTD is associated with an XML document by way of a document type declaration, which appears at the top the XML file (after the line). n For example:

36 XML Schema n defines elements that can appear in a document n defines attributes that can appear in a document n defines which elements are child elements n defines the order of child elements n defines the number of child elements n defines whether an element is empty or can include text n defines data types for elements and attributes n defines default and fixed values for elements and attributes From

37 XML Schemas are the Successors of DTDs It is thought that very soon XML Schemas will be used in most Web applications as a replacement for DTDs. Here are some reasons: n XML Schemas are extensible to future additions n XML Schemas are richer and more useful than DTDs n XML Schemas are written in XML n XML Schemas support data types n XML Schemas support namespaces From

38 XML Schema has Support for Data Types One of the greatest strengths of XML Schemas is the support for data types. With the support for data types: n It is easier to describe permissible document content n It is easier to validate the correctness of data n It is easier to work with data from a database n It is easier to define data facets (restrictions on data) n It is easier to define data patterns (data formats) n It is easier to convert data between different data types From

39 XML Schemas Secure Data Communication n When data is sent from a sender to a receiver it is essential that both parts have the same "expectations" about the content. n With XML Schemas, the sender can describe the data in a way that the receiver will understand. n A date like this: " " will, in some countries, be interpreted as 3. November and in other countries as 11. March, but an XML element with a data type like this: n n ensures a mutual understanding of the content because the XML data type date requires the format YYYY-MM-DD. From

40 Schemas and DTD n Short term DTDs have advantages: – Widespread tools support. All SGML tools and many XML tools can process DTDs. –Widespread deployment. A large number of document types are already defined using DTDs: HTML, XHTML, DocBook, TEI, J2008, CALS, etc. – Widespread expertise and many years of practical application.

41 Schemas and DTDs n DTDs: – They are written in a different (non-XML) syntax. – They have no support for namespaces. – They only offer extremely limited datatyping. No facility for describing numbers, dates, currency values, and so forth. Furthermore, DTDs have no ability to express the datatype of character data in elements. –They have a complex and fragile extension mechanism based on little more than string substitution.

42 Benefits of Representing Information in XML n XML is at least as readable as HTML and probably more so. n The tags don't have anything to do with how the document is displayed. n Separation of content and presentation is a key concept inherited from SGML. n XML is more versatile than HTML n A lot of the programming is already done for you –If you write a DTD and use a validating parser, much of the error checking for the validity of your input is done by the parser. There's no need to write the parser yourself, since there are so many high-quality parsers available for free.