Definitive XSLT and XPath

Definitive XSLT and XPath



Product Details

ISBN-13: 9780130651969
Publisher: Pearson Education
Publication date: 12/10/2001
Series: Charles F. Goldfarb Definitive Xml Series
Pages: 400
Product dimensions: 7.06(w) x 9.22(h) x 1.08(d)

Table of Contents

Chapter 1XSLT and XPath in context1
1.1The XML family of Recommendations5
1.1.1Extensible Markup Language (XML)5
1.1.2XML Path Language (XPath)12
1.1.3Styling structured information15
1.1.4Extensible Stylesheet Language (XSL)17
1.1.5Extensible Stylesheet Language Transformations (XSLT)20
1.1.7Stylesheet association38
1.2Transformation data flows41
1.2.1Transformation from XML to XML41
1.2.2Transformation from XML to XSL formatting semantics42
1.2.3Transformation from XML to non-XML43
1.2.4XSLT as an application front-end49
1.2.5Three-tiered architectures50
Chapter 2Getting started with XSLT and XPath53
2.1Stylesheet examples55
2.1.1Some simple examples56
2.2Syntax basics--stylesheets, templates, instructions60
2.2.1Stylesheet requirements60
2.2.2Instructions and literal result elements61
2.2.3Templates and template rules63
2.2.4Simplified stylesheets65
2.2.5Composite stylesheets66
2.2.6Approaches to stylesheet design67
2.3More stylesheet examples70
2.3.1Processing XML data with multiple XSLT stylesheets70
Chapter 3XPath data model77
3.1XPath data model components83
3.1.1The file abstractions83
3.1.2Comment node and processing instruction node83
3.1.3Element node84
3.1.4Namespace node85
3.1.5Attribute node86
3.1.6Text node88
3.1.7Whitespace-only text nodes89
3.1.8Root node91
3.1.9Summary of XPath data model nodes91
3.1.10Depiction of a complete node tree93
3.2XPath expressions and patterns97
3.2.2Location path expression evaluation context99
3.2.3Location path expression structure100
3.2.4Example node-set and pattern expressions107
3.2.5Location path expression evaluation summary110
3.2.6Processing of node-sets from reverse axes111
Chapter 4XSLT processing model113
4.1XSLT processing model118
4.1.1Example transformation requirement118
4.1.2Approaches to transformation121
4.1.3Calculating result text122
4.1.4Iterative template instantiation126
4.1.5Template rules127
4.1.7Empty templates130
4.1.8Built-in template rules131
4.1.9Template rule conflict resolution132
4.1.10Processing model summary135
4.1.12Suggested stylesheet development approach136
4.2Sample XSLT stylesheets137
4.2.1Card sample stylesheets137
Chapter 5The XSLT transformation environment139
5.1Stylesheet basics142
5.1.1The stylesheet document/container element142
5.1.2Documenting stylesheets145
5.1.3Namespace protection146
5.2Communicating with the XSLT processor148
5.2.1Serializing the result tree148
5.2.2Illustration of output methods150
5.2.3Communicating with the outside environment152
5.2.4Uncontrolled processes154
Chapter 6XSLT stylesheet management155
6.1Modularizing the logical structure of stylesheets160
6.1.1Internal general entities160
6.1.2Variables and parameters163
6.1.3Named templates169
6.1.4Explicit loop repetition173
6.2Modularizing the physical structure of stylesheets174
6.2.1External parsed general entities174
6.2.2Included files175
6.2.3Imported files176
6.2.4Extension mechanisms178
Chapter 7XSLT process control and result tree instructions181
7.1Conditional control instructions185
7.1.1"If--Then" conditionality185
7.1.2"If--Else If--Else" conditionality186
7.1.3Conditional variable assignment187
7.1.4Node type testing188
7.2Numbering instructions189
7.2.1Source tree numbering189
7.2.2Representing numbers in the result tree196
7.3Result tree node instantiation198
7.3.1Building result tree nodes with instructions198
7.3.2Building result tree nodes with literal result elements203
7.3.3Copying source tree nodes to the result tree204
7.3.4Escaping text placed in the result tree208
Chapter 8XPath and XSLT expressions and advanced techniques215
8.1Expression functions219
8.1.1Calculating values using number, string and boolean expression functions219
8.1.2Calculating values using number functions220
8.1.3Calculating values using string functions222
8.1.4Decimal formatting224
8.1.5Calculating values using boolean functions228
8.1.6Calculating values using node-set-related expression functions231
8.1.7Node-set intersection and difference234
8.1.8String variables in location steps236
8.2Content and document referencing techniques237
8.2.1Element referencing with XML identifiers237
8.2.2Content referencing with XSLT keys238
8.2.3Current node referencing242
8.2.4Unparsed entity referencing in XSLT244
8.2.5Document referencing in XSLT245
8.3Traversing the source tree250
8.3.1Inferring structure when there is none250
8.3.2Templates as pseudo-subroutines252
8.3.3Passing variables to pseudo-subroutines255
Chapter 9Sorting and grouping259
9.1Sorting source nodes to make result nodes262
9.1.1The sort instruction262
9.2Grouping constructs found in the source node tree266
9.2.1Grouping and uniqueness using axes266
9.2.2Grouping and uniqueness using keys270
9.2.3Grouping and uniqueness within sub-trees using keys272
9.3Other uses of sorting277
9.3.1Finding the minimum and maximum values277
Appendix AXML to HTML transformation279
A.1The W3C web presentation standards context282
A.1.1Hypertext Markup Language (HTML)282
A.1.2Extensible HyperText Markup Language (XHTML)283
A.1.3Cascading Stylesheets (CSS)284
A.1.4Browser screen painting285
A.2Well-formed HTML286
A.2.1What makes well-formed and valid HTML?286
A.3HTML markup generation techniques287
A.3.1Image elements287
A.3.2HTML meta-data289
A.3.3Anchor elements290
Appendix BXSL formatting semantics introduction295
B.1Formatting model301
B.1.1Summary of formatting model components301
B.2Formatting objects304
B.2.1Formatting object vocabulary304
B.3Example stylesheet with formatting constructs305
B.3.1Example stylesheet with formatting constructs305
Appendix CInstruction, function, and grammar summaries309
C.1Vocabulary and functions311
C.1.1XSLT instruction element summary311
C.1.2XPath and XSLT function summary314
C.2.1XPath grammar productions317
C.2.2XSLT grammar productions321
Appendix DSample tool information323
D.1James Clark's XT328
D.1.1XT differences from W3C XSLT/XPath Recommendations328
D.1.2Extension element: Multiple output documents329
D.1.3Extension functions: Node set manipulation334
D.1.4Extension functions: Java library access336
D.1.5Extension method: Non-XML serialization339
D.1.6Character encoding for the serialized result342
D.1.7Invoking XT343
D.2Microsoft Internet Explorer 5345
D.2.1Invoking the Microsoft MSXML processor345
Appendix EFrom XML to press: An XSLT case study351
E.1Authoring and Compilation353
E.2Transformation and compositing356

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews