section_text

DT offers a core set of courses aimed at covering the Application Lifecycle, from requirements gathering, analysis and design to development, testing, process and project management.

section_grafx
  

Advanced Java Programming


Course Overview
Master the essentials of XML, Java XML APIs and XML Transformations. Explore fundamentals of XML including document structure, DTDs and XML Schema. Explore a detailed hands-on examination of the two main parser JAXP APIs - SAX 2.0 and DOM 2.0 and JAXP's XML transformations capabilities (XSLT 2.0, XSL-FO and XPath 2.0)
 

Course Style
This course provides a basic introduction to XML and the Java XML APIs. The course is a balanced mixture of theory and practical labs designed to take students from the basic fundamentals of XML right through to mastery of the standard Java XML APIs. The course starts with the fundamentals of XML including document structure, DTDs 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. The course concludes with a look at some Java and XML related topics.

 

Course Overview

This is an overview of the course. For a detailed description with objectives per topic, we refer to the detailed workshop overview, listed further below in this document.
Session: Introduction to XML

* Lesson: What is XML?
* Lesson: Introducing XML
* Lesson: Defining Structure with DTD's (optional)

Session: Introduction to XML and JAXP

* Lesson: Overview of the XML API
* Lesson: Parsing XML using SAX
* Lesson: Parsing XML using DOM
* Lesson: Processing XML using JDOM
* Lesson: Processing XML using Dom4J

Session: XML Schemas

* Lesson: Introduction to Schemas
* Lesson: Schema Structures

Session: Application Development Techniques

* Lesson: XML documents and Java Objects (JAXB)

Appendix: Transforming XML: XSL (XSLT 2.0 and XPath 2.0)

* Lesson: Introduction to XSL
* Lesson: Introduction to XPath 2.0
* Lesson: XSLT 2.0 Introduction
* Lesson: Building Stylesheets
* Lesson: Using XSLT 2.0 elements
* Lesson: Using XPath 2.0

Appendix: JAXP Transformations

* Lesson: Programmatic Transformation in Java using JAXP

Appendix: Using XML and storage

* Lesson: Introduction to Using XML as a storage
* Lesson: Programmatic storing in XML-enabled databases
* Lesson: Querying XML (Xquery, Quilt, XQL)
* Lesson: Storing XML in an XML Database

Detailed overview
Introduction to XML
Lesson: What is XML?

* Explain the requirement for self describing data
* Explain the history of XML
* Explain the XML standard and how it relates to other standards
* Discuss real life examples of XML

Lesson: Introducing XML

* Write an XML document that is well-formed
* Explain the difference between a well-formed document and a valid document
* Provide attributes for the elements within an XML document
* Explain the use of Entities within an XML document
* Explain the use of CDATA sections
* Discuss White space issues
* Explain Unicode Compliance
* Introduce XML development standards
* Discuss the use of attributes vs. elements

Lesson: Defining Structure with DTD's (optional)

* Create a DTD to define the structure of an XML document
* Define elements in the DTD
* Define document structure in the DTD
* Define attributes in the DTD
* Define Entities in the DTD
* Modify an XML document to utilize a DTD

Introduction to XML and JAXP
Lesson: Overview of the XML API

* Identify the major components of the JAX API set
* Explain the use of the JAXP APIs
* Describe the packages that compose JAXP
* Create and parse an XML document
* Understand the parsing process
* Explain the difference between the SAX and DOM models

Lesson: Parsing XML using SAX

* Describe the function of an Event Handler
* Extend the DefaultHandler to process a document
* Explain the methods of a Content Handler
* Explain the methods of the Error Handler
* Create a program that echoes XML content, using SAX
* Handling XML attributes
* Explain XML processing instructions

Lesson: Parsing XML using DOM

* Write a parser that uses the DOM API
* Write a parser that can validate an XML document against a DTD
* Create a DOM document
* Manipulate an XML document
* Create a new XML document using DOM

Lesson: Processing XML using JDOM

* Introduce JDOM
* Explain the differences between JDOM and DOM
* Use JDOM to read an XML document
* Create a new XML document using JDOM
* Explain the methods of the org.jdom.Document class
* Explain the methods of the org.jdom.Element class

Lesson: Processing XML using Dom4J

* Introduce dom4J
* Read XML using Dom4J
* Create documents using Dom4J
* Output Dom4J to XML, HTML, DOM and SAX

XML Schemas
Lesson: Introduction to Schemas

* Explain why Schemas are preferred to DTDs
* Know how to declare a Schema
* Know how to refer to a Schema in an instance document
* Describe XML namespaces and understand them
* Describe different ways of addressing XML element types using namespaces
* Explain the usage of the "Default" namespace
* Describe the overall structure of a Schema file
* Understand Simple Types
* Understand Custom Simple Types
* Introduce Complex Types
* List the "standard" types defined in the XML Schema namespace
* Understand how to create Lists types
* Understand how and when to create derived types
* Understand how to make XML Schemas modular using include and import

Lesson: Schema Structures

* Understand how to impose restrictions on data types
* Understand how to use Regular Expressions to add restrictions based on patterns
* Discuss different approaches of working with wipe spaces
* Understand how to manage cardinality of elements
* Know how to generate a Schema out of an instance document

