Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to XML eXtensible Markup Language

Similar presentations


Presentation on theme: "Introduction to XML eXtensible Markup Language"— Presentation transcript:

1 Introduction to XML eXtensible Markup Language
by Howard Strauss Manager of Advanced Applications Princeton University Updated 9/15/98

2 Seminar Guide Why XML? History - SGML to XML How XML Works XML Tools
How XML changes the web URL at webware.princeton.edu/howard/slides/xml

3 HTML describes what a document looks like
HTML describes what a document looks like. XML describes what a document means.

4 HTML Example <h1>Car for Sale</h1> <p align=center> Chevy Bel Air</p> <br><i>mint</i> condition <br>only 55,000 miles <br>Blue<br>4 door <br>$28,000

5 XML Example <sale-item> <head>Car</head> <type>1957 Chevy Bel Air</type> <cond>mint</cond> <miles> 55,000</miles> <color>Blue</color> <drs>4</drs> <price>$28,000</price> </sale-item>

6 A Brief History of XML SGML HTML X M L

7 SGML Standard Generalized Markup Language
Developed by Goldfarb, Mosher, and Lorie (GML) at IBM in 1969 Initially created for legal documents

8 SGML Basics A common document representation
Specific to a class of documents Each document type (DT) will have a rule set called a DTD - Document Type Definition

9 HTML Hypertext Markup Language
Developed by Tim Berners-Lee and Anders Berglund at CERN in 1989 Based loosely on SGML CSS (Cascading Style Sheets) added later - HTML specific

10 What’s Wrong With HTML? A formatting language, not an abstraction of a document’s meaning. Not extensible - limited tag set CSS not powerful enough

11 What’s Wrong With HTML? Only 1 DTD (Doc Type Definition)
DTD is ignored anyway by all popular browsers all popular browsers add proprietary features to HTML HTML errors are ignored

12 What’s Wrong With WYSIWYG?
Often it is WYSIAYG - what you see is ALL you get. No meta-information. No meaning - just formatting. Even if more renditions are possible, you see only one.

13 XML Developed by World Wide Web Consortium
Includes XSL - eXtensible Style Language (follow on to CSS) CSS still often used with XML Includes XLink for more powerful hyperlinks. Still just a spec.

14 XSL vs CSS XSL is a real programming language
CSS is just a simple formatting specification

15 How XML Works

16 XML Renditions Print Web Text Style sheets XSL XSL XSL Abstraction XML

17 XML with XML Browsers HTML, XML XML Browser Standard Web Server HTTP

18 XML Middleware Business rules Rendition Database Client Middleware
XML Server HTML XML Browser Server HTML HTTP Client Middleware Server

19 XML Document Structure
An XML document is text (data) plus the XML markup. Always in UNICODE. A doc consists of elements - usually in a hierarchical structure. An element is data (including null data) surrounded by start and end tags.

20 XML Document Structure
Start and end tags are like HTML tags - <my-tag> data </my-tag> End tags are required! Tags may have attributes - <car style=“4DR” color=“blue”> Tags do not have names. Elements have an element type name which must appear in a tag.

21 XML Tags Convey the meaning of a document.
Convey no formatting information. Assume different formats depending upon the style sheet used to produce a rendition of the XML document.

22 XML Document Structure - Entities
An entity is a named piece of an XML doc - from 1 char to the whole doc An external entity can be referenced in many places in which it is logically inserted - e.g., a captioned picture of a tiger, a repeated formatted heading, etc.

23 Entities A data entity has no XML tags
Entities may be calculated or created on the fly

24 Document Type Definitions DTDs
DTDs define: All element types All attributes All entities All rules An XML doc refers to a DTD in XML <!DOCTYPE Classified-Ads “

25 DTD Rules Says what’s allowed (e.g., <car> can only have attributes style, color, price, displacement) Apply to elements in context (e.g., rule may apply only to <name> elements that are children of <address> elements or to elements with certain attributes)

26 An XML Document Should be
Well Formed Valid

27 Well Formed Obey all XML rules
If an XML syntax error is found an XML parser will quit and declare the document not well-formed. HTML parsers just plow on! All XML documents MUST be well formed.

28 Valid Conforms to its declared DTD
A DTD declaration is not required! - Any elements with any attributes in any order are ok. Only XML doc with DTDs can be said to be valid An XML doc without a DTD is neither valid nor invalid - but must be well-formed

29 XML Tools

30 XMetaL - An XML Editor By SoftQuad
Accepts HTML and some word processing formats Not WYSIWYG, but some gory details of XML are hidden and managed for you.

31 DynaTag - WP to XML Helps you convert a word processing document to XML - not an easy task. Assists in rescuing (separating) data from meaning. A bold centered line of text might be a title

32 XML Styler Freeware from ArborText Inc. Builds XSL style sheets.
XSL defines rules for all XML elements in a DTD. Rules may apply to elements in context and/or be dependent upon element attributes.

33 A Growing List of XML Tools
Astoria Content Manager - by Chrystal Software POET Content Manager - freeware See The SGML/XML Web Page at See The Whirlwind Guide to SGML & XML Tools and Vendors at

34 XML Is A Standard For Web Document Representation and Exchange
DB XML XML XSL HTML Any WP or App Any WP or App XML

35 XML and Databases A schema is a DBD (database definition) for a database. A DTD is like a schema for an XML or SGML document. XML elements map readily into relational or hierarchical databases and vice versa. XML docs can easily be stored in a DB.

36 How XML Changes The Web - Basic Stuff
All browsers follow the same standards - no more differences in HTML Docs with XML errors are not displayed - not true with HTML One XML document has many renditions (e.g., printer, web, faculty, students, etc.) XML is a standard document interchange format.

37 How XML Changes The Web - Advanced Stuff
XML includes the meaning of a document. With scripts, ASPs, etc. users can interact with the meaning of a document. Display all the red 1958 Corvettes for sale Review memos to D. Rundle received on Fridays in September Suggest a restaurant I’d like (a database has that info) in Boston.

38 XML and Future Browsers
XML object model in IE 4.0. Enhanced in IE 5.0. Not an XML parser, but XML objects accessible via ASPs. Netscape Communicator 5.0 will include “Expat” an XML parser. RDF based site maps to be in NS 5.0. RDF - Resource Description Format - an XML DTD for meta data - describes groups of docs and doc attributes.

39 Enterprise Use of XML Using XML for data exchange in future products
PeopleSoft Inc., Oracle Inc., SAP, ... PeopleSoft’s People Tools will use XML for data exchange between apps Science Application International using XML for EDI - electronic data interchange

40 Enterprise Use of XML DTDs
Microsoft’s CDF - Channel Definition Format - is an XML DTD used for web push channels. MathML - for equations and math CML - Chemical Markup Language - for 2D and 3D molecular information BSML - Bioinformatic Sequence Markup Language - for DNA, RNA sequences

41 For More Information Check your local bookstore
The XML Handbook Goldfarb and Prescod Designing XML Internet Applications - Leventhal, Lewis, Fuchs


Download ppt "Introduction to XML eXtensible Markup Language"

Similar presentations


Ads by Google