Book description
XSLT documents a core technology for processing XML. Originally created for page layout, XSLT (Extensible Stylesheet Transformations) is now much more: a general-purpose translation tool, a system for reorganizing document content, and a way to generate multiple results-- such as HTML, WAP, and SVG--from the same content. What sets XSLT apart from other books on this critical tool is the depth of detail and breadth of knowledge that Doug Tidwell, a developer with years of XSLT experience, brings to his concise treatment of the many talents of XSLT. He covers XSLT and XPath, a critical companion standard, and addresses topics ranging from basic transformations to complex sorting and linking. He explores extension functions on a variety of different XSLT processors and shows ways to combine multiple documents using XSLT. Code examples add a real-world dimension to each technique. Useful as XSLT is, its peculiar characteristics make it difficult to get started in, and the ability to use advanced techniques depends on a clear and exact understanding of how XSLT templates work and interact. For instance, the understanding of "variables" in XSLT is deeply different from the understanding of "variables" in procedural languages. The author explains XSLT by building from the basics to its more complex and powerful possibilities, so that whether you're just starting out in XSLT or looking for advanced techniques, you'll find the level of information you need.
Table of contents
-
XSLT
- Dedication
- Preface
-
1. Getting Started
- The Design of XSLT
-
XML Basics
- XML’s Heritage
-
XML Document Rules
- An XML document must be contained in a single element
- All elements must be nested
- All attributes must be quoted
- XML tags are case-sensitive
- All end tags are required
- Empty tags can contain the end marker
- XML declarations
- Document Type Definitions (DTDs) and XML Schemas
- Well-formed versus valid documents
- Tags versus elements
- Namespaces
- DOM and SAX
-
XML Standards
- XML 1.0
- The Extensible Stylesheet Language (XSL)
- XML Schemas
- The Simple API for XML (SAX)
- Document Object Model (DOM) Level 1
- Document Object Model (DOM) Level 2
- Namespaces in XML
- Associating stylesheets with XML documents
- Scalable Vector Graphics (SVG)
- Canonical XML Version 1.0
- XML digital signatures
- XML Pointer Language (XPointer) Version 1.0
- XML Linking Language (XLink) Version 1.0
- Installing Xalan
- Summary
-
2. The Obligatory Hello World Example
- Goals of This Chapter
- Transforming Hello World
- How a Stylesheet Is Processed
- Stylesheet Structure
- Sample Gallery
- Summary
- 3. XPath: A Syntax for Describing Needles and Haystacks
- 4. Branching and Control Elements
- 5. Creating Links and Cross-References
- 6. Sorting and Grouping Elements
- 7. Combining XML Documents
- 8. Extending XSLT
- 9. Case Study: The Toot-O-Matic
-
A. XSLT Reference
- <xsl:apply-imports>
- <xsl:apply-templates>
- <xsl:attribute>
- <xsl:attribute-set>
- <xsl:call-template>
- <xsl:choose>
- <xsl:comment>
- <xsl:copy>
- <xsl:copy-of>
- <xsl:decimal-format>
- <xsl:element>
- <xsl:fallback>
- <xsl:for-each>
- <xsl:if>
- <xsl:import>
- <xsl:include>
- <xsl:key>
- <xsl:message>
- <xsl:namespace-alias>
- <xsl:number>
- <xsl:otherwise>
- <xsl:output>
- <xsl:param>
- <xsl:preserve-space>
- <xsl:processing-instruction>
- <xsl:sort>
- <xsl:strip-space>
- <xsl:stylesheet>
- <xsl:template>
- <xsl:text>
- <xsl:transform>
- <xsl:value-of>
- <xsl:variable>
- <xsl:when>
- <xsl:with-param>
- B. XPath Reference
-
C. XSLT and XPath Function Reference
- boolean() Function
- ceiling() Function
- concat() Function
- contains() Function
- count() Function
- current() Function
- document() Function
- element-available() Function
- false() Function
- floor() Function
- format-number() Function
- function-available() Function
- generate-id() Function
- id() Function
- key() Function
- lang() Function
- last() Function
- local-name() Function
- name() Function
- namespace-uri() Function
- normalize-space() Function
- not() Function
- number() Function
- position() Function
- round() Function
- starts-with() Function
- string() Function
- string-length() Function
- substring() Function
- substring-after() Function
- substring-before() Function
- sum() Function
- system-property() Function
- translate() Function
- true() Function
- unparsed-entity-uri() Function
-
D. XSLT Guide
- How Do I Put Quotes Inside an Attribute Value?
- How Do I Convert All Attributes to Elements?
- How Do I List All the Elements in an XML Document?
- How Do I Implement an if Statement?
- How Do I Implement an if-else Statement?
- How Do I Implement a for Loop?
- How Do I Implement a case Statement?
- How Do I Group Elements in an XML Document?
- How Do I Group Elements Pulled from Multiple XML Documents?
- How Do I Combine XML Documents into a Single Master Document?
- How Do I Resolve Cross-References?
- How Do I Generate Some Text?
- How Do I Control Angle Brackets and Quote Marks in My Output?
- Glossary
- Index
- Colophon
Product information
- Title: XSLT
- Author(s):
- Release date: August 2001
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596000530
You might also like
book
Learning XSLT
XSLT is a powerful language for transforming XML documents into something else. That something else can …
book
XSLT, 2nd Edition
After years of anticipation and delay, the W3C finally released the XSLT 2.0 standard in January …
book
XSLT Cookbook
Critical for converting XML documents, and extremely versatile, the XSLT language nevertheless has complexities that can …
book
XSLT Cookbook, 2nd Edition
Forget those funky robot toys that were all the rage in the '80s, XSLT (Extensible Stylesheet …