B

XPath Functions

This appendix includes a complete list (as of when this book was written) of functions that can be called by XPath expressions (including those from XQuery and XSLT) to process and manipulate values. The functions are marked as to the XPath version in which they were introduced: XPath 1 in 1999, XPath 2 in 2006, or XPath 3, still a draft for this edition of Beginning XML but considered close to final. The list does not include extensions to XPath by other languages such as Java or PHP or SQL, and does not include the XPath 1.1 draft since that was obsoleted by XPath 2.

image NOTE If you are using an XPath 1 engine, such as those found in web browsers, PHP, Python, Perl, and many other languages, keep to the functions marked for 1.0.
image NOTE See www.expath.org for some extra functions that are fairly widely implemented, and also for some implementations of XSLT 2 and XPath 2 functions that work in XSLT 1.

The tables in this appendix give an alphabetical list of functions roughly sorted into the following categories:

  • Boolean functions
  • Time and Data
  • Files and the Environment
  • Functions that Operate on Functions
  • Functions that Operate on Items
  • Numeric Functions
  • Functions that Operate on Nodes
  • Functions that Operate on QNames
  • Functions that Operate on Sequences ...

Get Beginning XML, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.