Hands-on Introduction to XML

 

Overview

The Hands-on Introduction to XML is designed to introduce you to the many and varied aspects of XML design, processing and delivery through practical, hands-on classes where you will create your own XML documents.
You will learn how to create data structures using an XML editor, create an XML schema model and parse/validate the document structure. You will also have the opportunity to gain an understanding of the latest XML tools and technologies in the marketplace, so that you can develop and implement your own XML solutions.

Details of this course may change; this overview gives you an idea of what’s planned. The final version may differ, but will be broadly of the same overall scope and technical detail.

The three day course is based around the ‘real life’ scenario of Erasmus Swift, a new age philosopher who decides to build a web site using XML technology. It is designed to be practical, informative and fun! Included in the course is a practical workshop day where you can continue with the class-based exercises or ask our experts about your own XML applications, with full hands-on support.

Learning Objectives

After studying the Hands-on Introduction, beginners will know enough about XML to enjoy the more advanced courses at the Summer School. You will understand:

  • How content is marked up in XML
  • Validation using XML schemas
  • Transformation with XSLT
  • How to use XML tools for editing and transformation
  • How standard Office applications can use XML
  • The capabilities of native XML and relational databases
  • Search with XPath and XQuery
  • Paginated output with XSL-FO
  • Service Oriented Architectures (web services)

Who should attend

The course is suitable for newcomers to XML or anyone wanting to gain a more practical grasp of the fundamental concepts of the XML family of standards. It is suitable for those who will be working ‘hands-on’ with XML technology in the future, but also for managers, designers and strategists who need to gain an appreciation of how XML works, and what it can be used to achieve.

To tackle the exercises you need to be computer literate and able to use Windows and basic office applications (word processor, spreadsheet, etc).
Novices may also benefit from the short XML Primer course, which takes a whistle-stop tour of the topics covered in practical detail on this Hands-on Introduction to XML.

Curriculum

Lesson 1.1 – Magical Mystery Tour

Provides an overview of the whatithink.org XML application which is used throughout the course, and takes a whistle-stop tour of the lessons to follow.

You will learn about:

  • How XML is used in web-based applications
  • Using XML to represent both documents and data
  • The cornerstones of XML – syntax, structure and transformation
  • The variety of applications that can create and exchange XML
  • XML as the basis for Web Services and semantic technologies

Exercise:
Trace the Use Cases for the whatithink.org application, seeing how it works and creating a site map.

Lesson 1.2 – Close Encounter of the First Kind

Takes a first look at the XML language, its logical model and its basic syntax.

You will learn about:

  • XML documents
  • Elements
  • Attributes
  • Processing Instructions
  • CDATA sections
  • Entities
  • Checking that an XML document is ‘well formed’

Exercise:
Create some simple XML documents using a text editor, load to an XML Editor and check that they are well formed.

Lesson 1.3 – Language, Truth and Logic

How the basic XML language is used to create vocabularies and how the logical structure of each vocabulary model can be specified, and verified, by a schema.

You will learn about:

  • XML vocabularies
  • Namespaces
  • Schema languages
  • Validation of XML documents
  • Data types
  • Design patterns

Exercise:
Create and XML document, associate a schema, validate and then use the schema to guide further editing of the document.

Lesson 1.4 – The Grand Scheme of Things

Looks at three different XML schema languages, showing how the structure of a basic XML document is defined and some of the different capabilities of the languages.

You will learn about:

  • Document Type Definitions (DTDs)
  • RELAX NG
  • W3C XML Schema
  • Other ways to validate XML: Schematron

Exercise:
Validate a selection of XML documents using DTD, RelaxNG and W3C XML Schema.

Lesson 2.1 – The Devil is in the Details

A more detailed look at W3C XML Schema and how it can be used to implement some common design patterns.

You will learn about using W3C XML Schema for:

  • Mixed content
  • Content models
  • Empty Elements
  • Annotations
  • Import & Include
  • Simple and Complex Types
  • Facets
  • Lists

Exercise:
Use an XML development environment to enhance a W3C XML Schema with some advanced features and observe the effects when validating documents.

Lesson 2.2 – Through the Looking Glass

An introduction to the third major aspect of XML technology – transformation. Provides an overview of XSLT; its principles, syntax and basic operation.

You will learn about:

  • what XSLT is and why it is needed
  • the basic concepts of XSLT
  • using XSLT to transform source XML structures
  • producing XML and non-XML output
  • how XSLT stylesheets may use ‘push’ or ‘pull’ approaches to processing
  • using XPath to locate data in source XML.

Exercise:
Use a simple XSLT stylesheet to create XML and non-XML output as the result of processing an XML document.

Lesson 2.3 – Transformers, Transform!

A more detailed look at XSLT, using some more advanced features, including those introduced at XSLT 2.0

You will learn about:

  • Creating multiple documents
  • Modes
  • Conditional Processing
  • Variables
  • Potential Issues and common ‘gotchas’
  • Special features of XSLT 2.0

Exercise:
Use some advanced features of XSLT to make more sophisticated transformations of XML documents.

Lesson 2.4 – Keeping Up Appearances

Presenting XML documents online by applying Cascading Style Sheets and creating paginated output (e.g. for printing) by transforming to XSL Formatting Objects.

You will learn about:

  • Cascading Style Sheets (CSS)
  • Transformation to HTML, applying CSS
  • Directly applying CSS to XML documents
  • Extensible Stylesheet Language Formatting Objects (XSL-FO)
  • Creating PDF documents using XSLT and XSL-FO

Exercise:
Use CSS to view an Atom XML document online, then XSLT to generate an XSL-FO file and run FOP to generate a PDF for print.

3.1 Marking it Up as You Go Along

See how different desktop applications – such as word processors, graphics packages and modelling tools – use a range of different vocabularies to create XML documents.

You will learn about:

  • How Microsoft Office applications use XML
  • The Open Document Format (ODF) and Open Office
  • Scalable Vector Graphics (SVG)
  • The Unified Modelling Language (UML)
  • UML and XML Schema

Exercise:
Use open source software applications to create different types of XML document – ODF for word processing, SVG for vector graphics, XMI for UML diagrams.

3.2 The Structure of Life

Understand how structured information can flow between XML documents, spreadsheets and database systems. Appreciate XML as a key technology for transferring structured information between integrated systems.

You will learn about:

  • XML as the glue for integration
  • Exchanging structured data between applications using XML
  • Different ways in which databases and XML combine
  • Extracting structured data from databases in XML format
  • The Xquery standard for interrogating XML data stores

Exercise:
Extract, transform and load XML data with a variety of structured information tools – a native XML database, a relational database, a spreadsheet and an XML editor.

3.3 The Meaning of Life

Using XML as the basis for semantic technologies, representing real world models as Ontologies and implementing applications for Web 2.0 and the Semantic Web.

You will learn about:

  • Data, information and knowledge
  • Meta data using the Resource Description Framework (RDF)
  • Really Simple Syndication (RSS) using RDF
  • Ontologies as real world models
  • The Web Ontology Language (OWL)

Exercise:
Use the open source Protege environment to view and edit an ontology, export it as XML and see it drive the tagging of documents in the whatithink.org application.

3.4 No Such Thing as a Free Lunch

XML as the basis for Web Services and how Service Oriented Architectures can accelerate component reuse and application integration.

You will learn about:

  • How applications are designed with Service Oriented Architectures
  • The role of XML messaging
  • What XML messages look like
  • The power of loosely coupled systems architectures, using XML

Exercise:
Create XML SOAP messages and use them as the input for the web service that drives the interaction between the two online applications in whatithink.org.