[PDF] XSL The Personal Trainer for XSLT, XPath and XSL-FO by

Page 1

XSL The Personal Trainer for XSLT, XPath and XSL-FO by

Your 200-page Personal Trainer for XSL To learn how to use XSL, you need practical hands-on advice from an expert who understands what it is like to just start out. By working step by step through document structures, template rules, stylesheet transformations, and formatting objects, you can master XSL fundamentals while learning how to transform structured data into any output format needed from HTML to XHTML to program source code.This book is designed for anyone who wants to learn XSL, including those who create or support XML applications and XML-based solutions. Inside, youll find comprehensive overviews, step-by-step procedures, frequently used tasks, documented examples, and much more. One of

[PDF]

the goals is to keep the content so concise that the book remains compact and easy to navigate while at the same time ensuring that the book is packed with as much information as possible--making it a valuable resource.Learning XSL doesnt have to be a frustrating experience, you can use XSL The Personal Trainer for XSLT, XPath and XSL-FO to learn everything you need to use XSL and related technologies effectively. Look also for XML, DTDs, Schemas The Personal Trainer.Table of ContentsChapter 1. XSL Transformations amp Formatting 14Introducing XSLT 14Matching Document

Structures to Template Rules

18The Template for Element and Root Nodes 20The Template for Modes 20The Template for Text and Attribute Nodes

21Understanding Other Built-In

Templates 21Structuring XSLT Stylesheets 22Starting the XSLT Stylesheet

22Defining the Output Format 24Defining Template Rules and Declarations

41Chapter 2. XPath Operators amp Expressions

48Understanding Location Paths

49Understanding XPath Operators and Datatypes 55Using Relative XPath Expressions with Elements

60Referencing the Current Context Node

60Referencing a Parent Node

61Referencing Siblings Relative to the Current Context

62Referencing Child Nodes

63Using Absolute XPath Expressions with Elements

65Locating Nodes

67Working with Attribute Nodes

67Working with Text Nodes

70Working with Comment Nodes

71Working with Instruction Nodes

72Using Namespaces with Element and Attribute Nodes 73Using Wildcards and Predicates in XPath Expressions

75Selecting Any Node 75Skipping Levels in the Hierarchy 77Filtering To Match Nodes

79Chapter 3. Branching amp Control Functions 86 with if Statements 86 with choose Statements 89 with foreach Statements

92Invoking, Including, and Importing

Templates 97Including and Importing Templates 97Calling

Templates by Name

101Invoking Templates by Mode

102Chapter 4. Variables amp Parameters in XSLT

with Parameters 106Defining and Referencing Parameters 106Setting Default Values for Parameters
Parameter Values to Templates 111Using Global
113Working
Variables 120Defining Variables
Variables 123Using Global Variables
106Working
108Passing
Parameters
with
120Referencing
Strings,
128Converting
125Chapter 5. Working with
Booleans, amp Numbers 128Manipulating Strings
Values to Strings
Strings 130Normalizing
134Merging
Single
135Examining and
136Translating
in Strings 145Converting and Manipulating Boolean Values
151Using
151Working with Numeric Values
Numbers 151Formatting Values as Numbers
Number
128Managing Spaces Within
Space in Strings
Values into a
String
Manipulating String Contents
Characters
147Using the true Function
the false Function 151Using the not Function
151Converting Values to
153Rounding

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.