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:
“The information links are like nerves that pervade and help to animate the human organism. The sensors and monitors are analogous to the human senses that put us in touch with the world. Data bases correspond to memory; the information processors perform the function of human reasoning and comprehension. Once the postmodern infrastructure is reasonably integrated, it will greatly exceed human intelligence in reach, acuity, capacity, and precision.”
—Albert Borgman, U.S. educator, author. Crossing the Postmodern Divide, ch. 4, University of Chicago Press (1992)
“Our civilization has decided ... that determining the guilt or innocence of men is a thing too important to be trusted to trained men.... When it wants a library catalogued, or the solar system discovered, or any trifle of that kind, it uses up its specialists. But when it wishes anything done which is really serious, it collects twelve of the ordinary men standing round. The same thing was done, if I remember right, by the Founder of Christianity.”
—Gilbert Keith Chesterton (18741936)