| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
package net.sf.saxon.functions.registry; |
| 9 |
|
| 10 |
import net.sf.saxon.functions.*; |
| 11 |
import net.sf.saxon.type.AnyItemType; |
| 12 |
import net.sf.saxon.type.BuiltInAtomicType; |
| 13 |
import net.sf.saxon.type.Type; |
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
public class XSLT30FunctionSet extends BuiltInFunctionSet { |
| 22 |
|
| 23 |
private static XSLT30FunctionSet THE_INSTANCE = new XSLT30FunctionSet(); |
| 24 |
|
| 25 |
public static XSLT30FunctionSet getInstance() { |
| 26 |
return THE_INSTANCE; |
| 27 |
} |
| 28 |
|
| 29 |
private XSLT30FunctionSet() { |
| 30 |
init(); |
| 31 |
} |
| 32 |
|
| 33 |
private void init() { |
| 34 |
|
| 35 |
importFunctionSet(XPath31FunctionSet.getInstance()); |
| 36 |
|
| 37 |
register("accumulator-after", 1, AccumulatorFn.AccumulatorAfter.class, AnyItemType.getInstance(), |
| 38 |
STAR, XSLT30, LATE | CITEM) |
| 39 |
.arg(0, BuiltInAtomicType.STRING, ONE, null); |
| 40 |
|
| 41 |
register("accumulator-before", 1, AccumulatorFn.AccumulatorBefore.class, AnyItemType.getInstance(), |
| 42 |
STAR, XSLT30, LATE | CITEM) |
| 43 |
.arg(0, BuiltInAtomicType.STRING, ONE, null); |
| 44 |
|
| 45 |
register("available-system-properties", 0, AvailableSystemProperties.class, BuiltInAtomicType.QNAME, |
| 46 |
STAR, XSLT30 | USE_WHEN, LATE); |
| 47 |
|
| 48 |
register("current", 0, Current.class, Type.ITEM_TYPE, ONE, XSLT, LATE); |
| 49 |
|
| 50 |
register("current-group", 0, CurrentGroup.class, Type.ITEM_TYPE, STAR, XSLT, LATE); |
| 51 |
|
| 52 |
register("current-grouping-key", 0, CurrentGroupingKey.class, BuiltInAtomicType.ANY_ATOMIC, STAR, XSLT, LATE); |
| 53 |
|
| 54 |
register("current-merge-group", 0, CurrentMergeGroup.class, AnyItemType.getInstance(), |
| 55 |
STAR, XSLT30, LATE); |
| 56 |
|
| 57 |
register("current-merge-group", 1, CurrentMergeGroup.class, AnyItemType.getInstance(), |
| 58 |
STAR, XSLT30, LATE) |
| 59 |
.arg(0, BuiltInAtomicType.STRING, ONE, null); |
| 60 |
|
| 61 |
register("current-merge-key", 0, CurrentMergeKey.class, BuiltInAtomicType.ANY_ATOMIC, |
| 62 |
STAR, XSLT30, LATE); |
| 63 |
|
| 64 |
register("current-output-uri", 0, CurrentOutputUri.class, BuiltInAtomicType.ANY_URI, OPT, XSLT30, LATE); |
| 65 |
|
| 66 |
register("document", 1, DocumentFn.class, Type.NODE_TYPE, STAR, XSLT, BASE | LATE | UO) |
| 67 |
.arg(0, Type.ITEM_TYPE, STAR, null); |
| 68 |
|
| 69 |
register("document", 2, DocumentFn.class, Type.NODE_TYPE, STAR, XSLT, BASE | LATE | UO) |
| 70 |
.arg(0, Type.ITEM_TYPE, STAR, null) |
| 71 |
.arg(1, Type.NODE_TYPE, ONE, null); |
| 72 |
|
| 73 |
register("element-available", 1, ElementAvailable.class, BuiltInAtomicType.BOOLEAN, ONE, XSLT | USE_WHEN, NS) |
| 74 |
.arg(0, BuiltInAtomicType.STRING, ONE, null); |
| 75 |
|
| 76 |
register("function-available", 1, FunctionAvailable.class, BuiltInAtomicType.BOOLEAN, ONE, XSLT | USE_WHEN, NS | LATE) |
| 77 |
.arg(0, BuiltInAtomicType.STRING, ONE, null); |
| 78 |
|
| 79 |
register("function-available", 2, FunctionAvailable.class, BuiltInAtomicType.BOOLEAN, ONE, XSLT | USE_WHEN, NS | LATE) |
| 80 |
.arg(0, BuiltInAtomicType.STRING, ONE, null) |
| 81 |
.arg(1, BuiltInAtomicType.INTEGER, ONE, null); |
| 82 |
|
| 83 |
register("key", 2, KeyFn.class, Type.NODE_TYPE, STAR, XSLT, CDOC | NS | LATE) |
| 84 |
.arg(0, BuiltInAtomicType.STRING, ONE, null) |
| 85 |
.arg(1, BuiltInAtomicType.ANY_ATOMIC, STAR, EMPTY); |
| 86 |
|
| 87 |
register("key", 3, KeyFn.class, Type.NODE_TYPE, STAR, XSLT, NS | LATE) |
| 88 |
.arg(0, BuiltInAtomicType.STRING, ONE, null) |
| 89 |
.arg(1, BuiltInAtomicType.ANY_ATOMIC, STAR, EMPTY) |
| 90 |
.arg(2, Type.NODE_TYPE, ONE, null); |
| 91 |
|
| 92 |
register("regex-group", 1, RegexGroup.class, BuiltInAtomicType.STRING, ONE, XSLT, LATE | SIDE) |
| 93 |
.arg(0, BuiltInAtomicType.INTEGER, ONE, null); |
| 94 |
|
| 95 |
|
| 96 |
register("stream-available", 1, StreamAvailable.class, BuiltInAtomicType.BOOLEAN, |
| 97 |
ONE, XSLT30, LATE) |
| 98 |
.arg(0, BuiltInAtomicType.STRING, OPT, null); |
| 99 |
|
| 100 |
register("system-property", 1, SystemProperty.class, BuiltInAtomicType.STRING, ONE, XSLT | USE_WHEN, NS | LATE) |
| 101 |
.arg(0, BuiltInAtomicType.STRING, ONE, null); |
| 102 |
|
| 103 |
register("type-available", 1, TypeAvailable.class, BuiltInAtomicType.BOOLEAN, ONE, XSLT | USE_WHEN, NS) |
| 104 |
.arg(0, BuiltInAtomicType.STRING, ONE, null); |
| 105 |
|
| 106 |
register("unparsed-entity-public-id", 1, UnparsedEntity.UnparsedEntityPublicId.class, BuiltInAtomicType.STRING, ONE, XSLT, CDOC | LATE) |
| 107 |
.arg(0, BuiltInAtomicType.STRING, ONE, null); |
| 108 |
|
| 109 |
register("unparsed-entity-public-id", 2, UnparsedEntity.UnparsedEntityPublicId.class, BuiltInAtomicType.STRING, ONE, XSLT30, 0) |
| 110 |
.arg(0, BuiltInAtomicType.STRING, ONE, null) |
| 111 |
.arg(1, Type.NODE_TYPE, ONE, null); |
| 112 |
|
| 113 |
register("unparsed-entity-uri", 1, UnparsedEntity.UnparsedEntityUri.class, BuiltInAtomicType.ANY_URI, ONE, XSLT, CDOC | LATE) |
| 114 |
.arg(0, BuiltInAtomicType.STRING, ONE, null); |
| 115 |
|
| 116 |
register("unparsed-entity-uri", 2, UnparsedEntity.UnparsedEntityUri.class, BuiltInAtomicType.ANY_URI, ONE, XSLT30, 0) |
| 117 |
.arg(0, BuiltInAtomicType.STRING, ONE, null) |
| 118 |
.arg(1, Type.NODE_TYPE, ONE, null); |
| 119 |
|
| 120 |
|
| 121 |
} |
| 122 |
|
| 123 |
|
| 124 |
} |
| 125 |
|