ProTech Professional Technical Services, Inc.

XML, XSLT and Java Course Summary

Description

This course provides a complete introduction to XM, the Java XML APIs, XPath, and XSLT. The course is a balanced mixture of theory and practical labs, designed to take students from the basic fundamentals of XML, providing mastery of the standard Java XML APIs, and moving on to advanced topics of XPath and XSLT. The students are walked through the different standards in a structured manner, to enable them to master the concepts and ideas, which are reinforced in the lab exercises.

The course starts with the fundamentals of XML including document structure, and XML Schema. It then moves on to the basic relationship between Java and XML, including generating XML from Java and the mapping between Java and XML objects. Finally, students are taken through a detailed and hands-on examination of the two main JAXP APIs – SAX 2.0 and DOM 2.0. It then moves on to the XPath and XSLT standards, and how to use them to transform XML documents into other documents such as HTML documents or other XML documents.

CourseOutline Objectives

After taking this course, students will be able to: • Understand what XML is, why it is useful, • Use SAX and DOM to parse XML and how it is used documents • Understand the rules of XML and use the • Be familiar with the StAX and JDOM parsers building blocks of XML to create well-formed • Use JAXP initiate parsing XML documents • Learn to use XPath and XSLT for • Create schemas for XML documents selecting/transforming XML documents • Understand and use XML namespaces • Use XPath to precisely locate and select • Understand what an XML parser is and how portions of an XML document to use one • Use XSLT to transform the selected XML • Understand the different models of parsing into another form - XML, HTML, or some XML documents (push, pull, and tree-based other data format parsers)

Topics

• Introduction to XML • eXtra Topics • XML Basics • XPath (XML Path Language) • Namespaces • XSLT (Extensible Stylesheet Language • XML Schema Transformations) Basics • XML and Java • Transforming XML to XML • SAX • Transforming XML to HTML • DOM • Conditional Processing

Audience

Suitable for Java developers that need learn how to use XML, XML Schema, and XSLT, as well as the Java tools for working with them.

Prerequisites

Working knowledge of Java programming, including use of inheritance, interfaces, and exceptions

Duration

Five Days

Due to the nature of this material, this document refers to numerous hardware and software products by their trade names. References to other companies and their products are for informational purposes only, and all trademarks are the properties of their respective companies. It is not the intent of ProTech Professional Technical Services, Inc. to use any of these names generically.

ProTech Professional Technical Services, Inc.

XML, XSLT and Java Course Outline M. [Optional] The Document Type I. Introduction to XML Definition A. XML Defined N. Role and Function B. Benefits of Using XML, comparison O. Internal/External DTD to HTML P. Elements and attributeds C. Origins of XML. Q. CDATA, NMTOKEN D. XML Standards R. [Optional] XML Schema Advanced E. XML Usage Examples Topics S. Element and Attribute Group II. XML Basics Definitions

A. XML Document Structure T. Deriving Simple Types CourseOutline B. The document body U. Deriving Complex Types C. Elements, tags, and attributes, well- V. The any Types/li> formed elements D. Prolog, XML Declaration and PIs. V. XML and Java E. Entities, CDATA A. How Java and XML work together. B. Simple generating of XML from Java III. Namespaces Objects A. The Motivating Problem C. Parsing XML - Push (SAX), Pull B. The Namespace Solution (StAX), Tree (DOM) (Definition, qualified names, URIs, D. JAXP, SAX 2.0, StAX 1.0, DOM prefixes) APIs C. Namespace scope and overriding E. Instantiating Parsers with JAXP D. Default Namespaces F. SAXParserFactory/SAXParser E. Namespaces and Attributes G. DocumentBuilderFactory/Document Builder IV. XML Schema A. Valid XML documents, Schema VI. SAX languages, DTDs A. Primary Components of SAX B. XML Schema Basics B. Setting up for a Parse C. Schema form - Elements, Attributes C. Handling Document Errors and Types D. Handling Document Content D. Element Definitions E. SAX Features and Properties E. Simple and Complex Types F. SAX Extensions F. Primitive and Derived Datatypes G. Complex Types - Sequence, VII. DOM Choice, All A. What is DOM? H. Element Occurrence Constraints B. XML Document as a DOM Tree I. Attribute Definitions C. Getting a DOM Tree from the Parser J. Attribute Occurrence Constraints D. Manipulating the DOM Tree K. SimpleContent Type E. Transforming a DOM Tree Back to L. Using XML Schema with XML Namespaces

Due to the nature of this material, this document refers to numerous hardware and software products by their trade names. References to other companies and their products are for informational purposes only, and all trademarks are the properties of their respective companies. It is not the intent of ProTech Professional Technical Services, Inc. to use any of these names generically.

ProTech Professional Technical Services, Inc.

XML, XSLT and Java

Course Outline (cont.)

VIII. eXtra Topics A. StAX Parser Overview F. Whitespace handling B. Performance Issues • Lab: Pruning the Source Tree C. JAXB Overview • Lab: Creating a summary XML D. JDOM Overview document

IX. XPath (XML Path Language) XII. Transforming XML to HTML A. Overview of the XPath standard. A. Fundamental approach B. XPath data model – why we need it. B. HTML elements in an XML

CourseOutline C. Tree addressing and node types. document D. XPath Expressions C. Basic HTML Tables E. Working with location paths – step D. Considerations in generating tables by step. • Lab: Transforming an XML F. Absolute and relative location paths order document to HTML G. Axis specifiers, predicates, and functions XIII. Conditional Processing • Lab: Node Trees, Names, A. Overview String-values B. xsl:if • Lab: Location Paths and Axes C. xsl:choose, xsl:when, xsl:otherwise • Lab: Predicates, Functions, • Lab: Using Conditional Operators Processing

X. XSLT (Extensible Stylesheet Language Transformations) Basics A. XSLT Overview and History B. Stylesheets, Templates, and the XSLT Process C. Processing child nodes D. Default templates E. Writing templates – xsl:template F. Continuing Processing – xsl:apply- templates • Lab: Default Template Rules • Lab: Writing Templates

XI. Transforming XML to XML A. xsl:copy-of B. xsl:copy C. Pruning the result tree D. Attribute Value Templates E. Controlling output with xsl:output

Due to the nature of this material, this document refers to numerous hardware and software products by their trade names. References to other companies and their products are for informational purposes only, and all trademarks are the properties of their respective companies. It is not the intent of ProTech Professional Technical Services, Inc. to use any of these names generically.