Description
A collection of detailed code recipes that breaks down everyday XSLT problems into manageable chunks. Learn how to transform XML documents into PDF files, SVG files, HTML documents, etc. Other topics include numerical transformation, XPath, date/time conversion, string manipulation, testing and debugging, and complex sorting and linking. Updated to cover XSLT 2.0.
Full Description
Table of Contents
-
Chapter 1 XPath
-
Introduction
-
Effectively Using Axes
-
Filtering Nodes
-
Working with Sequences
-
Shrinking Conditional Code with If Expressions
-
Eliminating Recursion with for Expressions
-
Taming Complex Logic Using Quantifiers
-
Using Set Operations
-
Using Node Comparisons
-
Coping with XPath 2.0's Extended Type System
-
Exploiting XPath 2.0's Extended Type System
-
-
Chapter 2 Strings
-
Introduction
-
Testing If a String Ends with Another String
-
Finding the Position of a Substring
-
Removing Specific Characters from a String
-
Finding Substrings from the End of a String
-
Duplicating a String N Times
-
Reversing a String
-
Replacing Text
-
Converting Case
-
Tokenizing a String
-
Making Do Without Regular Expressions
-
Exploiting Regular Expressions
-
Using the EXSLT String Extensions
-
-
Chapter 3 Numbers and Math
-
Introduction
-
Formatting Numbers
-
Rounding Numbers to a Specified Precision
-
Converting from Roman Numerals to Numbers
-
Converting from One Base to Another
-
Implementing Common Math Functions
-
Computing Sums and Products
-
Finding Minimums and Maximums
-
Computing Statistical Functions
-
Computing Combinatorial Functions
-
Testing Bits
-
-
Chapter 4 Dates and Times
-
Introduction
-
Calculating the Day of the Week
-
Determining the Last Day of the Month
-
Getting Names for Days and Months
-
Calculating Julian and Absolute Day Numbers from a Specified Date
-
Calculating the Week Number for aSpecified Date
-
Working with the Julian Calendar
-
Working with the ISO Calendar
-
Working with the Islamic Calendar
-
Working with the Hebrew Calendar
-
Formatting Dates and Times
-
Determining Secular and Religious Holidays
-
-
Chapter 5 Selecting and Traversing
-
Introduction
-
Ignoring Duplicate Elements
-
Selecting All but a Specific Element
-
Selecting Nodes by Context
-
Performing a Preorder Traversal
-
Performing a Postorder Traversal
-
Performing an In-Order Traversal
-
Performing a Level-Order Traversal
-
Processing Nodes by Position
-
-
Chapter 6 Exploiting XSLT 2.0
-
Introduction
-
Convert Simple Named Templates to XSLT Functions
-
Prefer for-each-group over Muenchian Method of Grouping
-
Modularizing and Modes
-
Using Types for Safety and Precision
-
Avoiding 1.0 to 2.0 Porting Pitfalls
-
Emulating Object-Oriented Reuse and Design Patterns
-
Processing Unstructured Text with Regular Expressions
-
Solving Difficult Serialization Problems with Character Maps
-
Outputting Multiple Documents
-
Handling String Literals Containing Quote Characters
-
Understanding the New Capabilities of Old XSLT 1.0 Features
-
-
Chapter 7 XML to Text
-
Introduction
-
Dealing with Whitespace
-
Exporting XML to Delimited Data
-
Creating a Columnar Report
-
Displaying a Hierarchy
-
Numbering Textual Output
-
Wrapping Text to a Specified Width and Alignment
-
-
Chapter 8 XML to XML
-
Introduction
-
Converting Attributes to Elements
-
Converting Elements to Attributes
-
Renaming Elements or Attributes
-
Merging Documents with Identical Schema
-
Merging Documents with Unlike Schema
-
Splitting Documents
-
Flattening an XML Hierarchy
-
Deepening an XML Hierarchy
-
Reorganizing an XML Hierarchy
-
-
Chapter 9 Querying XML
-
Introduction
-
Performing Set Operations on Node Sets
-
Performing Set Operations on Node Sets Using Value Semantics
-
Determining Set Equality by Value
-
Performing Structure-Preserving Queries
-
Joins
-
Implementing the W3C XML Query-UseCases in XSLT
-
-
Chapter 10 XML to HTML
-
Introduction
-
Using XSLT as a Styling Language
-
Creating Hyperlinked Documents
-
Creating HTML Tables
-
Creating Frames
-
Creating Data-Driven Stylesheets
-
Creating a Self-Contained HTML Transformation
-
Populating a Form
-
-
Chapter 11 XML to SVG
-
Introduction
-
Transforming an Existing Boilerplate SVG
-
Creating Reusable SVG Generation Utilities for Graphs and Charts
-
Creating a Tree Diagram
-
Creating Interactive SVG-Enabled Web Pages
-
-
Chapter 12 Code Generation
-
Introduction
-
Generating Constant Definitions
-
Generating Switching Code
-
Generating Message-Handling Stub Code
-
Generating Data Wrappers
-
Generating Pretty Printers
-
Generating a Test Data-Entry Web Client
-
Generating Test-Entry Web CGI
-
Generating Code from UML Models via XMI
-
Generating XSLT from XSLT
-
-
Chapter 13 Vertical XSLT Application Recipes
-
Introduction
-
Converting Visio VDX Documents to SVG
-
Working with Excel XML Spreadsheets
-
Generating XTM Topic Maps from UML Modelsvia XMI
-
Generating Web Sites from XTM Topic Maps
-
Serving SOAP Documentation from WSDL
-
-
Chapter 14 Extending and Embedding XSLT
-
Introduction
-
Saxon Extension Functions
-
Saxon Extension Elements
-
Xalan-Java 2 Extension Functions
-
Java Extension Function Using the Class Format Namespace
-
Java Extension Function Using the Package Format Namespace
-
Java Extension Function Using the Java Format Namespace
-
Scripting Extension Function Using Inline Script Code
-
Xalan-Java 2 Extension Elements
-
Java Extension Element
-
Scripting Extension Elements
-
MSXML Extension Functions
-
Using Saxon's and Xalan's Native Extensions
-
Extending XSLT with JavaScript
-
Adding Extension Functions Using Java
-
Adding Extension Elements Using Java
-
Using XSLT from Perl
-
Using XSLT from Java
-
-
Chapter 15 Testing and Debugging
-
Introduction
-
Using xsl:message Effectively
-
Tracing the Flow of Your Stylesheet Through Its Input Document
-
Automating the Insertion of Debug Output
-
Including Embedded Unit Test Data in Utility Stylesheets
-
Structuring Unit Tests
-
Testing Boundary and Error Conditions
-
-
Chapter 16 Generic and Functional Programming
-
Introduction
-
Creating Polymorphic XSLT
-
Creating Generic Element Aggregation Functions
-
Creating Generic Bounded Aggregation Functions
-
Creating Generic Mapping Functions
-
Creating Generic Node-Set Generators
-
-
Colophon
Product Details
- Title:
- XSLT Cookbook, Second Edition
- By:
- Sal Mangano
- Publisher:
- O'Reilly Media
- Formats:
-
- Ebook
- Safari Books Online
- Print Release:
- December 2005
- Ebook Release:
- February 2009
- Pages:
- 784
- Print ISBN:
- 978-0-596-00974-8
- | ISBN 10:
- 0-596-00974-7
- Ebook ISBN:
- 978-0-596-10556-3
- | ISBN 10:
- 0-596-10556-8
Customer Reviews
