An Introduction to XML: The eXtensible Markup Language Manitoba Library Associations Conference 2000 Ian Graham, Session T4, 11 May, 2000
An Introduction to XML: The eXtensible Markup Language Ian GRAHAM Centre for Academic Technology, Information Commons, University of Toronto Tel: (416) Talk:
Overview zWeb history and the birth of HTML zHTML is not enough -- why? zXML for universal data zExamples of XML in action zProfound conclusions...
The Birth of the Web zThe HyperText Markup Language (HTML) yA simple language for distributing text-based information zCombined with other Web technologies to yield…. yA distributed information Web
Four Main Components zURL: For addressing things zHTTP: For transporting data zCGI: For adding functionality zHTML: For encoding text information
HTML HTTP Shoutcast NNTP FTP URLs CGI Databases & other software Web Server
HTML zA simple, general-purpose language zSimple hypermedia ( … ) zOriginal concept -- yCollaborative authoring yMerging of roles of authoring/viewing
HTML Evolution zStarted with very few tags … zsimple requirements (only need know a little bit about the tags, and then just muddle through) zLanguage evolved -- more tags: yforms, images, tables, frames, fonts, … ydriven by functional and marketing demands
HTML Problems (1) zMany wanted personalized tags zWant to put other data into HTML ymathematics, database entries, literary text, poems, purchase orders, graphic layouts …. yDifferent conceptions for the language zHTML just isn’t designed for that!
HTML Problems (2) zSoftware processing yServer management of data (library Web site, any large site) zBut -- HTML is so ill- formed, this is hard! HTML chunk HTML chunk HTML chunk HTML chunk HTML Web server engine
HTML Problems (3) zSoftware processing yClient data processing (machine--machine communication) zBut -- HTML is so ill- formed, this is hard! HTML data Web software Into a database, or other tool (from somewhere on the Web...)
Idea: Back to Basics zHTML is defined using SGML yStandard Generalized Markup Language yA meta-language for defining languages yI.e. -- can define your own tags zComplex, sophisticated, powerful zIdea: Use SGML
Languages based on SGML SGML HTMLTEIDocBook...
SGML Problems zToo complicated zRules too strict yCan’t distribute ‘muddle-able’, loosely formatted text (like HTML) zNot good in a distributed environment zCan’t mix different data together yCan’t add arbitrary tags
Idea (2): “Webified” SGML zNew eXtensible Markup Language: XML zCan use XML to define new languages zDistributes easily on the Web zCan mix different types of data together ycan easily add new tags, and tell a browser what to do with them (more or less....)
Basic XML Rules zTags written as in HTML, but... zTechnical details yTag names are case-sensitive yAlways need end tags ySpecial empty-element tags (that don’t have end tags) yAlways quote attribute values
Like this example ….. Title of text XHTML Document Heading of Page ….. And here is another paragraph, this one containing an inline image, and a line break. XML stuff
Special XML Things z ySays that this is an XML document z ySays that the meaning of the tags inside (and including) the html element are defined as belonging in the same “space” of names. xmlns XML namespace
Evolution of XML zMany XML-defined languages, optimised for different roles yMathML -- for mathematics ySMIL -- for synchronised multimedia yRDF -- for describing “things” yXUL -- for describing the Nav6 user interface ySpeechML -- for synthesised voices
MathML zDesigned to express layout of maths zAlso can express semantics zCut & paste into Maple, Mathematica zpossible support in Navigator 6 z x 2 + 4x + 4 =0 x &invisibletimes; x + 4 = 0
SMIL zSynchronised Multimedia Integration Language zIntegration of multimedia with text, audio, video zSupport in RealPlayer G2
SMIL Example <region id="AnimChannel1" title="AnimChannel1" left="0" top="0" height="265" width="280" fit="hidden"/> <animation src="otscompfin.swf" id="Animation" region="AnimChannel1" title="Animation" fill="freeze"/>
XHTML: NextGen HTML Title of text XHTML Document Heading of Page here is a paragraph of text. I will include inside this paragraph a bunch of wonky text so that it looks fancy. Here is another paragraph with inline emphasized text, and absolutely no sense of humor. And another paragraph, this one with an <img src="image.gif" alt="waste of time" /> image, and a line break.
XHTML zJust like HTML, but based on XML rules zWill support integration of different data into a single document y(Doesn’t quite work that way now, unfortunately)
XHTML and other Data Title of XHTML Document Heading of Page … MathML markup … more html stuff goes here … SMIL markup …
Displaying XML zMore complicated than HTML yXML represents data only, not how it looks yNeed extra instructions (a “style sheet” document) to define how things should look
What Browsers Do Now? zNavigator 4, Internet Explorer 4 yUggh…… (can’t handle XML at all) zInternet Explorer 5 -- shows a tree of elements zMozilla/Netscape 6 -- ignores the tags... or so it seems (see examples)
Other Use: Data Abstraction zXML as a universal format for data interchange yMachines exchange data as XML-format messages yEliminates proprietary data formats yLots of XML processing software available
XML Messaging: Business Factory Supplier Place order Response
XML Messaging: Database Database Other DB Request/send data
Example Message Gold sprockel grommets, with matching hamster 12 …. Order something else …..
Other Examples zXUL: XML User Interface Language yHow Navigator 5 configures its interface yDefines structure and software integration ( zRDF: Resource Description Framework yFor describing things yUsed by Netscape Open Catalog project to define Web accessible resources (
The XML Family Tree SGML XML HTMLTEI XHTML SMIL MathML SpeechML RDF XUL
XML Summary zan integration tool for mixing different types of data za universal format for exchanging data between machines za framework for distributing information on the Web
An Introduction to XML: The eXtensible Markup Language Ian GRAHAM Centre for Academic Technology, Information Commons, University of Toronto Tel: (416) Talk: