Transforming XML Documents using XSLT
XSLT (Extensible Stylesheet Language Transformations) is a powerful declarative language that allows you to transform XML content into other formats. For example, you can use XSLT to transform an incoming XML business document into a different grammar for use in your organization. You can also use XSLT to transform semantic XML data into an appropriate HTML format for display in a web browser, or to transform the XML data into a plain-text format such as CSV (comma-separated value) so it can be imported into a spreadsheet.
This course provides comprehensive and deep coverage of all aspects of XSLT. The course also describes the role of XPath in locating content in an XML document, and explores XPath capabilities in detail. The course includes the latest features in XPath 2.0 and XSLT 3.0.
What you will learn:
- Applying XSLT style sheers to XML documents.
- Defining and applying template rules.
- Using XSLT programming language constructs.
- Defining and calling reusable named templates.
- Parameterizing template rules and style sheets.
- Generating new XML content.
- Managing large and complex style sheets.
- Using the latest features in XPath and XSLT.
Prerequisites:
- Familiarity with XML document structure
- Experience in a contemporary programming Language
Course outline:
- XML Essentials: XML document anatomy; Namespaces; Well-formed documents; Valid documents; DTD vs. XSD
- XSLT and XPath Introduction: Overview of XPath; Overview of XSLT; Practical usage of XPath and XSLT; Transforming XML documents using XPath and XSLT; Generating XML and/or HTML output
- Selecting XML Nodes using XPath: XPath nodes and properties; Axes, node tests, and predicates; Location paths and location steps; Finding elements and attributes; Finding other node types; Filtering nodes using predicates; Using XPath operators and functions
- Writing and Applying XSLT Style Sheets: Structure of XSLT style sheets; Defining and invoking template rules; Obtaining node values; Literal result elements; Applying a style sheet statically; Applying a style sheet dynamically using DOM
- XSLT Programming Constructs: Iteration; Decision making; Defining and calling named templates; Defining and using variables; Defining and using parameters
- Customizing XSLT Output: Formatting numbers; Sorting results; Managing whitespace; Character encodings; Generating XML, HTML, and plain text output
- Transforming XML Grammars with XSLT: Overview; Creating new XML elements and attributes; Managing namespaces; Creating text and numeric output
- Managing XSLT Complexity: Including and importing style sheets; Overriding imported template rules; Specifying template priorities
- Managing Multiple XML Documents: Accessing multiple XML documents; Accessing XML data with keys; Creating cross references in XML documents; Implementing grouping
- XPath 2.0: What is new in XPath 2.0; Data types and sequences; Querying with XPath 2.0; Using for, some and every keywords; How to use if statements; Set operations; Functions and type casts
- XSLT 2.0 and XSLT 3.0: What is new in XSLT 2.0 and 3.0; Data types and strong typing; How to use grouping; User defined functions; Creating multiple output documents; Generating sequences; Processing data with regular expressions; Controlling template processing
Andy Olsen - author of the course
Andy is a freelance consultant and instructor based in the UK, working mostly in the City of London and Oxford. Andy has been working with .NET since the Beta 1 days and has extensive experience in many facets of .NET development including WCF, WPF, WF, ASP.NET MVC Web development, and mobile applications. Andy has designed and written many Microsoft Official Curriculum courses in the last decade, and has been engaged as author and technical reviewer with Apress on some of their biggest selling books.