Debian Codegraph @

net/sf/saxon/functions/registry/UseWhen30FunctionSet.java

raw symbols SCIP
1 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 // Copyright (c) 2018 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 package net.sf.saxon.functions.registry;
9
10 import net.sf.saxon.functions.*;
11 import net.sf.saxon.type.BuiltInAtomicType;
12
13 /**
14 * Function signatures (and pointers to implementations) of the functions available for use
15 * in static expressions (including use-when expressions) in XSLT 3.0 stylesheets
16 */
17
18 public class UseWhen30FunctionSet extends BuiltInFunctionSet {
19
20 private static UseWhen30FunctionSet THE_INSTANCE = new UseWhen30FunctionSet();
21
22 public static UseWhen30FunctionSet getInstance() {
23 return THE_INSTANCE;
24 }
25
26 protected UseWhen30FunctionSet() {
27 init();
28 }
29
30 protected void init() {
31
32 addXPathFunctions();
33
34 register("available-system-properties", 0, AvailableSystemProperties.class, BuiltInAtomicType.QNAME,
35 STAR, XSLT30 | USE_WHEN, LATE);
36
37 register("element-available", 1, ElementAvailable.class, BuiltInAtomicType.BOOLEAN, ONE, XSLT | USE_WHEN, NS)
38 .arg(0, BuiltInAtomicType.STRING, ONE, null);
39
40 register("function-available", 1, FunctionAvailable.class, BuiltInAtomicType.BOOLEAN, ONE, XSLT | USE_WHEN, NS | LATE)
41 .arg(0, BuiltInAtomicType.STRING, ONE, null);
42
43 register("function-available", 2, FunctionAvailable.class, BuiltInAtomicType.BOOLEAN, ONE, XSLT | USE_WHEN, NS | LATE)
44 .arg(0, BuiltInAtomicType.STRING, ONE, null)
45 .arg(1, BuiltInAtomicType.INTEGER, ONE, null);
46
47 register("system-property", 1, SystemProperty.class, BuiltInAtomicType.STRING, ONE, XSLT | USE_WHEN, NS | LATE)
48 .arg(0, BuiltInAtomicType.STRING, ONE, null);
49
50 register("type-available", 1, TypeAvailable.class, BuiltInAtomicType.BOOLEAN, ONE, XSLT | USE_WHEN, NS)
51 .arg(0, BuiltInAtomicType.STRING, ONE, null);
52
53
54 }
55
56 protected void addXPathFunctions() {
57 importFunctionSet(XPath31FunctionSet.getInstance());
58 }
59
60
61 }
62