Book description
Referring to specific information inside an XML document is a little like finding a needle in a haystack: how do you differentiate the information you need from everything else? XPath and XPointer are two closely related languages that play a key role in XML processing by allowing developers to find these needles and manipulate embedded information. XPath describes a route for finding specific items by defining a path through the hierarchy of an XML document, abstracting only the information that's relevant for identifying the data. XPointer extends XPath to identify more complex parts of documents. The two technologies are critical for developers seeking needles in haystacks in various types of processing.XPath and XPointer fills an essential need for XML developers by focusing directly on a critical topic that has been covered only briefly. Written by John Simpson, an author with considerable XML experience, the book offers practical knowledge of the two languages that underpin XML, XSLT and XLink. XPath and XPointer cuts through basic theory and provides real-world examples that you can use right away.Written for XML and XSLT developers and anyone else who needs to address information in XML documents, the book assumes a working knowledge of XML and XSLT. It begins with an introduction to XPath basics. You'll learn about location steps and paths, XPath functions and numeric operators. Once you've covered XPath in depth, you'll move on to XPointer--its background, syntax, and forms of addressing. By the time you've finished the book, you'll know how to construct a full XPointer (one that uses an XPath location path to address document content) and completely understand both the XPath and XPointer features it uses.XPath and XPointer contains material on the forthcoming XPath 2.0 spec and EXSLT extensions, as well as versions 1.0 of both XPath and XPointer. A succinct but thorough hands-on guide, no other book on the market provides comprehensive information on these two key XML technologies in one place.
Publisher resources
Table of contents
- A Note Regarding Supplemental Files
- Preface
- 1. Introducing XPath and XPointer
- 2. XPath Basics
- 3. Location Steps and Paths
-
4. XPath Functions and Numeric Operators
- 4.1. Introduction to Functions
-
4.2. XPath Function Types
- 4.2.1. Node-Set Functions
-
4.2.2. String Functions
- 4.2.2.1. string(anytype?)
- 4.2.2.2. concat(string1, string2, ...)
- 4.2.2.3. starts-with(string1, string2)
- 4.2.2.4. contains(string1, string2)
- 4.2.2.5. substring(string, number1, number2?)
- 4.2.2.6. substring-before(string1, string2) and substring-after(string1, string2)
- 4.2.2.7. string-length(string?)
- 4.2.2.8. normalize-space(string?)
- 4.2.2.9. translate(string1, string2, string3)
- 4.2.3. Boolean Functions
- 4.2.4. Numeric Functions
- 4.3. XPath Numeric Operators
- 5. XPath in Action
-
6. XPath 2.0
-
6.1. General Goals
- 6.1.1. Simplify Manipulation of XML Schema-Typed Content
- 6.1.2. Simplify Manipulation of String Content
- 6.1.3. Support Related XML Standards
- 6.1.4. Improve Ease of Use
- 6.1.5. Improve Interoperability
- 6.1.6. Improve i18n Support
- 6.1.7. Maintain Backward Compatibility
- 6.1.8. Enable Improved Processor Efficiency
-
6.2. Specific Requirements
-
6.2.1. XPath 2.0 MUSTs
- 6.2.1.1. Express its data model in terms of the XML Infoset (1.1)
- 6.2.1.2. Provide common core syntax and semantics for XSLT and XML Query (1.2)
- 6.2.1.3. Support explicit “for any” and “for all” Boolean operations (1.3)
- 6.2.1.4. Extend the existing set of aggregate functions (1.4)
- 6.2.1.5. Loosen restrictions on location steps (2.1)
- 6.2.1.6. Provide a conditional expression (2.2)
- 6.2.1.7. Define consistent implicit semantics for collection-valued subexpressions (2.3)
- 6.2.1.8. Support string matching with regular expressions (3)
- 6.2.1.9. Define the operator matrix and conversions (4.1)
- 6.2.1.10. Allow scientific notation for numbers (4.2)
- 6.2.1.11. Define cast and constructor functions (4.3)
- 6.2.1.12. Support accessing the simple-type values of elements and attributes (4.5)
- 6.2.1.13. Define the behavior of operators for null arguments (4.6)
-
6.2.2. XPath 2.0 SHOULDs
- 6.2.2.1. Maintain backward compatibility with XPath 1.0 (1.5)
- 6.2.2.2. Provide intersection and difference functions (1.6)
- 6.2.2.3. Support the unary plus operator (1.7)
- 6.2.2.4. Simplify string replacement (2.4.1)
- 6.2.2.5. Simplify string padding (2.4.2)
- 6.2.2.6. Simplify string case conversions (2.4.3)
- 6.2.2.7. Support aggregation functions over collection-valued expressions (2.5)
- 6.2.2.8. Add a “list” data type (4.4)
- 6.2.2.9. Select elements/attributes based on an explicit XML Schema type (5.1)
- 6.2.2.10. Select elements/attributes based on an XML Schema type hierarchy (5.2)
- 6.2.2.11. Select elements based on XML Schema substitution groups (5.3)
- 6.2.2.12. Support lookups based on XML Schema unique constraints and keys (5.4)
-
6.2.1. XPath 2.0 MUSTs
-
6.1. General Goals
- 7. XPointer Background
-
8. XPointer Syntax
- 8.1. Shorthand Pointers
- 8.2. Scheme-Based XPointer Syntax
- 8.3. Using XPointers in a URI
- 9. XPointer Beyond XPath
- A. Extension Functions for XPath in XSLT
- Colophon
- Copyright
Product information
- Title: XPath and XPointer
- Author(s):
- Release date: July 2002
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596002916
You might also like
book
XPath: Navigating XML with XPath 1.0 and 2.0 Kick Start
XPath is to XML as SQL is to databases: XML applications need XPath to locate specific …
book
XSLT and XPATH: A Guide to XML Transformations
Gain total control over your information with XSLT and XPath! Master XSLT and XPath—the "keys to …
book
Beginning XSLT and XPath: Transforming XML Documents and Data
Provides the basic education in the XSLT processing model that developers have requested The growth of …
book
XQuery
With the XQuery 1.0 standard, you finally have a tool that will make it much easier …