XSLT Quickly

Free Download

Authors:

ISBN: 1930110111, 9781930110113

Size: 4 MB (3782024 bytes)

Pages: 316/316

File format:

Language:

Publishing Year:

Bob DuCharme1930110111, 9781930110113

Geared toward new users of XSLT, this guide is a basic tutorial of the concepts and documentation manipulation techniques necessary for the most common XSLT tasks. Featuring an XSLT cookbook, which provides task-oriented recipes for tackling issues such as converting elements to attributes or reading in multiple documents at once, this guide makes it easier to find solutions to most development problems. Included are a glossary, a reference for XSLT syntax, and a reference for using the popular XSLT processors. This guide will help XSLT users get common transformations done with minimal time and effort.

Table of contents :
contents……Page 4
preface……Page 8
acknowledgments……Page 10
about this book……Page 11
Part 1 Getting started with XSLT……Page 16
1.1 What is XSLT (and XSL, and XPath)?……Page 18
1.1.1 XSLT and alternatives……Page 20
1.1.2 Documents, trees, and transformations……Page 21
1.2 A simple XSLT stylesheet……Page 23
1.2.1 Template rules……Page 24
1.2.2 Running an XSLT processor……Page 26
1.2.3 An empty stylesheet……Page 27
1.3 More element and attribute manipulation……Page 28
1.3.1 Manipulating attributes……Page 29
1.3.2 Attribute value templates……Page 30
1.4 Summing up the tutorial……Page 31
Part 2 XSLT user’s guide: How do I work with………Page 36
XPath……Page 38
2.2 Axes……Page 39
2.2.1 The child, parent, and attribute axes……Page 40
2.2.2 ancestor and ancestor-or-self……Page 42
2.2.3 preceding-sibling and following-sibling……Page 44
2.2.4 preceding and following……Page 47
2.2.5 descendant and descendant-or-self……Page 50
2.2.6 self……Page 54
2.2.7 namespace……Page 55
2.3 Node tests……Page 56
2.4 Predicates……Page 58
3.1 Adding new elements to the result tree……Page 62
3.3 Parent, grandparent, sibling, uncle, and other relative elements: getting their content and a………Page 65
3.4 Previous, next, first, third, last siblings……Page 68
3.5 Converting elements to attributes for the result tree……Page 70
3.6 Copying elements to the result tree……Page 72
3.7 Counting elements and other nodes……Page 76
3.8 Deleting elements from the result tree……Page 78
3.9 Duplicate elements, deleting……Page 79
3.10 Empty elements: creating, checking for……Page 82
3.11.1 Reordering an element’s children with xsl:apply-templates……Page 84
3.11.2 Moving text with xsl:value-of……Page 86
3.12 Selecting elements based on: element name, content, children, parents……Page 87
3.13 Adding new attributes……Page 92
3.14 Converting attributes to elements……Page 94
3.15 Getting attribute values and names……Page 95
3.16 Testing for attribute existence and for specific attribute values……Page 96
3.17 Reusing groups of attributes……Page 97
4.1.1 Outputting comments……Page 99
4.1.2 Reading and using source tree comments……Page 101
4.2 Entities……Page 102
4.3 Namespaces……Page 107
4.3.1 Namespaces and your result document……Page 109
4.3.2 Namespaces and stylesheet logic……Page 113
4.4 Images, multimedia elements, and other unparsed entities……Page 119
4.5.1 Outputting processing instructions……Page 121
4.5.2 Reading and using source tree processing instructions……Page 123
5.1.1 Conditional statements with “If“ and “Choose“ (case) statements……Page 125
5.1.2 Curly braces: when do I need them?……Page 130
5.1.3 “For” loops, iteration……Page 133
5.2.1 xsl:include……Page 141
5.2.2 xsl:import……Page 143
5.3 Named templates……Page 147
5.4 Debugging……Page 148
5.4.1 Runtime messages, aborting processor execution……Page 149
5.4.2 Keeping track of your elements……Page 152
5.4.3 Tracing a processor’s steps……Page 155
5.4.4 Listing the nodes in an XPath expression……Page 157
5.5.1 Extension elements……Page 158
5.5.2 Using built-in extension functions……Page 161
5.6 Numbers and math……Page 164
5.7.1 Extracting and comparing strings……Page 168
5.7.2 Search and replace……Page 175
5.8.1 Variables……Page 179
5.8.2 Parameters……Page 184
5.9 Declaring keys and performing lookups……Page 188
5.10 Finding the first, last, biggest, and smallest……Page 193
5.11 Using the W3C XSLT specification……Page 197
5.11.1 Pairs of confusing related terms……Page 198
5.11.2 Other confusing terms……Page 200
6.1 HTML and XSLT……Page 202
6.1.1 HTML as input……Page 203
6.1.2 HTML as output……Page 205
6.2 Browsers and XSLT……Page 207
6.2.2 Netscape Navigator……Page 209
6.3 Multiple input documents……Page 210
6.4 Using modes to create tables of contents and other generated lists……Page 214
6.5 Non-XML output……Page 217
6.6 Numbering, automatic……Page 220
6.7 Sorting……Page 230
6.8 Stripping all markup from a document……Page 239
6.9 Valid XML output: including DOCTYPE declarations……Page 240
6.10 XML declarations……Page 243
6.11 Whitespace: preserving and controlling……Page 244
6.11.1 xsl:strip-space and xsl:preserve-space……Page 245
6.11.2 Indenting……Page 248
6.11.3 Adding and removing whitespace with xsl:text……Page 251
6.11.4 Adding tabs to your output……Page 254
6.11.5 Normalizing space……Page 256
6.12 Generating IDs and links……Page 258
6.13 XSL and XSLT: creating Acrobat files and other formatted output……Page 262
6.14 Splitting up output into multiple files……Page 268
Part 3 Appendices……Page 272
XSLT quick reference……Page 274
A.1 Top-level elements……Page 275
A.2 Instructions……Page 278
A.3 No category……Page 281
B.1 Running XSLT processors……Page 284
B.2 Saxon……Page 288
B.3 XT……Page 289
B.4 iXSLT……Page 290
B.5 Xalan-Java……Page 291
B.6 Xalan-C++……Page 292
B.7 Sablotron……Page 293
B.8 MSXSL……Page 294
glossary……Page 296
A……Page 302
C……Page 303
E……Page 304
G……Page 305
L……Page 306
N……Page 307
P……Page 308
S……Page 309
U……Page 310
X……Page 311
Z……Page 313

Reviews

There are no reviews yet.

Be the first to review “XSLT Quickly”
Shopping Cart
Scroll to Top