xslt-processor 1.0.0 → 1.1.0
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/LICENSE +165 -0
- package/README.md +29 -2
- package/constants.js.map +1 -0
- package/dom/functions.d.ts +15 -0
- package/{src/dom → dom}/functions.js +88 -43
- package/dom/functions.js.map +1 -0
- package/{src/dom → dom}/index.d.ts +1 -0
- package/{src/dom → dom}/index.js +1 -0
- package/dom/index.js.map +1 -0
- package/{src/dom → dom}/util.d.ts +0 -21
- package/dom/util.js +175 -0
- package/dom/util.js.map +1 -0
- package/{src/dom → dom}/xdocument.d.ts +3 -2
- package/dom/xdocument.js +71 -0
- package/dom/xdocument.js.map +1 -0
- package/dom/xml-functions.d.ts +46 -0
- package/dom/xml-functions.js +317 -0
- package/dom/xml-functions.js.map +1 -0
- package/{src/dom → dom}/xmltoken.js +25 -25
- package/dom/xmltoken.js.map +1 -0
- package/dom/xnode.d.ts +62 -0
- package/{src/dom → dom}/xnode.js +144 -91
- package/dom/xnode.js.map +1 -0
- package/index.d.ts +4 -4
- package/index.js +6 -5
- package/index.js.map +1 -1
- package/package.json +31 -10
- package/umd/constants.d.ts +8 -0
- package/umd/dom/functions.d.ts +15 -0
- package/umd/dom/index.d.ts +4 -0
- package/umd/dom/util.d.ts +26 -0
- package/umd/dom/xdocument.d.ts +16 -0
- package/umd/dom/xml-functions.d.ts +46 -0
- package/umd/dom/xmltoken.d.ts +12 -0
- package/umd/dom/xnode.d.ts +62 -0
- package/umd/index.d.ts +4 -0
- package/{src → umd}/xpath/expr-context.d.ts +6 -7
- package/umd/xpath/expressions/function-call-expr.d.ts +49 -0
- package/{src → umd}/xpath/expressions/location-expr.d.ts +1 -1
- package/{src → umd}/xpath/expressions/step-expr.d.ts +1 -1
- package/umd/xpath/node-test-element-or-attribute.d.ts +5 -0
- package/{src → umd}/xpath/node-test-name.d.ts +1 -1
- package/{src → umd}/xpath/xpath.d.ts +12 -5
- package/umd/xslt-processor.js +16 -0
- package/umd/xslt-processor.js.map +1 -0
- package/umd/xslt.d.ts +133 -0
- package/xpath/expr-context.d.ts +26 -0
- package/{src/xpath → xpath}/expr-context.js +41 -42
- package/xpath/expr-context.js.map +1 -0
- package/xpath/expressions/binary-expr.d.ts +10 -0
- package/{src/xpath → xpath}/expressions/binary-expr.js +65 -47
- package/xpath/expressions/binary-expr.js.map +1 -0
- package/xpath/expressions/expression.d.ts +4 -0
- package/xpath/expressions/expression.js +10 -0
- package/xpath/expressions/expression.js.map +1 -0
- package/xpath/expressions/filter-expr.d.ts +9 -0
- package/xpath/expressions/filter-expr.js +53 -0
- package/xpath/expressions/filter-expr.js.map +1 -0
- package/xpath/expressions/function-call-expr.d.ts +49 -0
- package/{src/xpath → xpath}/expressions/function-call-expr.js +160 -155
- package/xpath/expressions/function-call-expr.js.map +1 -0
- package/xpath/expressions/index.d.ts +13 -0
- package/xpath/expressions/index.js.map +1 -0
- package/xpath/expressions/literal-expr.d.ts +7 -0
- package/xpath/expressions/literal-expr.js +34 -0
- package/xpath/expressions/literal-expr.js.map +1 -0
- package/xpath/expressions/location-expr.d.ts +14 -0
- package/xpath/expressions/location-expr.js +94 -0
- package/xpath/expressions/location-expr.js.map +1 -0
- package/xpath/expressions/number-expr.d.ts +7 -0
- package/xpath/expressions/number-expr.js +34 -0
- package/xpath/expressions/number-expr.js.map +1 -0
- package/xpath/expressions/path-expr.d.ts +9 -0
- package/xpath/expressions/path-expr.js +52 -0
- package/xpath/expressions/path-expr.js.map +1 -0
- package/xpath/expressions/predicate-expr.d.ts +8 -0
- package/xpath/expressions/predicate-expr.js +43 -0
- package/xpath/expressions/predicate-expr.js.map +1 -0
- package/xpath/expressions/step-expr.d.ts +14 -0
- package/{src/xpath → xpath}/expressions/step-expr.js +68 -51
- package/xpath/expressions/step-expr.js.map +1 -0
- package/xpath/expressions/token-expr.d.ts +7 -0
- package/xpath/expressions/token-expr.js +34 -0
- package/xpath/expressions/token-expr.js.map +1 -0
- package/xpath/expressions/unary-minus-expr.d.ts +8 -0
- package/xpath/expressions/unary-minus-expr.js +34 -0
- package/xpath/expressions/unary-minus-expr.js.map +1 -0
- package/xpath/expressions/union-expr.d.ts +9 -0
- package/xpath/expressions/union-expr.js +51 -0
- package/xpath/expressions/union-expr.js.map +1 -0
- package/xpath/expressions/variable-expr.d.ts +7 -0
- package/xpath/expressions/variable-expr.js +33 -0
- package/xpath/expressions/variable-expr.js.map +1 -0
- package/xpath/index.d.ts +9 -0
- package/xpath/index.js.map +1 -0
- package/xpath/node-test-any.d.ts +5 -0
- package/xpath/node-test-any.js +15 -0
- package/xpath/node-test-any.js.map +1 -0
- package/{src/xpath/node-test-element-or-attribute.d.ts → xpath/node-test-comment.d.ts} +1 -1
- package/xpath/node-test-comment.js +15 -0
- package/xpath/node-test-comment.js.map +1 -0
- package/xpath/node-test-element-or-attribute.d.ts +5 -0
- package/xpath/node-test-element-or-attribute.js +16 -0
- package/xpath/node-test-element-or-attribute.js.map +1 -0
- package/xpath/node-test-name.d.ts +8 -0
- package/xpath/node-test-name.js +22 -0
- package/xpath/node-test-name.js.map +1 -0
- package/xpath/node-test-nc.d.ts +7 -0
- package/xpath/node-test-nc.js +17 -0
- package/xpath/node-test-nc.js.map +1 -0
- package/xpath/node-test-pi.d.ts +6 -0
- package/{src/xpath → xpath}/node-test-pi.js +8 -7
- package/xpath/node-test-pi.js.map +1 -0
- package/xpath/node-test-text.d.ts +4 -0
- package/xpath/node-test-text.js +15 -0
- package/xpath/node-test-text.js.map +1 -0
- package/xpath/tokens.d.ts +231 -0
- package/{src/xpath → xpath}/tokens.js +5 -5
- package/xpath/tokens.js.map +1 -0
- package/xpath/values/boolean-value.d.ts +9 -0
- package/xpath/values/boolean-value.js +24 -0
- package/xpath/values/boolean-value.js.map +1 -0
- package/xpath/values/index.d.ts +4 -0
- package/xpath/values/index.js.map +1 -0
- package/xpath/values/node-set-value.d.ts +9 -0
- package/xpath/values/node-set-value.js +28 -0
- package/xpath/values/node-set-value.js.map +1 -0
- package/xpath/values/number-value.d.ts +9 -0
- package/xpath/values/number-value.js +24 -0
- package/xpath/values/number-value.js.map +1 -0
- package/xpath/values/string-value.d.ts +9 -0
- package/{src/xpath → xpath}/values/string-value.js +12 -11
- package/xpath/values/string-value.js.map +1 -0
- package/xpath/xpath-grammar-rules.d.ts +68 -0
- package/xpath/xpath-grammar-rules.js.map +1 -0
- package/xpath/xpath.d.ts +105 -0
- package/{src/xpath → xpath}/xpath.js +267 -266
- package/xpath/xpath.js.map +1 -0
- package/xpathdebug.d.ts +2 -0
- package/{src/xpathdebug.js → xpathdebug.js} +48 -48
- package/xpathdebug.js.map +1 -0
- package/xslt.d.ts +133 -0
- package/xslt.js +643 -0
- package/xslt.js.map +1 -0
- package/src/constants.js.map +0 -1
- package/src/dom/functions.d.ts +0 -3
- package/src/dom/functions.js.map +0 -1
- package/src/dom/index.js.map +0 -1
- package/src/dom/util.js +0 -338
- package/src/dom/util.js.map +0 -1
- package/src/dom/xdocument.js +0 -47
- package/src/dom/xdocument.js.map +0 -1
- package/src/dom/xmltoken.js.map +0 -1
- package/src/dom/xnode.d.ts +0 -38
- package/src/dom/xnode.js.map +0 -1
- package/src/xpath/expr-context.js.map +0 -1
- package/src/xpath/expressions/binary-expr.js.map +0 -1
- package/src/xpath/expressions/expression.js +0 -7
- package/src/xpath/expressions/expression.js.map +0 -1
- package/src/xpath/expressions/filter-expr.js +0 -35
- package/src/xpath/expressions/filter-expr.js.map +0 -1
- package/src/xpath/expressions/function-call-expr.d.ts +0 -49
- package/src/xpath/expressions/function-call-expr.js.map +0 -1
- package/src/xpath/expressions/index.js.map +0 -1
- package/src/xpath/expressions/literal-expr.js +0 -16
- package/src/xpath/expressions/literal-expr.js.map +0 -1
- package/src/xpath/expressions/location-expr.js +0 -76
- package/src/xpath/expressions/location-expr.js.map +0 -1
- package/src/xpath/expressions/number-expr.js +0 -16
- package/src/xpath/expressions/number-expr.js.map +0 -1
- package/src/xpath/expressions/path-expr.js +0 -36
- package/src/xpath/expressions/path-expr.js.map +0 -1
- package/src/xpath/expressions/predicate-expr.js +0 -25
- package/src/xpath/expressions/predicate-expr.js.map +0 -1
- package/src/xpath/expressions/step-expr.js.map +0 -1
- package/src/xpath/expressions/token-expr.js +0 -16
- package/src/xpath/expressions/token-expr.js.map +0 -1
- package/src/xpath/expressions/unary-minus-expr.js +0 -16
- package/src/xpath/expressions/unary-minus-expr.js.map +0 -1
- package/src/xpath/expressions/union-expr.js +0 -32
- package/src/xpath/expressions/union-expr.js.map +0 -1
- package/src/xpath/expressions/variable-expr.js +0 -15
- package/src/xpath/expressions/variable-expr.js.map +0 -1
- package/src/xpath/index.js.map +0 -1
- package/src/xpath/node-test-any.js +0 -14
- package/src/xpath/node-test-any.js.map +0 -1
- package/src/xpath/node-test-comment.js +0 -12
- package/src/xpath/node-test-comment.js.map +0 -1
- package/src/xpath/node-test-element-or-attribute.js +0 -12
- package/src/xpath/node-test-element-or-attribute.js.map +0 -1
- package/src/xpath/node-test-name.js +0 -23
- package/src/xpath/node-test-name.js.map +0 -1
- package/src/xpath/node-test-nc.js +0 -16
- package/src/xpath/node-test-nc.js.map +0 -1
- package/src/xpath/node-test-pi.js.map +0 -1
- package/src/xpath/node-test-text.js +0 -12
- package/src/xpath/node-test-text.js.map +0 -1
- package/src/xpath/tokens.js.map +0 -1
- package/src/xpath/values/boolean-value.js +0 -23
- package/src/xpath/values/boolean-value.js.map +0 -1
- package/src/xpath/values/index.js.map +0 -1
- package/src/xpath/values/node-set-value.js +0 -27
- package/src/xpath/values/node-set-value.js.map +0 -1
- package/src/xpath/values/number-value.js +0 -23
- package/src/xpath/values/number-value.js.map +0 -1
- package/src/xpath/values/string-value.js.map +0 -1
- package/src/xpath/xpath-grammar-rules.js.map +0 -1
- package/src/xpath/xpath.js.map +0 -1
- package/src/xpathdebug.js.map +0 -1
- package/src/xslt.d.ts +0 -68
- package/src/xslt.js +0 -619
- package/src/xslt.js.map +0 -1
- package/xslt-processor.js +0 -2
- package/xslt-processor.js.map +0 -1
- /package/{src/constants.d.ts → constants.d.ts} +0 -0
- /package/{src/constants.js → constants.js} +0 -0
- /package/{src/dom → dom}/xmltoken.d.ts +0 -0
- /package/{src → umd}/xpath/expressions/binary-expr.d.ts +0 -0
- /package/{src → umd}/xpath/expressions/expression.d.ts +0 -0
- /package/{src → umd}/xpath/expressions/filter-expr.d.ts +0 -0
- /package/{src → umd}/xpath/expressions/index.d.ts +0 -0
- /package/{src → umd}/xpath/expressions/literal-expr.d.ts +0 -0
- /package/{src → umd}/xpath/expressions/number-expr.d.ts +0 -0
- /package/{src → umd}/xpath/expressions/path-expr.d.ts +0 -0
- /package/{src → umd}/xpath/expressions/predicate-expr.d.ts +0 -0
- /package/{src → umd}/xpath/expressions/token-expr.d.ts +0 -0
- /package/{src → umd}/xpath/expressions/unary-minus-expr.d.ts +0 -0
- /package/{src → umd}/xpath/expressions/union-expr.d.ts +0 -0
- /package/{src → umd}/xpath/expressions/variable-expr.d.ts +0 -0
- /package/{src → umd}/xpath/index.d.ts +0 -0
- /package/{src → umd}/xpath/node-test-any.d.ts +0 -0
- /package/{src → umd}/xpath/node-test-comment.d.ts +0 -0
- /package/{src → umd}/xpath/node-test-nc.d.ts +0 -0
- /package/{src → umd}/xpath/node-test-pi.d.ts +0 -0
- /package/{src → umd}/xpath/node-test-text.d.ts +0 -0
- /package/{src → umd}/xpath/tokens.d.ts +0 -0
- /package/{src → umd}/xpath/values/boolean-value.d.ts +0 -0
- /package/{src → umd}/xpath/values/index.d.ts +0 -0
- /package/{src → umd}/xpath/values/node-set-value.d.ts +0 -0
- /package/{src → umd}/xpath/values/number-value.d.ts +0 -0
- /package/{src → umd}/xpath/values/string-value.d.ts +0 -0
- /package/{src → umd}/xpath/xpath-grammar-rules.d.ts +0 -0
- /package/{src → umd}/xpathdebug.d.ts +0 -0
- /package/{src/xpath → xpath}/expressions/index.js +0 -0
- /package/{src/xpath → xpath}/index.js +0 -0
- /package/{src/xpath → xpath}/values/index.js +0 -0
- /package/{src/xpath → xpath}/xpath-grammar-rules.js +0 -0
|
@@ -0,0 +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 (ctx) {
|
|
30
|
+
var nodes1 = this.expr1.evaluate(ctx).nodeSetValue();
|
|
31
|
+
var nodes2 = this.expr2.evaluate(ctx).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
|
+
//# sourceMappingURL=union-expr.js.map
|
|
@@ -0,0 +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,KAAU,EAAE,KAAU;QAAlC,YACI,iBAAO,SAGV;QAFG,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAED,4BAAQ,GAAR,UAAS,GAAgB;QACrB,IAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,CAAC;QACvD,IAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,CAAC;QACvD,IAAM,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC;QAEzB,KAAgB,UAAM,EAAN,iBAAM,EAAN,oBAAM,EAAN,IAAM,EAAE;YAAnB,IAAM,CAAC,eAAA;YACR,IAAI,MAAM,GAAG,KAAK,CAAC;YACnB,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE;gBAC5B,IAAI,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;oBACjB,MAAM,GAAG,IAAI,CAAC;oBACd,EAAE,GAAG,EAAE,CAAC,CAAC,mBAAmB;iBAC/B;aACJ;YACD,IAAI,CAAC,MAAM,EAAE;gBACT,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aAClB;SACJ;QAED,OAAO,IAAI,6BAAY,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IACL,gBAAC;AAAD,CAAC,AA9BD,CAA+B,uBAAU,GA8BxC;AA9BY,8BAAS"}
|
|
@@ -0,0 +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 (ctx) {
|
|
28
|
+
return ctx.getVariable(this.name);
|
|
29
|
+
};
|
|
30
|
+
return VariableExpr;
|
|
31
|
+
}(expression_1.Expression));
|
|
32
|
+
exports.VariableExpr = VariableExpr;
|
|
33
|
+
//# sourceMappingURL=variable-expr.js.map
|
|
@@ -0,0 +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;QAAxB,YACI,iBAAO,SAEV;QADG,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;;IACrB,CAAC;IAED,+BAAQ,GAAR,UAAS,GAAgB;QACrB,OAAO,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACL,mBAAC;AAAD,CAAC,AAXD,CAAkC,uBAAU,GAW3C;AAXY,oCAAY"}
|
package/xpath/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './expr-context';
|
|
2
|
+
export * from './node-test-any';
|
|
3
|
+
export * from './node-test-comment';
|
|
4
|
+
export * from './node-test-element-or-attribute';
|
|
5
|
+
export * from './node-test-name';
|
|
6
|
+
export * from './node-test-nc';
|
|
7
|
+
export * from './node-test-pi';
|
|
8
|
+
export * from './node-test-text';
|
|
9
|
+
export * from './xpath';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/xpath/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,kDAAgC;AAChC,sDAAoC;AACpC,mEAAiD;AACjD,mDAAiC;AACjC,iDAA+B;AAC/B,iDAA+B;AAC/B,mDAAiC;AACjC,0CAAwB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NodeTestAny = void 0;
|
|
4
|
+
var boolean_value_1 = require("./values/boolean-value");
|
|
5
|
+
var NodeTestAny = /** @class */ (function () {
|
|
6
|
+
function NodeTestAny() {
|
|
7
|
+
this.value = new boolean_value_1.BooleanValue(true);
|
|
8
|
+
}
|
|
9
|
+
NodeTestAny.prototype.evaluate = function () {
|
|
10
|
+
return this.value;
|
|
11
|
+
};
|
|
12
|
+
return NodeTestAny;
|
|
13
|
+
}());
|
|
14
|
+
exports.NodeTestAny = NodeTestAny;
|
|
15
|
+
//# sourceMappingURL=node-test-any.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-test-any.js","sourceRoot":"","sources":["../../src/xpath/node-test-any.ts"],"names":[],"mappings":";;;AAAA,wDAAsD;AAEtD;IAGI;QACI,IAAI,CAAC,KAAK,GAAG,IAAI,4BAAY,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAED,8BAAQ,GAAR;QACI,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IACL,kBAAC;AAAD,CAAC,AAVD,IAUC;AAVY,kCAAW"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NodeTestComment = void 0;
|
|
4
|
+
var constants_1 = require("../constants");
|
|
5
|
+
var boolean_value_1 = require("./values/boolean-value");
|
|
6
|
+
var NodeTestComment = /** @class */ (function () {
|
|
7
|
+
function NodeTestComment() {
|
|
8
|
+
}
|
|
9
|
+
NodeTestComment.prototype.evaluate = function (ctx) {
|
|
10
|
+
return new boolean_value_1.BooleanValue(ctx.node.nodeType == constants_1.DOM_COMMENT_NODE);
|
|
11
|
+
};
|
|
12
|
+
return NodeTestComment;
|
|
13
|
+
}());
|
|
14
|
+
exports.NodeTestComment = NodeTestComment;
|
|
15
|
+
//# sourceMappingURL=node-test-comment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-test-comment.js","sourceRoot":"","sources":["../../src/xpath/node-test-comment.ts"],"names":[],"mappings":";;;AAAA,0CAAgD;AAChD,wDAAsD;AAEtD;IAAA;IAIA,CAAC;IAHG,kCAAQ,GAAR,UAAS,GAAG;QACR,OAAO,IAAI,4BAAY,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,IAAI,4BAAgB,CAAC,CAAC;IACnE,CAAC;IACL,sBAAC;AAAD,CAAC,AAJD,IAIC;AAJY,0CAAe"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NodeTestElementOrAttribute = void 0;
|
|
4
|
+
var constants_1 = require("../constants");
|
|
5
|
+
var boolean_value_1 = require("./values/boolean-value");
|
|
6
|
+
var NodeTestElementOrAttribute = /** @class */ (function () {
|
|
7
|
+
function NodeTestElementOrAttribute() {
|
|
8
|
+
}
|
|
9
|
+
NodeTestElementOrAttribute.prototype.evaluate = function (context) {
|
|
10
|
+
var node = context.nodelist[context.position];
|
|
11
|
+
return new boolean_value_1.BooleanValue(node.nodeType == constants_1.DOM_ELEMENT_NODE || node.nodeType == constants_1.DOM_ATTRIBUTE_NODE);
|
|
12
|
+
};
|
|
13
|
+
return NodeTestElementOrAttribute;
|
|
14
|
+
}());
|
|
15
|
+
exports.NodeTestElementOrAttribute = NodeTestElementOrAttribute;
|
|
16
|
+
//# sourceMappingURL=node-test-element-or-attribute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-test-element-or-attribute.js","sourceRoot":"","sources":["../../src/xpath/node-test-element-or-attribute.ts"],"names":[],"mappings":";;;AAAA,0CAAoE;AAEpE,wDAAsD;AAEtD;IAAA;IAKA,CAAC;IAJG,6CAAQ,GAAR,UAAS,OAAoB;QACzB,IAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAChD,OAAO,IAAI,4BAAY,CAAC,IAAI,CAAC,QAAQ,IAAI,4BAAgB,IAAI,IAAI,CAAC,QAAQ,IAAI,8BAAkB,CAAC,CAAC;IACtG,CAAC;IACL,iCAAC;AAAD,CAAC,AALD,IAKC;AALY,gEAA0B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NodeTestName = void 0;
|
|
4
|
+
var boolean_value_1 = require("./values/boolean-value");
|
|
5
|
+
var NodeTestName = /** @class */ (function () {
|
|
6
|
+
function NodeTestName(name) {
|
|
7
|
+
this.name = name;
|
|
8
|
+
this.re = new RegExp("^".concat(name, "$"), 'i');
|
|
9
|
+
}
|
|
10
|
+
NodeTestName.prototype.evaluate = function (context) {
|
|
11
|
+
var n = context.nodelist[context.position];
|
|
12
|
+
if (context.caseInsensitive) {
|
|
13
|
+
if (n.nodeName.length != this.name.length)
|
|
14
|
+
return new boolean_value_1.BooleanValue(false);
|
|
15
|
+
return new boolean_value_1.BooleanValue(this.re.test(n.nodeName));
|
|
16
|
+
}
|
|
17
|
+
return new boolean_value_1.BooleanValue(n.nodeName == this.name);
|
|
18
|
+
};
|
|
19
|
+
return NodeTestName;
|
|
20
|
+
}());
|
|
21
|
+
exports.NodeTestName = NodeTestName;
|
|
22
|
+
//# sourceMappingURL=node-test-name.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-test-name.js","sourceRoot":"","sources":["../../src/xpath/node-test-name.ts"],"names":[],"mappings":";;;AACA,wDAAsD;AAEtD;IAII,sBAAY,IAAY;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,EAAE,GAAG,IAAI,MAAM,CAAC,WAAI,IAAI,MAAG,EAAE,GAAG,CAAC,CAAC;IAC3C,CAAC;IAED,+BAAQ,GAAR,UAAS,OAAoB;QACzB,IAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC7C,IAAI,OAAO,CAAC,eAAe,EAAE;YACzB,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM;gBAAE,OAAO,IAAI,4BAAY,CAAC,KAAK,CAAC,CAAC;YAC1E,OAAO,IAAI,4BAAY,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;SACrD;QAED,OAAO,IAAI,4BAAY,CAAC,CAAC,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;IACL,mBAAC;AAAD,CAAC,AAlBD,IAkBC;AAlBY,oCAAY"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NodeTestNC = void 0;
|
|
4
|
+
var boolean_value_1 = require("./values/boolean-value");
|
|
5
|
+
var NodeTestNC = /** @class */ (function () {
|
|
6
|
+
function NodeTestNC(nsprefix) {
|
|
7
|
+
this.regex = new RegExp("^".concat(nsprefix, ":"));
|
|
8
|
+
this.nsprefix = nsprefix;
|
|
9
|
+
}
|
|
10
|
+
NodeTestNC.prototype.evaluate = function (ctx) {
|
|
11
|
+
var n = ctx.node;
|
|
12
|
+
return new boolean_value_1.BooleanValue(n.nodeName.match(this.regex));
|
|
13
|
+
};
|
|
14
|
+
return NodeTestNC;
|
|
15
|
+
}());
|
|
16
|
+
exports.NodeTestNC = NodeTestNC;
|
|
17
|
+
//# sourceMappingURL=node-test-nc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-test-nc.js","sourceRoot":"","sources":["../../src/xpath/node-test-nc.ts"],"names":[],"mappings":";;;AAAA,wDAAsD;AAEtD;IAKI,oBAAY,QAAQ;QAChB,IAAI,CAAC,KAAK,GAAG,IAAI,MAAM,CAAC,WAAI,QAAQ,MAAG,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED,6BAAQ,GAAR,UAAS,GAAG;QACR,IAAM,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC;QACnB,OAAO,IAAI,4BAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1D,CAAC;IACL,iBAAC;AAAD,CAAC,AAdD,IAcC;AAdY,gCAAU"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NodeTestPI = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
var constants_1 = require("../constants");
|
|
5
|
+
var boolean_value_1 = require("./values/boolean-value");
|
|
6
|
+
var NodeTestPI = /** @class */ (function () {
|
|
7
|
+
function NodeTestPI(target) {
|
|
8
8
|
this.target = target;
|
|
9
9
|
}
|
|
10
|
-
evaluate(ctx) {
|
|
10
|
+
NodeTestPI.prototype.evaluate = function (ctx) {
|
|
11
11
|
return new boolean_value_1.BooleanValue(ctx.node.nodeType == constants_1.DOM_PROCESSING_INSTRUCTION_NODE && (!this.target || ctx.node.nodeName == this.target));
|
|
12
|
-
}
|
|
13
|
-
|
|
12
|
+
};
|
|
13
|
+
return NodeTestPI;
|
|
14
|
+
}());
|
|
14
15
|
exports.NodeTestPI = NodeTestPI;
|
|
15
16
|
//# sourceMappingURL=node-test-pi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-test-pi.js","sourceRoot":"","sources":["../../src/xpath/node-test-pi.ts"],"names":[],"mappings":";;;AAAA,0CAA+D;AAC/D,wDAAsD;AAEtD;IAGI,oBAAY,MAAM;QACd,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED,6BAAQ,GAAR,UAAS,GAAG;QACR,OAAO,IAAI,4BAAY,CACnB,GAAG,CAAC,IAAI,CAAC,QAAQ,IAAI,2CAA+B,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,CAC7G,CAAC;IACN,CAAC;IACL,iBAAC;AAAD,CAAC,AAZD,IAYC;AAZY,gCAAU"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NodeTestText = void 0;
|
|
4
|
+
var constants_1 = require("../constants");
|
|
5
|
+
var boolean_value_1 = require("./values/boolean-value");
|
|
6
|
+
var NodeTestText = /** @class */ (function () {
|
|
7
|
+
function NodeTestText() {
|
|
8
|
+
}
|
|
9
|
+
NodeTestText.prototype.evaluate = function (ctx) {
|
|
10
|
+
return new boolean_value_1.BooleanValue(ctx.node.nodeType == constants_1.DOM_TEXT_NODE);
|
|
11
|
+
};
|
|
12
|
+
return NodeTestText;
|
|
13
|
+
}());
|
|
14
|
+
exports.NodeTestText = NodeTestText;
|
|
15
|
+
//# sourceMappingURL=node-test-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-test-text.js","sourceRoot":"","sources":["../../src/xpath/node-test-text.ts"],"names":[],"mappings":";;;AAAA,0CAA6C;AAC7C,wDAAsD;AAEtD;IAAA;IAIA,CAAC;IAHG,+BAAQ,GAAR,UAAS,GAAG;QACR,OAAO,IAAI,4BAAY,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,IAAI,yBAAa,CAAC,CAAC;IAChE,CAAC;IACL,mBAAC;AAAD,CAAC,AAJD,IAIC;AAJY,oCAAY"}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
export declare const xpathAxis: {
|
|
2
|
+
ANCESTOR_OR_SELF: string;
|
|
3
|
+
ANCESTOR: string;
|
|
4
|
+
ATTRIBUTE: string;
|
|
5
|
+
CHILD: string;
|
|
6
|
+
DESCENDANT_OR_SELF: string;
|
|
7
|
+
DESCENDANT: string;
|
|
8
|
+
FOLLOWING_SIBLING: string;
|
|
9
|
+
FOLLOWING: string;
|
|
10
|
+
NAMESPACE: string;
|
|
11
|
+
PARENT: string;
|
|
12
|
+
PRECEDING_SIBLING: string;
|
|
13
|
+
PRECEDING: string;
|
|
14
|
+
SELF: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const TOK_PIPE: {
|
|
17
|
+
label: string;
|
|
18
|
+
prec: number;
|
|
19
|
+
re: RegExp;
|
|
20
|
+
key: any;
|
|
21
|
+
};
|
|
22
|
+
export declare const TOK_DSLASH: {
|
|
23
|
+
label: string;
|
|
24
|
+
prec: number;
|
|
25
|
+
re: RegExp;
|
|
26
|
+
key: any;
|
|
27
|
+
};
|
|
28
|
+
export declare const TOK_SLASH: {
|
|
29
|
+
label: string;
|
|
30
|
+
prec: number;
|
|
31
|
+
re: RegExp;
|
|
32
|
+
key: any;
|
|
33
|
+
};
|
|
34
|
+
export declare const TOK_AXIS: {
|
|
35
|
+
label: string;
|
|
36
|
+
prec: number;
|
|
37
|
+
re: RegExp;
|
|
38
|
+
key: any;
|
|
39
|
+
};
|
|
40
|
+
export declare const TOK_COLON: {
|
|
41
|
+
label: string;
|
|
42
|
+
prec: number;
|
|
43
|
+
re: RegExp;
|
|
44
|
+
key: any;
|
|
45
|
+
};
|
|
46
|
+
export declare const TOK_AXISNAME: {
|
|
47
|
+
label: string;
|
|
48
|
+
re: RegExp;
|
|
49
|
+
key: any;
|
|
50
|
+
};
|
|
51
|
+
export declare const TOK_PARENO: {
|
|
52
|
+
label: string;
|
|
53
|
+
prec: number;
|
|
54
|
+
re: RegExp;
|
|
55
|
+
key: any;
|
|
56
|
+
};
|
|
57
|
+
export declare const TOK_PARENC: {
|
|
58
|
+
label: string;
|
|
59
|
+
re: RegExp;
|
|
60
|
+
key: any;
|
|
61
|
+
};
|
|
62
|
+
export declare const TOK_DDOT: {
|
|
63
|
+
label: string;
|
|
64
|
+
prec: number;
|
|
65
|
+
re: RegExp;
|
|
66
|
+
key: any;
|
|
67
|
+
};
|
|
68
|
+
export declare const TOK_DOT: {
|
|
69
|
+
label: string;
|
|
70
|
+
prec: number;
|
|
71
|
+
re: RegExp;
|
|
72
|
+
key: any;
|
|
73
|
+
};
|
|
74
|
+
export declare const TOK_AT: {
|
|
75
|
+
label: string;
|
|
76
|
+
prec: number;
|
|
77
|
+
re: RegExp;
|
|
78
|
+
key: any;
|
|
79
|
+
};
|
|
80
|
+
export declare const TOK_COMMA: {
|
|
81
|
+
label: string;
|
|
82
|
+
re: RegExp;
|
|
83
|
+
key: any;
|
|
84
|
+
};
|
|
85
|
+
export declare const TOK_OR: {
|
|
86
|
+
label: string;
|
|
87
|
+
prec: number;
|
|
88
|
+
re: RegExp;
|
|
89
|
+
key: any;
|
|
90
|
+
};
|
|
91
|
+
export declare const TOK_AND: {
|
|
92
|
+
label: string;
|
|
93
|
+
prec: number;
|
|
94
|
+
re: RegExp;
|
|
95
|
+
key: any;
|
|
96
|
+
};
|
|
97
|
+
export declare const TOK_EQ: {
|
|
98
|
+
label: string;
|
|
99
|
+
prec: number;
|
|
100
|
+
re: RegExp;
|
|
101
|
+
key: any;
|
|
102
|
+
};
|
|
103
|
+
export declare const TOK_NEQ: {
|
|
104
|
+
label: string;
|
|
105
|
+
prec: number;
|
|
106
|
+
re: RegExp;
|
|
107
|
+
key: any;
|
|
108
|
+
};
|
|
109
|
+
export declare const TOK_GE: {
|
|
110
|
+
label: string;
|
|
111
|
+
prec: number;
|
|
112
|
+
re: RegExp;
|
|
113
|
+
key: any;
|
|
114
|
+
};
|
|
115
|
+
export declare const TOK_GT: {
|
|
116
|
+
label: string;
|
|
117
|
+
prec: number;
|
|
118
|
+
re: RegExp;
|
|
119
|
+
key: any;
|
|
120
|
+
};
|
|
121
|
+
export declare const TOK_LE: {
|
|
122
|
+
label: string;
|
|
123
|
+
prec: number;
|
|
124
|
+
re: RegExp;
|
|
125
|
+
key: any;
|
|
126
|
+
};
|
|
127
|
+
export declare const TOK_LT: {
|
|
128
|
+
label: string;
|
|
129
|
+
prec: number;
|
|
130
|
+
re: RegExp;
|
|
131
|
+
key: any;
|
|
132
|
+
};
|
|
133
|
+
export declare const TOK_PLUS: {
|
|
134
|
+
label: string;
|
|
135
|
+
prec: number;
|
|
136
|
+
re: RegExp;
|
|
137
|
+
left: boolean;
|
|
138
|
+
key: any;
|
|
139
|
+
};
|
|
140
|
+
export declare const TOK_MINUS: {
|
|
141
|
+
label: string;
|
|
142
|
+
prec: number;
|
|
143
|
+
re: RegExp;
|
|
144
|
+
left: boolean;
|
|
145
|
+
key: any;
|
|
146
|
+
};
|
|
147
|
+
export declare const TOK_DIV: {
|
|
148
|
+
label: string;
|
|
149
|
+
prec: number;
|
|
150
|
+
re: RegExp;
|
|
151
|
+
left: boolean;
|
|
152
|
+
key: any;
|
|
153
|
+
};
|
|
154
|
+
export declare const TOK_MOD: {
|
|
155
|
+
label: string;
|
|
156
|
+
prec: number;
|
|
157
|
+
re: RegExp;
|
|
158
|
+
left: boolean;
|
|
159
|
+
key: any;
|
|
160
|
+
};
|
|
161
|
+
export declare const TOK_BRACKO: {
|
|
162
|
+
label: string;
|
|
163
|
+
prec: number;
|
|
164
|
+
re: RegExp;
|
|
165
|
+
key: any;
|
|
166
|
+
};
|
|
167
|
+
export declare const TOK_BRACKC: {
|
|
168
|
+
label: string;
|
|
169
|
+
re: RegExp;
|
|
170
|
+
key: any;
|
|
171
|
+
};
|
|
172
|
+
export declare const TOK_DOLLAR: {
|
|
173
|
+
label: string;
|
|
174
|
+
re: RegExp;
|
|
175
|
+
key: any;
|
|
176
|
+
};
|
|
177
|
+
export declare const TOK_NCNAME: {
|
|
178
|
+
label: string;
|
|
179
|
+
re: RegExp;
|
|
180
|
+
key: any;
|
|
181
|
+
};
|
|
182
|
+
export declare const TOK_ASTERISK: {
|
|
183
|
+
label: string;
|
|
184
|
+
prec: number;
|
|
185
|
+
re: RegExp;
|
|
186
|
+
left: boolean;
|
|
187
|
+
key: any;
|
|
188
|
+
};
|
|
189
|
+
export declare const TOK_LITERALQ: {
|
|
190
|
+
label: string;
|
|
191
|
+
prec: number;
|
|
192
|
+
re: RegExp;
|
|
193
|
+
key: any;
|
|
194
|
+
};
|
|
195
|
+
export declare const TOK_LITERALQQ: {
|
|
196
|
+
label: string;
|
|
197
|
+
prec: number;
|
|
198
|
+
re: RegExp;
|
|
199
|
+
key: any;
|
|
200
|
+
};
|
|
201
|
+
export declare const TOK_NUMBER: {
|
|
202
|
+
label: string;
|
|
203
|
+
prec: number;
|
|
204
|
+
re: RegExp;
|
|
205
|
+
key: any;
|
|
206
|
+
};
|
|
207
|
+
export declare const TOK_QNAME: {
|
|
208
|
+
label: string;
|
|
209
|
+
re: RegExp;
|
|
210
|
+
key: any;
|
|
211
|
+
};
|
|
212
|
+
export declare const TOK_NODEO: {
|
|
213
|
+
label: string;
|
|
214
|
+
re: RegExp;
|
|
215
|
+
key: any;
|
|
216
|
+
};
|
|
217
|
+
export declare const xpathTokenRules: {
|
|
218
|
+
label: string;
|
|
219
|
+
re: RegExp;
|
|
220
|
+
key: any;
|
|
221
|
+
}[];
|
|
222
|
+
export declare const Q_01: {
|
|
223
|
+
label: string;
|
|
224
|
+
};
|
|
225
|
+
export declare const Q_MM: {
|
|
226
|
+
label: string;
|
|
227
|
+
};
|
|
228
|
+
export declare const Q_1M: {
|
|
229
|
+
label: string;
|
|
230
|
+
};
|
|
231
|
+
export declare const ASSOC_LEFT = true;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// necessary and too complicated. Simplify this!
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.ASSOC_LEFT = exports.Q_1M = exports.Q_MM = exports.Q_01 = exports.xpathTokenRules = exports.TOK_NODEO = exports.TOK_QNAME = exports.TOK_NUMBER = exports.TOK_LITERALQQ = exports.TOK_LITERALQ = exports.TOK_ASTERISK = exports.TOK_NCNAME = exports.TOK_DOLLAR = exports.TOK_BRACKC = exports.TOK_BRACKO = exports.TOK_MOD = exports.TOK_DIV = exports.TOK_MINUS = exports.TOK_PLUS = exports.TOK_LT = exports.TOK_LE = exports.TOK_GT = exports.TOK_GE = exports.TOK_NEQ = exports.TOK_EQ = exports.TOK_AND = exports.TOK_OR = exports.TOK_COMMA = exports.TOK_AT = exports.TOK_DOT = exports.TOK_DDOT = exports.TOK_PARENC = exports.TOK_PARENO = exports.TOK_AXISNAME = exports.TOK_COLON = exports.TOK_AXIS = exports.TOK_SLASH = exports.TOK_DSLASH = exports.TOK_PIPE = exports.xpathAxis = void 0;
|
|
9
|
-
|
|
9
|
+
var xmltoken_1 = require("../dom/xmltoken");
|
|
10
10
|
// NOTE: tabular formatting is the big exception, but here it should
|
|
11
11
|
// be OK.
|
|
12
12
|
// The axes of XPath expressions.
|
|
@@ -25,7 +25,7 @@ exports.xpathAxis = {
|
|
|
25
25
|
PRECEDING: 'preceding',
|
|
26
26
|
SELF: 'self'
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
var xpathAxesRe = [
|
|
29
29
|
exports.xpathAxis.ANCESTOR_OR_SELF,
|
|
30
30
|
exports.xpathAxis.ANCESTOR,
|
|
31
31
|
exports.xpathAxis.ATTRIBUTE,
|
|
@@ -72,7 +72,7 @@ exports.TOK_COLON = {
|
|
|
72
72
|
};
|
|
73
73
|
exports.TOK_AXISNAME = {
|
|
74
74
|
label: '[axis]',
|
|
75
|
-
re: new RegExp(
|
|
75
|
+
re: new RegExp("^(".concat(xpathAxesRe, ")")),
|
|
76
76
|
key: undefined
|
|
77
77
|
};
|
|
78
78
|
exports.TOK_PARENO = {
|
|
@@ -203,7 +203,7 @@ exports.TOK_DOLLAR = {
|
|
|
203
203
|
};
|
|
204
204
|
exports.TOK_NCNAME = {
|
|
205
205
|
label: '[ncname]',
|
|
206
|
-
re: new RegExp(
|
|
206
|
+
re: new RegExp("^".concat(xmltoken_1.XML_NC_NAME)),
|
|
207
207
|
key: undefined
|
|
208
208
|
};
|
|
209
209
|
exports.TOK_ASTERISK = {
|
|
@@ -233,7 +233,7 @@ exports.TOK_NUMBER = {
|
|
|
233
233
|
};
|
|
234
234
|
exports.TOK_QNAME = {
|
|
235
235
|
label: '[qname]',
|
|
236
|
-
re: new RegExp(
|
|
236
|
+
re: new RegExp("^(".concat(xmltoken_1.XML_NC_NAME, ":)?").concat(xmltoken_1.XML_NC_NAME)),
|
|
237
237
|
key: undefined
|
|
238
238
|
};
|
|
239
239
|
exports.TOK_NODEO = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../src/xpath/tokens.ts"],"names":[],"mappings":";AAAA,kEAAkE;AAClE,oEAAoE;AACpE,sEAAsE;AACtE,+DAA+D;AAC/D,gDAAgD;;;AAEhD,4CAA8C;AAE9C,oEAAoE;AACpE,SAAS;AAET,iCAAiC;AAEpB,QAAA,SAAS,GAAG;IACrB,gBAAgB,EAAE,kBAAkB;IACpC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,KAAK,EAAE,OAAO;IACd,kBAAkB,EAAE,oBAAoB;IACxC,UAAU,EAAE,YAAY;IACxB,iBAAiB,EAAE,mBAAmB;IACtC,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;IAChB,iBAAiB,EAAE,mBAAmB;IACtC,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,MAAM;CACf,CAAC;AAEF,IAAM,WAAW,GACb;IACI,iBAAS,CAAC,gBAAgB;IAC1B,iBAAS,CAAC,QAAQ;IAClB,iBAAS,CAAC,SAAS;IACnB,iBAAS,CAAC,KAAK;IACf,iBAAS,CAAC,kBAAkB;IAC5B,iBAAS,CAAC,UAAU;IAC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AG;IAChB,KAAK,EAAE,GAAG;CACb,CAAC;AAEF,oEAAoE;AACvD,QAAA,UAAU,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BooleanValue = void 0;
|
|
4
|
+
var BooleanValue = /** @class */ (function () {
|
|
5
|
+
function BooleanValue(value) {
|
|
6
|
+
this.value = value;
|
|
7
|
+
this.type = 'boolean';
|
|
8
|
+
}
|
|
9
|
+
BooleanValue.prototype.stringValue = function () {
|
|
10
|
+
return "".concat(this.value);
|
|
11
|
+
};
|
|
12
|
+
BooleanValue.prototype.booleanValue = function () {
|
|
13
|
+
return this.value;
|
|
14
|
+
};
|
|
15
|
+
BooleanValue.prototype.numberValue = function () {
|
|
16
|
+
return this.value ? 1 : 0;
|
|
17
|
+
};
|
|
18
|
+
BooleanValue.prototype.nodeSetValue = function () {
|
|
19
|
+
throw this;
|
|
20
|
+
};
|
|
21
|
+
return BooleanValue;
|
|
22
|
+
}());
|
|
23
|
+
exports.BooleanValue = BooleanValue;
|
|
24
|
+
//# sourceMappingURL=boolean-value.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boolean-value.js","sourceRoot":"","sources":["../../../src/xpath/values/boolean-value.ts"],"names":[],"mappings":";;;AAAA;IAKI,sBAAY,KAAU;QAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;IAC1B,CAAC;IAED,kCAAW,GAAX;QACI,OAAO,UAAG,IAAI,CAAC,KAAK,CAAE,CAAC;IAC3B,CAAC;IAED,mCAAY,GAAZ;QACI,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,kCAAW,GAAX;QACI,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC;IAED,mCAAY,GAAZ;QACI,MAAM,IAAI,CAAC;IACf,CAAC;IACL,mBAAC;AAAD,CAAC,AAzBD,IAyBC;AAzBY,oCAAY"}
|