xslt-processor 3.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/constants.d.ts +12 -12
- package/constants.js +16 -16
- package/dom/functions.d.ts +14 -14
- package/dom/functions.js +56 -57
- package/dom/functions.js.map +1 -1
- package/dom/index.d.ts +6 -6
- package/dom/index.js +22 -22
- package/dom/util.d.ts +7 -7
- package/dom/util.js +42 -43
- package/dom/util.js.map +1 -1
- package/dom/xdocument.d.ts +16 -16
- package/dom/xdocument.js +73 -74
- package/dom/xdocument.js.map +1 -1
- package/dom/xml-functions.d.ts +58 -58
- package/dom/xml-functions.js +369 -370
- package/dom/xml-functions.js.map +1 -1
- package/dom/xml-output-options.d.ts +6 -6
- package/dom/xml-output-options.js +2 -2
- package/dom/xml-parser.d.ts +47 -47
- package/dom/xml-parser.js +307 -307
- package/dom/xml-parser.js.map +1 -1
- package/dom/xmltoken.d.ts +12 -12
- package/dom/xmltoken.js +101 -101
- package/dom/xnode.d.ts +73 -73
- package/dom/xnode.js +450 -450
- package/dom/xnode.js.map +1 -1
- package/index.d.ts +4 -4
- package/index.js +12 -12
- package/package.json +11 -11
- package/test-without-jest.d.ts +1 -0
- package/test-without-jest.js +63 -0
- package/test-without-jest.js.map +1 -0
- package/umd/constants.d.ts +12 -12
- package/umd/dom/functions.d.ts +14 -14
- package/umd/dom/index.d.ts +6 -6
- package/umd/dom/util.d.ts +7 -7
- package/umd/dom/xdocument.d.ts +16 -16
- package/umd/dom/xml-functions.d.ts +58 -58
- package/umd/dom/xml-output-options.d.ts +6 -6
- package/umd/dom/xml-parser.d.ts +47 -47
- package/umd/dom/xmltoken.d.ts +12 -12
- package/umd/dom/xnode.d.ts +73 -73
- package/umd/index.d.ts +4 -4
- package/umd/test-without-jest.d.ts +1 -0
- package/umd/xpath/common-function.d.ts +8 -8
- package/umd/xpath/expr-context.d.ts +111 -111
- package/umd/xpath/expressions/binary-expr.d.ts +11 -11
- package/umd/xpath/expressions/expression.d.ts +4 -4
- package/umd/xpath/expressions/filter-expr.d.ts +9 -9
- package/umd/xpath/expressions/function-call-expr.d.ts +12 -12
- package/umd/xpath/expressions/index.d.ts +13 -13
- package/umd/xpath/expressions/literal-expr.d.ts +7 -7
- package/umd/xpath/expressions/location-expr.d.ts +15 -15
- package/umd/xpath/expressions/number-expr.d.ts +7 -7
- package/umd/xpath/expressions/path-expr.d.ts +9 -9
- package/umd/xpath/expressions/predicate-expr.d.ts +8 -8
- package/umd/xpath/expressions/step-expr.d.ts +25 -25
- package/umd/xpath/expressions/token-expr.d.ts +7 -7
- package/umd/xpath/expressions/unary-minus-expr.d.ts +8 -8
- package/umd/xpath/expressions/union-expr.d.ts +9 -9
- package/umd/xpath/expressions/variable-expr.d.ts +7 -7
- package/umd/xpath/functions/index.d.ts +2 -2
- package/umd/xpath/functions/internal-functions.d.ts +2 -2
- package/umd/xpath/functions/non-standard.d.ts +12 -12
- package/umd/xpath/functions/standard-20.d.ts +5 -5
- package/umd/xpath/functions/standard.d.ts +40 -40
- package/umd/xpath/grammar-rule-candidate.d.ts +8 -8
- package/umd/xpath/index.d.ts +3 -3
- package/umd/xpath/match-resolver.d.ts +55 -55
- package/umd/xpath/node-tests/index.d.ts +8 -8
- package/umd/xpath/node-tests/node-test-any.d.ts +6 -6
- package/umd/xpath/node-tests/node-test-comment.d.ts +6 -6
- package/umd/xpath/node-tests/node-test-element-or-attribute.d.ts +6 -6
- package/umd/xpath/node-tests/node-test-name.d.ts +10 -10
- package/umd/xpath/node-tests/node-test-nc.d.ts +9 -9
- package/umd/xpath/node-tests/node-test-pi.d.ts +8 -8
- package/umd/xpath/node-tests/node-test-text.d.ts +6 -6
- package/umd/xpath/node-tests/node-test.d.ts +5 -5
- package/umd/xpath/tokens.d.ts +62 -62
- package/umd/xpath/values/boolean-value.d.ts +11 -11
- package/umd/xpath/values/index.d.ts +5 -5
- package/umd/xpath/values/node-set-value.d.ts +11 -11
- package/umd/xpath/values/node-value.d.ts +7 -7
- package/umd/xpath/values/number-value.d.ts +11 -11
- package/umd/xpath/values/string-value.d.ts +11 -11
- package/umd/xpath/xpath-grammar-rules.d.ts +68 -68
- package/umd/xpath/xpath-token-rule.d.ts +7 -7
- package/umd/xpath/xpath.d.ts +174 -170
- package/umd/xpathdebug.d.ts +2 -2
- package/umd/xslt/index.d.ts +3 -3
- package/umd/xslt/xslt-decimal-format-settings.d.ts +28 -28
- package/umd/xslt/xslt-options.d.ts +7 -7
- package/umd/xslt/xslt-parameter.d.ts +5 -5
- package/umd/xslt/xslt.d.ts +207 -190
- package/umd/xslt-processor.js +1 -15
- package/umd/xslt-processor.js.map +1 -1
- package/xpath/common-function.d.ts +8 -8
- package/xpath/common-function.js +31 -32
- package/xpath/common-function.js.map +1 -1
- package/xpath/expr-context.d.ts +111 -111
- package/xpath/expr-context.js +189 -189
- package/xpath/expr-context.js.map +1 -1
- package/xpath/expressions/binary-expr.d.ts +11 -11
- package/xpath/expressions/binary-expr.js +165 -165
- package/xpath/expressions/binary-expr.js.map +1 -1
- package/xpath/expressions/expression.d.ts +4 -4
- package/xpath/expressions/expression.js +9 -9
- package/xpath/expressions/filter-expr.d.ts +9 -9
- package/xpath/expressions/filter-expr.js +52 -52
- package/xpath/expressions/filter-expr.js.map +1 -1
- package/xpath/expressions/function-call-expr.d.ts +12 -12
- package/xpath/expressions/function-call-expr.js +95 -95
- package/xpath/expressions/function-call-expr.js.map +1 -1
- package/xpath/expressions/index.d.ts +13 -13
- package/xpath/expressions/index.js +29 -29
- package/xpath/expressions/literal-expr.d.ts +7 -7
- package/xpath/expressions/literal-expr.js +33 -33
- package/xpath/expressions/literal-expr.js.map +1 -1
- package/xpath/expressions/location-expr.d.ts +15 -15
- package/xpath/expressions/location-expr.js +98 -98
- package/xpath/expressions/location-expr.js.map +1 -1
- package/xpath/expressions/number-expr.d.ts +7 -7
- package/xpath/expressions/number-expr.js +33 -33
- package/xpath/expressions/number-expr.js.map +1 -1
- package/xpath/expressions/path-expr.d.ts +9 -9
- package/xpath/expressions/path-expr.js +51 -51
- package/xpath/expressions/path-expr.js.map +1 -1
- package/xpath/expressions/predicate-expr.d.ts +8 -8
- package/xpath/expressions/predicate-expr.js +40 -40
- package/xpath/expressions/predicate-expr.js.map +1 -1
- package/xpath/expressions/step-expr.d.ts +25 -25
- package/xpath/expressions/step-expr.js +280 -280
- package/xpath/expressions/step-expr.js.map +1 -1
- package/xpath/expressions/token-expr.d.ts +7 -7
- package/xpath/expressions/token-expr.js +33 -33
- package/xpath/expressions/token-expr.js.map +1 -1
- package/xpath/expressions/unary-minus-expr.d.ts +8 -8
- package/xpath/expressions/unary-minus-expr.js +33 -33
- package/xpath/expressions/unary-minus-expr.js.map +1 -1
- package/xpath/expressions/union-expr.d.ts +9 -9
- package/xpath/expressions/union-expr.js +50 -50
- package/xpath/expressions/union-expr.js.map +1 -1
- package/xpath/expressions/variable-expr.d.ts +7 -7
- package/xpath/expressions/variable-expr.js +32 -32
- package/xpath/expressions/variable-expr.js.map +1 -1
- package/xpath/functions/index.d.ts +2 -2
- package/xpath/functions/index.js +18 -18
- package/xpath/functions/internal-functions.d.ts +2 -2
- package/xpath/functions/internal-functions.js +21 -22
- package/xpath/functions/internal-functions.js.map +1 -1
- package/xpath/functions/non-standard.d.ts +12 -12
- package/xpath/functions/non-standard.js +44 -45
- package/xpath/functions/non-standard.js.map +1 -1
- package/xpath/functions/standard-20.d.ts +5 -5
- package/xpath/functions/standard-20.js +25 -26
- package/xpath/functions/standard-20.js.map +1 -1
- package/xpath/functions/standard.d.ts +40 -40
- package/xpath/functions/standard.js +441 -442
- package/xpath/functions/standard.js.map +1 -1
- package/xpath/grammar-rule-candidate.d.ts +8 -8
- package/xpath/grammar-rule-candidate.js +2 -2
- package/xpath/index.d.ts +3 -3
- package/xpath/index.js +19 -19
- package/xpath/match-resolver.d.ts +55 -55
- package/xpath/match-resolver.js +136 -136
- package/xpath/match-resolver.js.map +1 -1
- package/xpath/node-tests/index.d.ts +8 -8
- package/xpath/node-tests/index.js +17 -17
- package/xpath/node-tests/node-test-any.d.ts +6 -6
- package/xpath/node-tests/node-test-any.js +14 -14
- package/xpath/node-tests/node-test-comment.d.ts +6 -6
- package/xpath/node-tests/node-test-comment.js +14 -14
- package/xpath/node-tests/node-test-element-or-attribute.d.ts +6 -6
- package/xpath/node-tests/node-test-element-or-attribute.js +15 -15
- package/xpath/node-tests/node-test-name.d.ts +10 -10
- package/xpath/node-tests/node-test-name.js +38 -38
- package/xpath/node-tests/node-test-name.js.map +1 -1
- package/xpath/node-tests/node-test-nc.d.ts +9 -9
- package/xpath/node-tests/node-test-nc.js +16 -16
- package/xpath/node-tests/node-test-pi.d.ts +8 -8
- package/xpath/node-tests/node-test-pi.js +16 -16
- package/xpath/node-tests/node-test-pi.js.map +1 -1
- package/xpath/node-tests/node-test-text.d.ts +6 -6
- package/xpath/node-tests/node-test-text.js +14 -14
- package/xpath/node-tests/node-test.d.ts +5 -5
- package/xpath/node-tests/node-test.js +2 -2
- package/xpath/tokens.d.ts +62 -62
- package/xpath/tokens.js +300 -300
- package/xpath/tokens.js.map +1 -1
- package/xpath/values/boolean-value.d.ts +11 -11
- package/xpath/values/boolean-value.js +23 -23
- package/xpath/values/index.d.ts +5 -5
- package/xpath/values/index.js +46 -46
- package/xpath/values/node-set-value.d.ts +11 -11
- package/xpath/values/node-set-value.js +27 -27
- package/xpath/values/node-set-value.js.map +1 -1
- package/xpath/values/node-value.d.ts +7 -7
- package/xpath/values/node-value.js +2 -2
- package/xpath/values/number-value.d.ts +11 -11
- package/xpath/values/number-value.js +23 -23
- package/xpath/values/string-value.d.ts +11 -11
- package/xpath/values/string-value.js +23 -23
- package/xpath/xpath-grammar-rules.d.ts +68 -68
- package/xpath/xpath-grammar-rules.js +74 -74
- package/xpath/xpath-token-rule.d.ts +7 -7
- package/xpath/xpath-token-rule.js +2 -2
- package/xpath/xpath.d.ts +174 -170
- package/xpath/xpath.js +911 -909
- package/xpath/xpath.js.map +1 -1
- package/xpathdebug.d.ts +2 -2
- package/xpathdebug.js +187 -187
- package/xpathdebug.js.map +1 -1
- package/xslt/index.d.ts +3 -3
- package/xslt/index.js +19 -19
- package/xslt/xslt-decimal-format-settings.d.ts +28 -28
- package/xslt/xslt-decimal-format-settings.js +2 -2
- package/xslt/xslt-options.d.ts +7 -7
- package/xslt/xslt-options.js +2 -2
- package/xslt/xslt-parameter.d.ts +5 -5
- package/xslt/xslt-parameter.js +2 -2
- package/xslt/xslt.d.ts +207 -190
- package/xslt/xslt.js +1135 -1079
- package/xslt/xslt.js.map +1 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.TokenExpr = void 0;
|
|
19
|
-
var string_value_1 = require("../values/string-value");
|
|
20
|
-
var expression_1 = require("./expression");
|
|
21
|
-
var TokenExpr = /** @class */ (function (_super) {
|
|
22
|
-
__extends(TokenExpr, _super);
|
|
23
|
-
function TokenExpr(m) {
|
|
24
|
-
var _this = _super.call(this) || this;
|
|
25
|
-
_this.value = m;
|
|
26
|
-
return _this;
|
|
27
|
-
}
|
|
28
|
-
TokenExpr.prototype.evaluate = function () {
|
|
29
|
-
return new string_value_1.StringValue(this.value);
|
|
30
|
-
};
|
|
31
|
-
return TokenExpr;
|
|
32
|
-
}(expression_1.Expression));
|
|
33
|
-
exports.TokenExpr = TokenExpr;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.TokenExpr = void 0;
|
|
19
|
+
var string_value_1 = require("../values/string-value");
|
|
20
|
+
var expression_1 = require("./expression");
|
|
21
|
+
var TokenExpr = /** @class */ (function (_super) {
|
|
22
|
+
__extends(TokenExpr, _super);
|
|
23
|
+
function TokenExpr(m) {
|
|
24
|
+
var _this = _super.call(this) || this;
|
|
25
|
+
_this.value = m;
|
|
26
|
+
return _this;
|
|
27
|
+
}
|
|
28
|
+
TokenExpr.prototype.evaluate = function () {
|
|
29
|
+
return new string_value_1.StringValue(this.value);
|
|
30
|
+
};
|
|
31
|
+
return TokenExpr;
|
|
32
|
+
}(expression_1.Expression));
|
|
33
|
+
exports.TokenExpr = TokenExpr;
|
|
34
34
|
//# sourceMappingURL=token-expr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-expr.js","sourceRoot":"","sources":["../../../src/xpath/expressions/token-expr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uDAAqD;AACrD,2CAA0C;AAE1C;IAA+B,6BAAU;IAGrC,mBAAY,CAAM;
|
|
1
|
+
{"version":3,"file":"token-expr.js","sourceRoot":"","sources":["../../../src/xpath/expressions/token-expr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uDAAqD;AACrD,2CAA0C;AAE1C;IAA+B,6BAAU;IAGrC,mBAAY,CAAM;QACd,YAAA,MAAK,WAAE,SAAC;QACR,KAAI,CAAC,KAAK,GAAG,CAAC,CAAC;;IACnB,CAAC;IAED,4BAAQ,GAAR;QACI,OAAO,IAAI,0BAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IACL,gBAAC;AAAD,CAAC,AAXD,CAA+B,uBAAU,GAWxC;AAXY,8BAAS"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ExprContext } from "..";
|
|
2
|
-
import { NumberValue } from "../values/number-value";
|
|
3
|
-
import { Expression } from "./expression";
|
|
4
|
-
export declare class UnaryMinusExpr extends Expression {
|
|
5
|
-
expr: any;
|
|
6
|
-
constructor(expr: any);
|
|
7
|
-
evaluate(ctx: ExprContext): NumberValue;
|
|
8
|
-
}
|
|
1
|
+
import { ExprContext } from "..";
|
|
2
|
+
import { NumberValue } from "../values/number-value";
|
|
3
|
+
import { Expression } from "./expression";
|
|
4
|
+
export declare class UnaryMinusExpr extends Expression {
|
|
5
|
+
expr: any;
|
|
6
|
+
constructor(expr: any);
|
|
7
|
+
evaluate(ctx: ExprContext): NumberValue;
|
|
8
|
+
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.UnaryMinusExpr = void 0;
|
|
19
|
-
var number_value_1 = require("../values/number-value");
|
|
20
|
-
var expression_1 = require("./expression");
|
|
21
|
-
var UnaryMinusExpr = /** @class */ (function (_super) {
|
|
22
|
-
__extends(UnaryMinusExpr, _super);
|
|
23
|
-
function UnaryMinusExpr(expr) {
|
|
24
|
-
var _this = _super.call(this) || this;
|
|
25
|
-
_this.expr = expr;
|
|
26
|
-
return _this;
|
|
27
|
-
}
|
|
28
|
-
UnaryMinusExpr.prototype.evaluate = function (ctx) {
|
|
29
|
-
return new number_value_1.NumberValue(-this.expr.evaluate(ctx).numberValue());
|
|
30
|
-
};
|
|
31
|
-
return UnaryMinusExpr;
|
|
32
|
-
}(expression_1.Expression));
|
|
33
|
-
exports.UnaryMinusExpr = UnaryMinusExpr;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.UnaryMinusExpr = void 0;
|
|
19
|
+
var number_value_1 = require("../values/number-value");
|
|
20
|
+
var expression_1 = require("./expression");
|
|
21
|
+
var UnaryMinusExpr = /** @class */ (function (_super) {
|
|
22
|
+
__extends(UnaryMinusExpr, _super);
|
|
23
|
+
function UnaryMinusExpr(expr) {
|
|
24
|
+
var _this = _super.call(this) || this;
|
|
25
|
+
_this.expr = expr;
|
|
26
|
+
return _this;
|
|
27
|
+
}
|
|
28
|
+
UnaryMinusExpr.prototype.evaluate = function (ctx) {
|
|
29
|
+
return new number_value_1.NumberValue(-this.expr.evaluate(ctx).numberValue());
|
|
30
|
+
};
|
|
31
|
+
return UnaryMinusExpr;
|
|
32
|
+
}(expression_1.Expression));
|
|
33
|
+
exports.UnaryMinusExpr = UnaryMinusExpr;
|
|
34
34
|
//# sourceMappingURL=unary-minus-expr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unary-minus-expr.js","sourceRoot":"","sources":["../../../src/xpath/expressions/unary-minus-expr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,uDAAqD;AACrD,2CAA0C;AAE1C;IAAoC,kCAAU;IAG1C,wBAAY,IAAS;
|
|
1
|
+
{"version":3,"file":"unary-minus-expr.js","sourceRoot":"","sources":["../../../src/xpath/expressions/unary-minus-expr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,uDAAqD;AACrD,2CAA0C;AAE1C;IAAoC,kCAAU;IAG1C,wBAAY,IAAS;QACjB,YAAA,MAAK,WAAE,SAAC;QACR,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;;IACrB,CAAC;IAED,iCAAQ,GAAR,UAAS,GAAgB;QACrB,OAAO,IAAI,0BAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IACnE,CAAC;IACL,qBAAC;AAAD,CAAC,AAXD,CAAoC,uBAAU,GAW7C;AAXY,wCAAc"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ExprContext } from "..";
|
|
2
|
-
import { NodeSetValue } from "../values/node-set-value";
|
|
3
|
-
import { Expression } from "./expression";
|
|
4
|
-
export declare class UnionExpr extends Expression {
|
|
5
|
-
expr1: Expression;
|
|
6
|
-
expr2: Expression;
|
|
7
|
-
constructor(expr1: Expression, expr2: Expression);
|
|
8
|
-
evaluate(context: ExprContext): NodeSetValue;
|
|
9
|
-
}
|
|
1
|
+
import { ExprContext } from "..";
|
|
2
|
+
import { NodeSetValue } from "../values/node-set-value";
|
|
3
|
+
import { Expression } from "./expression";
|
|
4
|
+
export declare class UnionExpr extends Expression {
|
|
5
|
+
expr1: Expression;
|
|
6
|
+
expr2: Expression;
|
|
7
|
+
constructor(expr1: Expression, expr2: Expression);
|
|
8
|
+
evaluate(context: ExprContext): NodeSetValue;
|
|
9
|
+
}
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.UnionExpr = void 0;
|
|
19
|
-
var node_set_value_1 = require("../values/node-set-value");
|
|
20
|
-
var expression_1 = require("./expression");
|
|
21
|
-
var UnionExpr = /** @class */ (function (_super) {
|
|
22
|
-
__extends(UnionExpr, _super);
|
|
23
|
-
function UnionExpr(expr1, expr2) {
|
|
24
|
-
var _this = _super.call(this) || this;
|
|
25
|
-
_this.expr1 = expr1;
|
|
26
|
-
_this.expr2 = expr2;
|
|
27
|
-
return _this;
|
|
28
|
-
}
|
|
29
|
-
UnionExpr.prototype.evaluate = function (context) {
|
|
30
|
-
var nodes1 = this.expr1.evaluate(context).nodeSetValue();
|
|
31
|
-
var nodes2 = this.expr2.evaluate(context).nodeSetValue();
|
|
32
|
-
var I1 = nodes1.length;
|
|
33
|
-
for (var _i = 0, nodes2_1 = nodes2; _i < nodes2_1.length; _i++) {
|
|
34
|
-
var n = nodes2_1[_i];
|
|
35
|
-
var inBoth = false;
|
|
36
|
-
for (var i1 = 0; i1 < I1; ++i1) {
|
|
37
|
-
if (nodes1[i1] == n) {
|
|
38
|
-
inBoth = true;
|
|
39
|
-
i1 = I1; // break inner loop
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
if (!inBoth) {
|
|
43
|
-
nodes1.push(n);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return new node_set_value_1.NodeSetValue(nodes1);
|
|
47
|
-
};
|
|
48
|
-
return UnionExpr;
|
|
49
|
-
}(expression_1.Expression));
|
|
50
|
-
exports.UnionExpr = UnionExpr;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.UnionExpr = void 0;
|
|
19
|
+
var node_set_value_1 = require("../values/node-set-value");
|
|
20
|
+
var expression_1 = require("./expression");
|
|
21
|
+
var UnionExpr = /** @class */ (function (_super) {
|
|
22
|
+
__extends(UnionExpr, _super);
|
|
23
|
+
function UnionExpr(expr1, expr2) {
|
|
24
|
+
var _this = _super.call(this) || this;
|
|
25
|
+
_this.expr1 = expr1;
|
|
26
|
+
_this.expr2 = expr2;
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
UnionExpr.prototype.evaluate = function (context) {
|
|
30
|
+
var nodes1 = this.expr1.evaluate(context).nodeSetValue();
|
|
31
|
+
var nodes2 = this.expr2.evaluate(context).nodeSetValue();
|
|
32
|
+
var I1 = nodes1.length;
|
|
33
|
+
for (var _i = 0, nodes2_1 = nodes2; _i < nodes2_1.length; _i++) {
|
|
34
|
+
var n = nodes2_1[_i];
|
|
35
|
+
var inBoth = false;
|
|
36
|
+
for (var i1 = 0; i1 < I1; ++i1) {
|
|
37
|
+
if (nodes1[i1] == n) {
|
|
38
|
+
inBoth = true;
|
|
39
|
+
i1 = I1; // break inner loop
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (!inBoth) {
|
|
43
|
+
nodes1.push(n);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return new node_set_value_1.NodeSetValue(nodes1);
|
|
47
|
+
};
|
|
48
|
+
return UnionExpr;
|
|
49
|
+
}(expression_1.Expression));
|
|
50
|
+
exports.UnionExpr = UnionExpr;
|
|
51
51
|
//# sourceMappingURL=union-expr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"union-expr.js","sourceRoot":"","sources":["../../../src/xpath/expressions/union-expr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2DAAwD;AACxD,2CAA0C;AAE1C;IAA+B,6BAAU;IAIrC,mBAAY,KAAiB,EAAE,KAAiB;
|
|
1
|
+
{"version":3,"file":"union-expr.js","sourceRoot":"","sources":["../../../src/xpath/expressions/union-expr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2DAAwD;AACxD,2CAA0C;AAE1C;IAA+B,6BAAU;IAIrC,mBAAY,KAAiB,EAAE,KAAiB;QAC5C,YAAA,MAAK,WAAE,SAAC;QACR,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAED,4BAAQ,GAAR,UAAS,OAAoB;QACzB,IAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,CAAC;QAC3D,IAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,CAAC;QAC3D,IAAM,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC;QAEzB,KAAgB,UAAM,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,EAAE,CAAC;YAApB,IAAM,CAAC,eAAA;YACR,IAAI,MAAM,GAAG,KAAK,CAAC;YACnB,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;gBAC7B,IAAI,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;oBAClB,MAAM,GAAG,IAAI,CAAC;oBACd,EAAE,GAAG,EAAE,CAAC,CAAC,mBAAmB;gBAChC,CAAC;YACL,CAAC;YACD,IAAI,CAAC,MAAM,EAAE,CAAC;gBACV,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACnB,CAAC;QACL,CAAC;QAED,OAAO,IAAI,6BAAY,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IACL,gBAAC;AAAD,CAAC,AA9BD,CAA+B,uBAAU,GA8BxC;AA9BY,8BAAS"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ExprContext } from "..";
|
|
2
|
-
import { Expression } from "./expression";
|
|
3
|
-
export declare class VariableExpr extends Expression {
|
|
4
|
-
name: string;
|
|
5
|
-
constructor(name: string);
|
|
6
|
-
evaluate(context: ExprContext): import("../values").NodeValue;
|
|
7
|
-
}
|
|
1
|
+
import { ExprContext } from "..";
|
|
2
|
+
import { Expression } from "./expression";
|
|
3
|
+
export declare class VariableExpr extends Expression {
|
|
4
|
+
name: string;
|
|
5
|
+
constructor(name: string);
|
|
6
|
+
evaluate(context: ExprContext): import("../values").NodeValue;
|
|
7
|
+
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.VariableExpr = void 0;
|
|
19
|
-
var expression_1 = require("./expression");
|
|
20
|
-
var VariableExpr = /** @class */ (function (_super) {
|
|
21
|
-
__extends(VariableExpr, _super);
|
|
22
|
-
function VariableExpr(name) {
|
|
23
|
-
var _this = _super.call(this) || this;
|
|
24
|
-
_this.name = name;
|
|
25
|
-
return _this;
|
|
26
|
-
}
|
|
27
|
-
VariableExpr.prototype.evaluate = function (context) {
|
|
28
|
-
return context.getVariable(this.name);
|
|
29
|
-
};
|
|
30
|
-
return VariableExpr;
|
|
31
|
-
}(expression_1.Expression));
|
|
32
|
-
exports.VariableExpr = VariableExpr;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.VariableExpr = void 0;
|
|
19
|
+
var expression_1 = require("./expression");
|
|
20
|
+
var VariableExpr = /** @class */ (function (_super) {
|
|
21
|
+
__extends(VariableExpr, _super);
|
|
22
|
+
function VariableExpr(name) {
|
|
23
|
+
var _this = _super.call(this) || this;
|
|
24
|
+
_this.name = name;
|
|
25
|
+
return _this;
|
|
26
|
+
}
|
|
27
|
+
VariableExpr.prototype.evaluate = function (context) {
|
|
28
|
+
return context.getVariable(this.name);
|
|
29
|
+
};
|
|
30
|
+
return VariableExpr;
|
|
31
|
+
}(expression_1.Expression));
|
|
32
|
+
exports.VariableExpr = VariableExpr;
|
|
33
33
|
//# sourceMappingURL=variable-expr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variable-expr.js","sourceRoot":"","sources":["../../../src/xpath/expressions/variable-expr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAE1C;IAAkC,gCAAU;IAGxC,sBAAY,IAAY;
|
|
1
|
+
{"version":3,"file":"variable-expr.js","sourceRoot":"","sources":["../../../src/xpath/expressions/variable-expr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAE1C;IAAkC,gCAAU;IAGxC,sBAAY,IAAY;QACpB,YAAA,MAAK,WAAE,SAAC;QACR,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;;IACrB,CAAC;IAED,+BAAQ,GAAR,UAAS,OAAoB;QACzB,OAAO,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IACL,mBAAC;AAAD,CAAC,AAXD,CAAkC,uBAAU,GAW3C;AAXY,oCAAY"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './non-standard';
|
|
2
|
-
export * from './standard';
|
|
1
|
+
export * from './non-standard';
|
|
2
|
+
export * from './standard';
|
package/xpath/functions/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./non-standard"), exports);
|
|
18
|
-
__exportStar(require("./standard"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./non-standard"), exports);
|
|
18
|
+
__exportStar(require("./standard"), exports);
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function assert(b: any): void;
|
|
2
|
-
export declare function regExpEscape(text: string): string;
|
|
1
|
+
export declare function assert(b: any): void;
|
|
2
|
+
export declare function regExpEscape(text: string): string;
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Escape the special regular expression characters when the regular expression
|
|
13
|
-
* is specified as a string.
|
|
14
|
-
*
|
|
15
|
-
* Based on: http://simonwillison.net/2006/Jan/20/escape/
|
|
16
|
-
*/
|
|
17
|
-
var regExpSpecials = ['/', '.', '*', '+', '?', '|', '^', '$', '(', ')', '[', ']', '{', '}', '\\'];
|
|
18
|
-
var sRE = new RegExp("(\\".concat(regExpSpecials.join('|\\'), ")"), 'g');
|
|
19
|
-
function regExpEscape(text) {
|
|
20
|
-
return text.replace(sRE, '\\$1');
|
|
21
|
-
}
|
|
22
|
-
exports.regExpEscape = regExpEscape;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assert = assert;
|
|
4
|
+
exports.regExpEscape = regExpEscape;
|
|
5
|
+
// Throws an exception if false.
|
|
6
|
+
function assert(b) {
|
|
7
|
+
if (!b) {
|
|
8
|
+
throw new Error('Assertion failed');
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Escape the special regular expression characters when the regular expression
|
|
13
|
+
* is specified as a string.
|
|
14
|
+
*
|
|
15
|
+
* Based on: http://simonwillison.net/2006/Jan/20/escape/
|
|
16
|
+
*/
|
|
17
|
+
var regExpSpecials = ['/', '.', '*', '+', '?', '|', '^', '$', '(', ')', '[', ']', '{', '}', '\\'];
|
|
18
|
+
var sRE = new RegExp("(\\".concat(regExpSpecials.join('|\\'), ")"), 'g');
|
|
19
|
+
function regExpEscape(text) {
|
|
20
|
+
return text.replace(sRE, '\\$1');
|
|
21
|
+
}
|
|
23
22
|
//# sourceMappingURL=internal-functions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-functions.js","sourceRoot":"","sources":["../../../src/xpath/functions/internal-functions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"internal-functions.js","sourceRoot":"","sources":["../../../src/xpath/functions/internal-functions.ts"],"names":[],"mappings":";;AACA,wBAIC;AAYD,oCAEC;AAnBD,gCAAgC;AAChC,SAAgB,MAAM,CAAC,CAAM;IACzB,IAAI,CAAC,CAAC,EAAE,CAAC;QACL,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACxC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,IAAM,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AAEpG,IAAM,GAAG,GAAG,IAAI,MAAM,CAAC,aAAM,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,MAAG,EAAE,GAAG,CAAC,CAAC;AAEjE,SAAgB,YAAY,CAAC,IAAY;IACrC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ExprContext } from "../expr-context";
|
|
2
|
-
import { NodeSetValue, StringValue } from "../values";
|
|
3
|
-
export declare function extCardinal(context: ExprContext): NodeSetValue;
|
|
4
|
-
/**
|
|
5
|
-
* evaluates and returns its second argument, if the
|
|
6
|
-
* boolean value of its first argument is true, otherwise it
|
|
7
|
-
* evaluates and returns its third argument.
|
|
8
|
-
* @param context The Expression Context
|
|
9
|
-
* @returns A `BooleanValue`.
|
|
10
|
-
*/
|
|
11
|
-
export declare function extIf(context: ExprContext): any;
|
|
12
|
-
export declare function extJoin(context: ExprContext): StringValue;
|
|
1
|
+
import { ExprContext } from "../expr-context";
|
|
2
|
+
import { NodeSetValue, StringValue } from "../values";
|
|
3
|
+
export declare function extCardinal(context: ExprContext): NodeSetValue;
|
|
4
|
+
/**
|
|
5
|
+
* evaluates and returns its second argument, if the
|
|
6
|
+
* boolean value of its first argument is true, otherwise it
|
|
7
|
+
* evaluates and returns its third argument.
|
|
8
|
+
* @param context The Expression Context
|
|
9
|
+
* @returns A `BooleanValue`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function extIf(context: ExprContext): any;
|
|
12
|
+
export declare function extJoin(context: ExprContext): StringValue;
|
|
@@ -1,46 +1,45 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* @
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
function extJoin(context) {
|
|
33
|
-
(0, internal_functions_1.assert)(this.args.length === 2);
|
|
34
|
-
var nodes = this.args[0].evaluate(context).nodeSetValue();
|
|
35
|
-
var delim = this.args[1].evaluate(context).stringValue();
|
|
36
|
-
var ret = '';
|
|
37
|
-
for (var i = 0; i < nodes.length; ++i) {
|
|
38
|
-
if (ret) {
|
|
39
|
-
ret += delim;
|
|
40
|
-
}
|
|
41
|
-
ret += (0, dom_1.xmlValue)(nodes[i]);
|
|
42
|
-
}
|
|
43
|
-
return new values_1.StringValue(ret);
|
|
44
|
-
}
|
|
45
|
-
exports.extJoin = extJoin;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extCardinal = extCardinal;
|
|
4
|
+
exports.extIf = extIf;
|
|
5
|
+
exports.extJoin = extJoin;
|
|
6
|
+
var dom_1 = require("../../dom");
|
|
7
|
+
var values_1 = require("../values");
|
|
8
|
+
var internal_functions_1 = require("./internal-functions");
|
|
9
|
+
function extCardinal(context) {
|
|
10
|
+
(0, internal_functions_1.assert)(this.args.length >= 1);
|
|
11
|
+
var c = this.args[0].evaluate(context).numberValue();
|
|
12
|
+
var ret = [];
|
|
13
|
+
for (var i = 0; i < c; ++i) {
|
|
14
|
+
ret.push(context.nodeList[context.position]);
|
|
15
|
+
}
|
|
16
|
+
return new values_1.NodeSetValue(ret);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* evaluates and returns its second argument, if the
|
|
20
|
+
* boolean value of its first argument is true, otherwise it
|
|
21
|
+
* evaluates and returns its third argument.
|
|
22
|
+
* @param context The Expression Context
|
|
23
|
+
* @returns A `BooleanValue`.
|
|
24
|
+
*/
|
|
25
|
+
function extIf(context) {
|
|
26
|
+
(0, internal_functions_1.assert)(this.args.length === 3);
|
|
27
|
+
if (this.args[0].evaluate(context).booleanValue()) {
|
|
28
|
+
return this.args[1].evaluate(context);
|
|
29
|
+
}
|
|
30
|
+
return this.args[2].evaluate(context);
|
|
31
|
+
}
|
|
32
|
+
function extJoin(context) {
|
|
33
|
+
(0, internal_functions_1.assert)(this.args.length === 2);
|
|
34
|
+
var nodes = this.args[0].evaluate(context).nodeSetValue();
|
|
35
|
+
var delim = this.args[1].evaluate(context).stringValue();
|
|
36
|
+
var ret = '';
|
|
37
|
+
for (var i = 0; i < nodes.length; ++i) {
|
|
38
|
+
if (ret) {
|
|
39
|
+
ret += delim;
|
|
40
|
+
}
|
|
41
|
+
ret += (0, dom_1.xmlValue)(nodes[i]);
|
|
42
|
+
}
|
|
43
|
+
return new values_1.StringValue(ret);
|
|
44
|
+
}
|
|
46
45
|
//# sourceMappingURL=non-standard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"non-standard.js","sourceRoot":"","sources":["../../../src/xpath/functions/non-standard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"non-standard.js","sourceRoot":"","sources":["../../../src/xpath/functions/non-standard.ts"],"names":[],"mappings":";;AAKA,kCAQC;AASD,sBAOC;AAED,0BAYC;AA3CD,iCAAqC;AAErC,oCAAsD;AACtD,2DAA8C;AAE9C,SAAgB,WAAW,CAAC,OAAoB;IAC5C,IAAA,2BAAM,EAAC,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;IAC9B,IAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;IACvD,IAAM,GAAG,GAAG,EAAE,CAAC;IACf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;QACzB,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,IAAI,qBAAY,CAAC,GAAG,CAAC,CAAC;AACjC,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,KAAK,CAAC,OAAoB;IACtC,IAAA,2BAAM,EAAC,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;IAC/B,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC;QAChD,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC;AAED,SAAgB,OAAO,CAAC,OAAoB;IACxC,IAAA,2BAAM,EAAC,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;IAC/B,IAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,CAAC;IAC5D,IAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;IAC3D,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;QACpC,IAAI,GAAG,EAAE,CAAC;YACN,GAAG,IAAI,KAAK,CAAC;QACjB,CAAC;QACD,GAAG,IAAI,IAAA,cAAQ,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC;IACD,OAAO,IAAI,oBAAW,CAAC,GAAG,CAAC,CAAC;AAChC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExprContext } from "../expr-context";
|
|
2
|
-
import { StringValue } from "../values";
|
|
3
|
-
export declare function upperCase(context: ExprContext): StringValue;
|
|
4
|
-
export declare function lowerCase(context: ExprContext): StringValue;
|
|
5
|
-
export declare function _replace(context: ExprContext): StringValue;
|
|
1
|
+
import { ExprContext } from "../expr-context";
|
|
2
|
+
import { StringValue } from "../values";
|
|
3
|
+
export declare function upperCase(context: ExprContext): StringValue;
|
|
4
|
+
export declare function lowerCase(context: ExprContext): StringValue;
|
|
5
|
+
export declare function _replace(context: ExprContext): StringValue;
|