You are here:
XML for the Enterprise

This comprehensive course gives the student a solid working knowledge of the core XML language, XML transformations (XSLT), and XML Schema.

The course presents what might be called “Pure XML”, by which we mean two things. Firstly, everything in the course is based strictly on W3C specifications, without any vendor-specific extensions. Secondly, 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. (Separately, Object Innovations also offers courses in XML and Java, for instance, and XML in the .NET framework.)

The first module introduces XML, giving an overview of its use in the industry and motivations for adoption. The basic grammar of well-formed XML documents is studied, including proper use of attributes, empty elements, mixed content, and nested elements. Then students 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 next two modules introduce students to the XPath and XSLT specifications. Students 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 whitespace 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 second module treats advanced transformation problems – such as grouping output, managing structural transformations, and dealing with multiple source documents – and techniques – such as use of XSLT keys, tail recursion with callable templates, and structure-template documents using the XSLT document function.

The remaining two modules treat 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. The second of the two modules introduces keys and key references to associate elements based on key fields, and covers complex-type extension as well as use of multiple namespaces and schema.

 
Who Should Attend
This course is intended for students who desire extensive knowledge of XML and related server-side technologies to solve enterprise programming problems.
 
Prerequisites
None. Some familiarity with HTML will be beneficial.
 
Features of this Course
Interactive hands-on lab exercises.
 
Benefits of Attending this Class

Upon completion of this course, students should be able to:

During this course, students will:

  • 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 whitespace.
  • 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.
  • Use XSLT keys and other techniques to achieve grouping in transformation output.
  • Implement more complex processes using tail recursion in callable templates.
  • Use the XSLT document function to manage multiple source documents.
  • Import and include multiple transform definitions to foster reuse of transformation logic.
  • 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.
  • Develop hierarchies of reusable complex types using type extension.
  • Associate elements of different types using identity constraints (keys and key references).
  • Populate multiple namespaces using schema, and import and use those namespaces in valid instance documents
 
Course Contents

Volume 1: Introduction to XML (1 day)

1. 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

2. XML Grammar

Structure of an XML Document
Handling Whitespace
Character and Entity References
Well-Formed XML
Elements
Attributes
Processing Instructions
Comments
CDATA Sections

3. 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

Volume 2, Module 1: Introduction to XML Transformations (1 day)

1. 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

2. XSLT: Templates and Production

XSL and XSLT
Rule-Based Transformations
Output Methods
Templates and Template Matching
Built-In Template Rules
Recursion Through Templates
Controlling Whitespace
Template Context
Literal Replacement Elements
Formalizing Text, Elements and Attributes

3. 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

Volume 2, Module 2: Advanced XML Transformations (1 day)

1. Gathering Data

Common Transformation Problems
XSLT Techniques
Filtering and Sorting
Data Type for Sorting
Grouping
Using the Preceding-Sibling Axis
Using XSLT Keys
Restructuring the Source Document

2. Decorating, Calculating, and Restructuring

Extrapolating Information from the Source Document
Adding Static Content
Auto-Numbering
Computing Aggregate Values
Using Tail Recursion
Forging New Document Structures
Defining Structure Algorithmically

3. Multiple Source Documents

Merging Multiple Source Documents
The XSLT Document Function
Forging New Structures, Redux
Using Template Documents
Parameterizing Transformations
XML Documents as Instruction Sets
Reusing Transformation Logic
Including Transforms
Importing Transforms
Multiple Template Modes
Buffering Template Output for Secondary Analysis

Volume 3, Module 1: Introduction to XML Schema (1 day)

1. 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

2. 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

3. 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

Volume 3, Module 2: Advanced XML Schema (1 day)

1. Keys and Key References

Schema as Object Models
UML for XML
Composition
Association
Identity Constraints
Asserting Uniqueness
Keys
Key References
Controlling Association Cardinality

2. Complex-Type Extension

Type Specialization
Extending Complex Types
Using Extended Types
Derivation by Restriction
Abstract Types
Substitution Groups
“ Complete” Specialization (The final Attribute)
Derivation Without Polymorphism (The block Attribute)

3. Namespaces and Schema

Using Namespaces in Documents
Populating a Namespace
Qualified and Unqualified Locals
Multiple Namespaces in Schema
Importing and Inlcuding Schema
Multiple Schema per Namespace
Type Redefinition
Validating by Namespace (Wildcards)

4. Using Schema in XML Applications

Schema Design Issues
Type Granularity
Ease of Parsing, Transformation, Presentation and Maintenance
Mapping from Object Models
Mapping from Database Schema
Foreign-Key Relationships
XSLT for Validation
Application Validation

System Requirements

Software:

Software for this course can be installed and run on Windows or Linux systems. A variety of command-line XML tools must be installed for parsing, transformation, and schema validation. These are all free downloadable tools and all can be installed and run on Windows or Linux. See the appropriate course Setup Guide for details.

Hardware:

Hardware requirements are not great; a good minimal system for this course would have a Pentium 200MHz or equivalent CPU, 64 meg of RAM and at least 50 megabytes of free disk space for tools installation (and most of this is for the web browser).

 
 
 
Disclaimer: HP-UX, Tru64 Unix, OpenVMS and are registered trademarks of the Hewlett Packard Corporation. Solaris and Java are registered trademarks of Sun Corporation. AIX is a registered trademark of IBM. Oracle is a registered trademark of Oracle Corporation.