Hands-on Introduction to XML

 

Over­view

The Hands-on Intro­duc­tion to XML is designed to intro­duce you to the many and var­ied aspects of XML design, pro­cessing and deliv­ery through prac­tical, hands-on classes where you will cre­ate your own XML doc­u­ments. You will learn how to cre­ate data struc­tures using an XML editor, cre­ate an XML schema model and parse/validate the doc­u­ment struc­ture. You will also have the oppor­tun­ity to gain an under­stand­ing of the latest XML tools and tech­no­lo­gies in the mar­ket­place, so that you can develop and imple­ment your own XML solu­tions. Details of this course may change; this over­view gives you an idea of what’s planned. The final ver­sion may dif­fer, but will be broadly of the same over­all scope and tech­nical detail. The three day course is based around the ‘real life’ scen­ario of Erasmus Swift, a new age philo­sopher who decides to build a web site using XML tech­no­logy. It is designed to be prac­tical, inform­at­ive and fun! Included in the course is a prac­tical work­shop day where you can con­tinue with the class-based exer­cises or ask our experts about your own XML applic­a­tions, with full hands-on support.

Learn­ing Objectives

After study­ing the Hands-on Intro­duc­tion, begin­ners will know enough about XML to enjoy the more advanced courses at the Sum­mer School. You will understand:
  • How con­tent is marked up in XML
  • Val­id­a­tion using XML schemas
  • Trans­form­a­tion with XSLT
  • How to use XML tools for edit­ing and transformation
  • How stand­ard Office applic­a­tions can use XML
  • The cap­ab­il­it­ies of nat­ive XML and rela­tional databases
  • Search with XPath and XQuery
  • Pagin­ated out­put with XSL-FO
  • Ser­vice Ori­ented Archi­tec­tures (web services)

Who should attend

The course is suit­able for new­comers to XML or any­one want­ing to gain a more prac­tical grasp of the fun­da­mental con­cepts of the XML fam­ily of stand­ards. It is suit­able for those who will be work­ing ‘hands-on’ with XML tech­no­logy in the future, but also for man­agers, design­ers and strategists who need to gain an appre­ci­ation of how XML works, and what it can be used to achieve. To tackle the exer­cises you need to be com­puter lit­er­ate and able to use Win­dows and basic office applic­a­tions (word pro­cessor, spread­sheet, etc). Novices may also bene­fit from the short XML Primer course, which takes a whistle-stop tour of the top­ics covered in prac­tical detail on this Hands-on Intro­duc­tion to XML.

Cur­riculum

Les­son 1.1 — Magical Mys­tery Tour

Provides an over­view of the whatithink.org XML applic­a­tion which is used through­out the course, and takes a whistle-stop tour of the les­sons to fol­low. You will learn about:
  • How XML is used in web-based applications
  • Using XML to rep­res­ent both doc­u­ments and data
  • The corner­stones of XML — syn­tax, struc­ture and transformation
  • The vari­ety of applic­a­tions that can cre­ate and exchange XML
  • XML as the basis for Web Ser­vices and semantic technologies
Exer­cise: Trace the Use Cases for the whatithink.org applic­a­tion, see­ing how it works and cre­at­ing a site map.

Les­son 1.2 — Close Encounter of the First Kind

Takes a first look at the XML lan­guage, its logical model and its basic syn­tax. You will learn about:
  • XML doc­u­ments
  • Ele­ments
  • Attrib­utes
  • Pro­cessing Instructions
  • CDATA sec­tions
  • Entit­ies
  • Check­ing that an XML doc­u­ment is ’well formed’
Exer­cise: Cre­ate some simple XML doc­u­ments using a text editor, load to an XML Editor and check that they are well formed.

Les­son 1.3 — Lan­guage, Truth and Logic

How the basic XML lan­guage is used to cre­ate vocab­u­lar­ies and how the logical struc­ture of each vocab­u­lary model can be spe­cified, and veri­fied, by a schema. You will learn about:
  • XML vocab­u­lar­ies
  • Namespaces
  • Schema lan­guages
  • Val­id­a­tion of XML documents
  • Data types
  • Design pat­terns
Exer­cise: Cre­ate and XML doc­u­ment, asso­ci­ate a schema, val­id­ate and then use the schema to guide fur­ther edit­ing of the document.

Les­son 1.4 — The Grand Scheme of Things

Looks at three dif­fer­ent XML schema lan­guages, show­ing how the struc­ture of a basic XML doc­u­ment is defined and some of the dif­fer­ent cap­ab­il­it­ies of the lan­guages. You will learn about:
  • Doc­u­ment Type Defin­i­tions (DTDs)
  • RELAX NG
  • W3C XML Schema
  • Other ways to val­id­ate XML: Schematron
Exer­cise: Val­id­ate a selec­tion of XML doc­u­ments using DTD, RelaxNG and W3C XML Schema.

Les­son 2.1 — The Devil is in the Details

A more detailed look at W3C XML Schema and how it can be used to imple­ment some com­mon design pat­terns. You will learn about using W3C XML Schema for:
  • Mixed con­tent
  • Con­tent models
  • Empty Ele­ments
  • Annota­tions
  • Import & Include
  • Simple and Com­plex Types
  • Facets
  • Lists
