Project

Profile

Help

Download (2.76 KB) Statistics
| Branch: | Tag: | Revision:

he / latest10 / hej / net / sf / saxon / functions / package.html @ 02f8308b

1 02f8308b O'Neil Delpratt
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
2
<!-- Copyright (c) 2014 Saxonica Limited. -->
3
<!-- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -->
4
<!-- If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
5
<!-- This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. -->
6
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
7
8
<html>
9
10
<head>
11
    <title>Package overview for net.sf.saxon.functions</title>
12
</head>
13
14
<body>
15
16
<p>This package provides implementations of all the core functions available for use
17
    in XPath expressions. This includes all the functions defined in the XPath 2.0
18
    <i>Functions and Operators</i> specification, as well as the additional functions
19
    defined for use in XSLT. The package also includes Saxon extension functions. Most
20
    of these are in a single class <code>Extensions</code>, but some of the more
21
    complex functions are in their own classes, for example <code>Evaluate</code> implements
22
    <code>saxon:evaluate()</code>.</p>
23
24
<p>There is one class for group of closely-related functions. These all inherit from the class
25
    net.sf.saxon.expr.Function. The class <code>StandardFunction</code> is used to map a function
26
    name to its implementation; it contains tables of information describing the signature of each
27
    function, so that the type-checking code is completely generic.</p>
28
29
<p>The package also contains machinery for defining user extension functions. A collection
30
    of functions is represented by a <code>FunctionLibrary</code> object. There are several
31
    standard function libraries available, covering core functions, Saxon extension functions
32
    constructor functions, and user extension functions: each category is covered by a subclass
33
    of <code>FunctionLibrary</code>, and there is also a <code>FunctionLibraryList</code> that
34
    represents the total collection of functions in these individual libraries. The
35
    <code>JavaExtensionLibrary</code> contains the logic for binding Java extension functions
36
    given their name and arity and the types of their arguments. The class <code>ExtensionFunctionCall</code>
37
    contains the run-time logic for converting XPath values to the required Java types, and for converting
38
    the result back to an XPath value.</p>
39
40
<p>These classes, although public, will not normally be used directly by user-written
41
    Java applications. There are a few exceptions, such as <code>ResolveURI</code> which deliberately
42
expose functionality equivalent to the XPath function in a static method.</p>
43
44
45
</body>
46
</html>