XML Training Overview|
This course provides the student who knows the fundamentals of XML with an in-depth study of XPath and XSLT. It is geared towards students who desire a working knowledge of XML and XSLT for the purpose of managing XML documents and transformation paths as part of enterprise software development. There is some in-browser presentation as a means of immediate feedback in lab exercises, but the module focuses on server-side development.
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.
This first module introduces 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, and to use flow-control constructs to effect conditional processing and loops.
The second module builds on students knowledge of XSLT. It treats advanced transformation problems – such as grouping output, managing structural transformations, and dealing with multiple source documents. Techniques are developed for advanced transformation solutions: use of XSLT variables, parameters and callable templates; sorting, and grouping using XSLT keys or previous-sibling comparisons; auto-numbering, formatting numbers and dates, calculating aggregate values over keys or groups, and callable-template tail recursion; and use of external documents and transforms.
XML Training LEARNING OBJECTIVES
XML Training Prerequisites
- 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.
- Declare, bind and reference XSLT variables.
- Use callable templates to capture common transformations and styling.
- Filter and sort XSLT output.
- Use XSLT keys and other techniques to achieve grouping in transformation output.
- Produce refined transformation output including auto-numbering, formatted numeric output, and calculated aggregate values.
- 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.
A basic knowledge of XML. Some familiarity with HTML, browsers, and web presentation will be beneficial.
XML Training Course duration
XML Training Course outline
Module 1: Introduction to XML Transformations|
Use of XPath in Other XML Technologies
The Node Test
Querying with XPath
2. Templates and Production
XSL and XSLT
Templates and Template Matching
Built-In Template Rules
Recursion Through Templates
Literal Replacement Elements
Formalizing Text, Elements and Attributes
Defining Target Vocabulary
Generating Processing Instructions
3. Dynamic Content and Flow Control
Deriving Source Content
Getting Source Values
Attribute Value Templates
Copying Source Elements and Trees
Module 2: Advanced XML Transformations
1. Variables and Template Management
Using Variables to Capture Context Information
Result Tree Fragments
Applying Templates with Parameters
Calling Templates Explicitly
2. Sorting and Grouping
Data Type for Sorting
Uses for Grouping
Using the Preceding-Sibling Axis
Using XSLT Keys
Iterating Over Groups
Iterating Within a Group
3. Advanced Production Techniques
Extrapolating Information from the Source Document
String Parsing and Manipulation
Computing Aggregate Values
Using Tail Recursion
4. Multiple Documents and Transforms
Merging Multiple Source Documents
The XSLT Document Function
Reusing Transformation Logic
Multiple Template Modes
Appendix A. Learning Resources|
Appendix B. Quick Reference: XPath and XSLT Constructs
Appendix C. Quick Reference: W3C Namespaces
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 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).