Exer­cise: Use an XML devel­op­ment envir­on­ment to enhance a W3C XML Schema with some advanced fea­tures and observe the effects when val­id­at­ing documents.

Les­son 2.2 — Through the Look­ing Glass

An intro­duc­tion to the third major aspect of XML tech­no­logy — trans­form­a­tion. Provides an over­view of XSLT; its prin­ciples, syn­tax and basic oper­a­tion. You will learn about:
  • what XSLT is and why it is needed
  • the basic con­cepts of XSLT
  • using XSLT to trans­form source XML structures
  • pro­du­cing XML and non-XML output
  • how XSLT stylesheets may use ‘push’ or ‘pull’ approaches to processing
  • using XPath to loc­ate data in source XML.
Exer­cise: Use a simple XSLT stylesheet to cre­ate XML and non-XML out­put as the res­ult of pro­cessing an XML document.

Les­son 2.3 — Trans­formers, Transform!

A more detailed look at XSLT, using some more advanced fea­tures, includ­ing those intro­duced at XSLT 2.0 You will learn about:
  • Cre­at­ing mul­tiple documents
  • Modes
  • Con­di­tional Processing
  • Vari­ables
  • Poten­tial Issues and com­mon ’gotchas’
  • Spe­cial fea­tures of XSLT 2.0
Exer­cise: Use some advanced fea­tures of XSLT to make more soph­ist­ic­ated trans­form­a­tions of XML documents.

Les­son 2.4 — Keep­ing Up Appearances

Present­ing XML doc­u­ments online by apply­ing Cas­cad­ing Style Sheets and cre­at­ing pagin­ated out­put (e.g. for print­ing) by trans­form­ing to XSL Format­ting Objects. You will learn about:
  • Cas­cad­ing Style Sheets (CSS)
  • Trans­form­a­tion to HTML, apply­ing CSS
  • Dir­ectly apply­ing CSS to XML documents
  • Extens­ible Stylesheet Lan­guage Format­ting Objects (XSL-FO)
  • Cre­at­ing PDF doc­u­ments using XSLT and XSL-FO
Exer­cise: Use CSS to view an Atom XML doc­u­ment online, then XSLT to gen­er­ate an XSL-FO file and run FOP to gen­er­ate a PDF for print.

3.1 Mark­ing it Up as You Go Along

See how dif­fer­ent desktop applic­a­tions — such as word pro­cessors, graph­ics pack­ages and mod­el­ling tools — use a range of dif­fer­ent vocab­u­lar­ies to cre­ate XML doc­u­ments. You will learn about:
  • How Microsoft Office applic­a­tions use XML
  • The Open Doc­u­ment Format (ODF) and Open Office
  • Scal­able Vec­tor Graph­ics (SVG)
  • The Uni­fied Mod­el­ling Lan­guage (UML)
  • UML and XML Schema
Exer­cise: Use open source soft­ware applic­a­tions to cre­ate dif­fer­ent types of XML doc­u­ment — ODF for word pro­cessing, SVG for vec­tor graph­ics, XMI for UML diagrams.

3.2 The Struc­ture of Life

Under­stand how struc­tured inform­a­tion can flow between XML doc­u­ments, spread­sheets and data­base sys­tems. Appre­ci­ate XML as a key tech­no­logy for trans­fer­ring struc­tured inform­a­tion between integ­rated sys­tems. You will learn about:
  • XML as the glue for integration
  • Exchan­ging struc­tured data between applic­a­tions using XML
  • Dif­fer­ent ways in which data­bases and XML combine
  • Extract­ing struc­tured data from data­bases in XML format
  • The Xquery stand­ard for inter­rog­at­ing XML data stores
Exer­cise: Extract, trans­form and load XML data with a vari­ety of struc­tured inform­a­tion tools – a nat­ive XML data­base, a rela­tional data­base, a spread­sheet and an XML editor.

3.3 The Mean­ing of Life

Using XML as the basis for semantic tech­no­lo­gies, rep­res­ent­ing real world mod­els as Onto­lo­gies and imple­ment­ing applic­a­tions for Web 2.0 and the Semantic Web. You will learn about:
  • Data, inform­a­tion and knowledge
  • Meta data using the Resource Descrip­tion Frame­work (RDF)
  • Really Simple Syn­dic­a­tion (RSS) using RDF
  • Onto­lo­gies as real world models
  • The Web Onto­logy Lan­guage (OWL)
Exer­cise: Use the open source Pro­tege envir­on­ment to view and edit an onto­logy, export it as XML and see it drive the tag­ging of doc­u­ments in the whatithink.org application.

3.4 No Such Thing as a Free Lunch

XML as the basis for Web Ser­vices and how Ser­vice Ori­ented Archi­tec­tures can accel­er­ate com­pon­ent reuse and applic­a­tion integ­ra­tion. You will learn about:
  • How applic­a­tions are designed with Ser­vice Ori­ented Architectures
  • The role of XML messaging
  • What XML mes­sages look like
  • The power of loosely coupled sys­tems archi­tec­tures, using XML
Exer­cise: Cre­ate XML SOAP mes­sages and use them as the input for the web ser­vice that drives the inter­ac­tion between the two online applic­a­tions in whatithink.org.