وبلاگ بلیان

XSLT: mastering XML transformations

معرفی کتاب «XSLT: mastering XML transformations» نوشتهٔ Doug Tidwell، منتشرشده توسط نشر O'Reilly Media در سال 2008. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «XSLT: mastering XML transformations» در دستهٔ بدون دسته‌بندی قرار دارد.

After years of anticipation and delay, the W3C finally released the XSLT 2.0 standard in January 2007. The revised edition of this classic book offers practical, real-world examples that demonstrate how you can apply XSLT stylesheets to XML data using either the new specification, or the older XSLT 1.0 standard. XSLT is a critical language for converting XML documents into other formats, such as HTML code or a PDF file. With XSLT , you get a thorough understanding of XSLT and XPath and their relationship to other web standards, along with recommendations for a honed toolkit in an open platform-neutral, standards-based environment. This book: • Covers the XSLT basics, including simple stylesheets and methods for setting up transformation engines • Walks you through the many parts of XSLT, particularly XSLT's template-based approach to transformations • Applies both XSLT 1.0 and 2.0 solutions to the same problems, helping you decide which version of XSLT is more appropriate for your project • Includes profuse examples that complement both the tutorial and the reference material The new edition of XSLT has been updated thoroughly to explain XSLT 2.0's many dependencies, notably XML Schema and XPath 2.0. Want to find out how the 2.0 specification improves on the old? This book will explain. XSLT, Second Edition 6 Table of Contents 9 Preface 13 About This Book 13 Where I’m Coming From 13 I Believe in Open, Platform-Neutral, Standards-Based Computing 13 I Assume You’re Busy 13 I Don’t Care Which Standards-Compliant Tools You Use 14 XSLT Is a Tool, Not a Religion 15 You Shouldn’t Migrate All of Your Stylesheets Just Because There’s a New Version of XSLT 15 How This Book Is Organized 15 Conventions Used in This Book 17 How to Contact Us 18 Safari® Enabled 19 Acknowledgments for the Second Edition 19 Acknowledgments from the First Edition 20 Chapter 1. Getting Started 21 The Design of XSLT 21 [2.0] The Design of XSLT 2.0 23 XML Basics 24 XML’s Heritage 24 XML Document Rules 26 An XML document must be contained in a single element 26 All elements must be nested 27 All attributes must be quoted 27 XML tags are case-sensitive 28 All end tags are required 28 Empty tags can contain the end marker 28 XML declarations 28 Document Type Definitions (DTDs) and XML Schemas 28 Well-formed versus valid documents 30 Tags versus elements 31 Namespaces 31 [2.0] Datatypes 32 Programming Interfaces for XML: DOM, SAX, and Others 32 DOM 32 SAX 35 Other programming interfaces 35 XSLT Standards 36 XSL transformations (XSLT) version 1.0 36 XML path language (XPath) version 1.0 36 XSL transformations (XSLT) version 2.0 36 XML path language (XPath) version 2.0 37 XQuery 1.0 and XPath 2.0 Data Model (XDM) 37 XQuery 1.0 and XPath 2.0 functions and operators 37 XQuery 1.0 and XPath 2.0 formal semantics 37 XSLT 2.0 and XQuery 1.0 serialization 37 XQuery 1.0: an XML query language 37 XML syntax for XQuery 1.0 (XQueryX) 37 XML Standards 38 XML 1.0 38 XML 1.1 38 The Extensible Stylesheet Language (XSL) 38 XML Schemas 38 RelaxNG 39 Schematron 39 The Simple API for XML (SAX) 39 Document Object Model (DOM) 39 Namespaces in XML 39 Associating stylesheets with XML documents 39 Scalable Vector Graphics (SVG) 40 XML pointer language (XPointer) version 1.0 40 XML linking language (XLink) version 1.0 40 Installing XSLT Processors 40 Installing Xalan 40 Installing Saxon 41 Installing the Microsoft XSLT Processor 42 Installing the Altova XSLT Engine 43 Summary 44 Chapter 2. The Obligatory Hello World Example 45 Goals of This Chapter 45 Transforming Hello World 45 Our Sample Document 45 A Sample Stylesheet 46 Transforming the XML Document 46 Stylesheet Results 47 How a Stylesheet Is Processed 47 Parsing the Stylesheet 47 Parsing the Transformee 48 Lather, Rinse, Repeat 48 Walking Through Our Example 49 Stylesheet Structure 50 The Element 50 The Element 50 Our First 51 The for Elements 51 Built-in Template Rules 51 Built-in template rule for element and document nodes 52 Built-in template rule for modes 52 Built-in template rule for text and attribute nodes 52 Built-in template rule for comment and processing instruction nodes 52 Built-in template rule for namespace nodes 52 Top-Level Elements 53 Other Approaches 54 Sample Gallery 56 The Hello World SVG File 56 The Hello World PDF File 58 The Hello World Java Program 59 The Hello World VRML File 61 Summary 64 Chapter 3. XPath: A Syntax for Describing Needles and Haystacks 65 The XPath Data Model 66 Node Types 66 The root node 68 Element nodes 68 Attribute nodes 69 Text nodes 69 Comment nodes 70 Processing instruction nodes 70 Namespace nodes 70 Node Tests 70 [2.0] New node tests in XPath 2.0 71 [2.0] Sequences and Atomic Values 72 Location Paths 75 The Context 75 [1.0] The XPath 1.0 context 75 [2.0] The XPath 2.0 context 76 Simple Location Paths 78 Relative and Absolute Expressions 78 Selecting Things Besides Elements with Location Paths 79 Selecting attributes 79 Selecting the text of an element 79 Selecting comments, processing instructions, and namespace nodes 80 Using Wildcards 81 Axes 82 Unabbreviated syntax 83 Axis roll call 83 Predicates 85 Numbers in predicates 85 Functions in predicates 85 Attribute Value Templates 86 Datatypes 87 Datatypes in XPath 1.0 87 Datatypes in XPath 2.0 88 XPath Operators 91 Mathematical Operators 91 Addition (+) 91 Subtraction (–) 95 Multiplication (*) 96 Division (div) 97 [2.0] Integer division (idiv) 99 Modulo (mod) 100 Unary minus (–x) 101 Unary plus (+x) 101 Boolean Operators 102 Comparing expressions 102 [2.0] Comparing atomic values 103 [2.0] Comparing sequences 104 [2.0] Conditional Expressions—if, then, and else 108 [2.0] Iterators Over Sequences—The for Operator 109 [2.0] Quantified Expressions—some and every 109 [2.0] Range Expressions—The to Operator 111 [2.0] Constructor Functions 112 [2.0] Datatype Operators—instance of, castable as, cast as, and treat as 113 instance of 113 cast as 114 castable as 115 treat as 116 [2.0] Set Operators—except, intersect, and union 117 except 118 intersect 119 union 119 [2.0] Node Operators 120 The is operator 120 node-after (>>) 121 node-before (
دانلود کتاب XSLT: mastering XML transformations