Application Development Techniques
Lesson: XML documents and Java Objects (JAXB)

* Introduce JAXB
* Use JAXB to map XML documents to Java Objects
* Generate objects by using the JAXB-compiler

Appendences
Transforming XML: XSL (XSLT 2.0 and XPath 2.0)
Lesson: Introduction to XSL

* Introduce the extensible Stylesheet Language
* Introduce the extensible Stylesheet Language Transformations
* Explain the Transformation process
* Discuss when you would need or could use XSL

Lesson: Introduction to XPath 2.0

* Introduce XPath
* Learn the fundamentals of XPath needed for learning XSLT
* List the different types of expressions
* Understand the basics of the path expression syntax
* Understand step expressions
* Address XML attributes using the XPath path expression
* Understand the meaning and the structure of a predicate
* Understand the technique behind the predicate truth value
* Use predicates with logical operators such as and/or
* Peek into the extensive function library of XPath

Lesson: XSLT 2.0 Introduction

* Create basic XSLT documents
* Understand the structure of an XSLT document
* Explain the syntax of the stylesheet declaration
* Explain template declarations
* Understand the "default" template
* Understand the two main methods of using templates
* Use Output instructions (value-of)
* Understand how to use attribute value templates
* Use Conditional instructions ( if, choose, when, otherwise)
* Use the for-each instruction

Lesson: Building Stylesheets

* Understand XSLT templates
* Understand template pattern matching
* Define multiple templates
* Use the apply-templates and call-template instruction
* Understand parameters and variables
* Understand value and parameter values
* Understand tunneled parameters
* Understand how to specify the output document or multiple documents of a transformation
* Understand how to organise stylesheets using include and import
* Understand the concept of stylesheet precedence
* Use character mapping
* List XSLT (additional) functions

Lesson: Using XSLT 2.0 elements

* Understand grouping in XSLT 2.0 using the for-each-group instruction
* Understand different grouping scenarios
* Understand how to add dynamic nodes and attributes to the resulting document
* Copy nodes to the result document
* Understand how to format numbers
* Understand how to use cross-references in XSLT
* Understand numbering and how to control and configure the automatic numbering
* Discuss miscellaneous XSLT instructions

Lesson: Using XPath 2.0

* Understand the full syntax of important XPath expressions
* Know the full composition of the path expression and its step expressions
* List the axes that partition a document from any context without overlap.
* Understand the meaning of axes concepts like siblings, child and ancestors and descendants
* Understand the node test (name and kind tests)
* List the different kind tests available in XPath
* Appreciate the abbreviated syntax
* Understand data types in XPath (and list the XPath specific types)
* Understand type casting in XPath
* Explain the Comparison expressions
* Explain the for expression
* Explain conditional expressions
* Explain sequence expressions
* Explain quantified expressions

JAXP Transformations
Lesson: Programmatic Transformation in Java using JAXP

* Introduce JAXP transformations
* Explain the most important classes, needed to perform transformation
* Show a simple example of JAXP transformations

Using XML and storage
Lesson: Introduction to Using XML as a storage

* Introduce the XML:DB initiative
* Explain the use of XML as storage
* Explain the different ways of storing XML in databases
* Introduce the different types of databases used for storing XML

Lesson: Programmatic storing in XML-enabled databases

* Introduce XML-enabled database
* Explain Table-based mapping
* Explain XML-Object mapping
* Write your own XML to Database mapping

Lesson: Querying XML (Xquery, Quilt, XQL)

* Explain the different query languages used for XML
* Explain the syntax of XQL
* Introduce Quilt as an XML query language
* Introduce Xquery as an XML query language

Lesson: Storing XML in an XML Database

* Introduce Native XML databases
* Introduce Xindice as the Native XML database used during this training
* Explain the differences between the XML:DB api and the Xindice implementation
* Store resources in the Xindice database
* Retrieve documents from the Xindice database
* Execute search queries on XML resources
* Update XML contents of XML documents

 

Hands-on lab exercises
 1. Creating the Travelorder XML-Create a XML file which reflects information needed for travel arrangments.
2. Creating the TravelOrder.dtd (optional)-Create a DTD which describes the structure of travel orders .
3. Parsing a Catalog using JAXP-SAX-Understand how to implement SAX parsing using JAXP and how to program a SAX handler
4. Parse a document using DOM-Understand how to perform DOM parsing using JAXP
5. Convert a CSV to XML-Understand how to use DOM for writing an XML document.
6. Generate XML using JDOM-Understand how to use JDOM for writing an XML document.
7. Defining an XML Schema-To be able to write an XML Schema
8. Creating Value Objects Using JAXB-Understand how to use JAXB
 

Hands-on lab exercises (in appendences)

 1. Practicing XPath-Use XPath expressions to become familiar with the content of the DVDCatalog XML document
2. Create a basic Stylesheet-Become familiar with the basic XSLT functions
3. Using Template-Understand the usage of multiple templates
4. Grouping-Become familiar with <xsl:for-each-group> and <xsl:result-document>
5. Using XPath operations-Become familiar with some of the XPath operation

 

Prerequisites
Students should be experienced with the Java programming language.

Recommended Follow-On Courses
.

Duration
4 days

Next Dates
Please call for dates

Cost
£1,500 plus VAT