XPath 2.0 - Function Library

Function Library

The function library in XPath 2.0 is greatly extended from the function library in XPath 1.0. (Bold items are available in XPath 1.0)

The functions available include the following:

Purpose Example Functions
General string handling lower-case, upper-case, substring, substring-before, substring-after, translate, starts-with, ends-with, contains, string-length, concat, normalize-space, normalize-unicode
Regular expressions matches, replace, tokenize
Arithmetic count, sum, avg, min, max, round, floor, ceiling, abs
Dates and times adjust-dateTime-to-timezone, current-dateTime, day-from-dateTime, month-from-dateTime, days-from-duration, months-from-duration, etc.
Properties of nodes name, node-name, local-name, namespace-uri, base-uri, nilled
Document handling doc, doc-available, document-uri, collection, id, idref
URIs encode-for-uri, escape-html-uri, iri-to-uri, resolve-uri
QNames QName, namespace-uri-from-QName, prefix-from-QName, resolve-QName
Sequences insert-before, remove, subsequence, index-of, distinct-values, reverse, unordered, empty, exists
Type checking one-or-more, exactly-one, zero-or-one

Read more about this topic:  XPath 2.0

Famous quotes containing the words function and/or library:

    Our father has an even more important function than modeling manhood for us. He is also the authority to let us relax the requirements of the masculine model: if our father accepts us, then that declares us masculine enough to join the company of men. We, in effect, have our diploma in masculinity and can go on to develop other skills.
    Frank Pittman (20th century)

    That a famous library has been cursed by a woman is a matter of complete indifference to a famous library. Venerable and calm, with all its treasures safe locked within its breast, it sleeps complacently and will, so far as I am concerned, so sleep forever. Never will I wake these echoes, never will I ask for that hospitality again ...
    Virginia Woolf (1882–1941)