Print this Page

XML Quick Start
XML Grammar, Validation, XSLT & Xpath Transformation & Schema

This 3-day course provides a solid working knowledge of the core XML language, XML transformations (XSLT), and XML Schema.  It is designed for students who desire basic knowledge of XML and related server-side technologies to solve enterprise-programming problems.

The course presents "Pure XML", by which we mean two things.  First, everything in the course is based strictly on W3C specifications, without any vendor-specific extensions.  Second, no knowledge of any particular programming language or other external technology is required to participate fully in the course.  Thus the hands-on exercises, and the knowledge that is developed, are portable and applicable to any XML authoring or development effort.  (Please visit www.isrg.com/xml.htm to see courses in XML and Java, and XML in the .NET framework.)

This course introduces XML, giving an overview of its use in the industry and motivations for adoption.  Learners study the basic grammar of well-formed XML documents, including proper use of attributes, empty elements, mixed content, and nested elements.  Students then move on to valid XML, learning to write DTDs and XML documents that will validate against the DTDs.  This includes work with various attribute types such as enumerations, IDs and IDREFs.  Students learn the limitations of the DTD grammar, and also techniques for working around those limitations using entities to express data designs effectively.

The course also introduces students to the XPath and XSLT specifications.  Learners develop fluency in the exacting but powerful XPath syntax, and then build a number of XSLT transformations.  Study of XSLT is arranged first to develop control over output production, including a solid understanding of the sometimes-mysterious built-in template rules, template matching, priority and modes, and control of white-space production.  Then, students turn towards the source document and learn to extract single values, to make shallow and deep copies of source elements, to use variables, and to use flow-control constructs to effect conditional processing and loops.

The course also teaches the new XML Schema recommendation.  Students review the shortcomings of the DTD for expressing type information, and learn how to use XML Schema to create strict document models.  Schema data types and structures are studied, allowing precise grammar and validation rules to be defined for document content.

What You Will Learn

  • Understand the broad influence of XML on emerging software architectures.

  • Write well-formed XML documents to express simple or complex document content.

  • Write DTDs to set rules for XML document validation.

  • Write valid XML documents with internal and/or external document type definitions.

  • Understand the limitations of DTDs in expressing document and object designs and in setting strict validation rules.

  • Read and write XML using namespaces to import type information and to partition the XML namespace.

  • Write simple and complex queries into XML document content using XPath.

  • Use XSLT for XML-to-XML transformations.

  • Use the built-in template rules correctly to process the right source information.

  • Use mode and priority to control template matching.

  • Control exact production of text, HTML and XML elements, and white space.

  • Derive source document content and make copies of node trees.

  • Use looping and conditional processing to manage output production.

  • Use callable templates to capture common transformations and styling.

  • Develop XML Schema to express precise type information for an XML document.

  • Associate schema with XML instance documents.

  • Validate instance documents against associated schema.

  • Define simple types, and use value restrictions and enumerations to constrain values.

  • Define list types and union types.

  • Create complex types, including simple types and other complex types, and empty- and mixed-content types.

Who Should Attend

Students who need a working knowledge of the core XML language, XML transformations (XSLT), XML Schema and related server-side technologies to solve enterprise-programming problems.

Course Outline

Module 1: Introduction to XML

A Brief History of XML

  • Birth of XML

  • Content vs. Presentation

  • Self-Describing Data

  • A Standard Document Format

  • XML and Relational Data

  • XML and Object Models

  • The Need for Validation

  • Programmatic Use of XML

  • XML Transformations

  • XML for Messaging

  • Web Services

XML Grammar

  • Structure of an XML Document

  • Handling White Space

  • Character and Entity References

  • Well-Formed XML

  • Elements

  • Attributes

  • Processing Instructions

  • Comments

  • CDATA Sections

Document Type Descriptors

  • Document Types

  • Internal and External Subsets

  • PUBLIC vs. SYSTEM

  • DTD Structure

  • Defining Elements

  • Cardinality

  • Attributes

  • Required, Implied, Default, and Fixed Attributes

  • Enumerations

  • IDs and IDREFs

  • Entities

  • Conditional Sections

  • Limitations of DTDs

  • Techniques Using Entities

  • XML Schema

  • XML Namespaces

Module 2: XML Transformations

XPath

  • Use of XPath in Other XML Technologies

  • XPath Expressions

  • The Axis

  • The Node Test

  • The Predicate

  • XPath Types

  • XPath Functions

  • Implied Context

  • Querying with XPath

XSLT: Templates and Production

  • XSL and XSLT

  • Rule-Based Transformations

  • Output Methods

  • Templates and Template Matching

  • Built-in Template Rules

  • Recursion Through Templates

  • Controlling White Space

  • Template Context

  • Literal Replacement Elements

  • Formalizing Text, Elements and Attributes

XSLT: Dynamic Content and Flow Control

  • Deriving Source Content

  • Getting Source Values

  • Attribute Value Templates

  • Copying Source Elements and Trees

  • Defining Target Vocabulary

  • Generating Processing Instructions

  • Variables

  • Result Tree Fragments

  • Looping

  • Conditionals

  • Calling Templates as Functions

  • Sorting

  • Number Formatting

Module 3: XML Schema

Getting Started With XML Schema

  • What is an XML schema?

  • Schemas vs. DTDs

  • Structure of a Schema

  • Associating Schema with Documents

  • Types of Types

  • Defining Elements

  • Defining Complex Types

  • Validation

Simple Types

  • Simple and Atomic Types

  • Built-in Types

  • Primitives

  • Numeric Derived Types

  • String Derived Types

  • Simple Type Restriction

  • Facets

  • Value Ranges

  • Enumerations

  • Patterns

  • Lists

  • Unions

  • Nillable Values

Complex Types

  • Model Groups

  • Sequences, Conjunctions, and Disjunctions

  • Particles

  • Occurrence Constraints

  • Global and Local Definitions

  • Defining Attributes

  • Empty, Any, and Mixed Content

  • Model Group Definitions

  • Attribute Group Definitions

  • Annotations