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 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/xpath/values/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,mDAAiC;AACjC,iDAA+B;AAC/B,iDAA+B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NodeSetValue = void 0;
|
|
4
|
+
var dom_1 = require("../../dom");
|
|
5
|
+
var NodeSetValue = /** @class */ (function () {
|
|
6
|
+
function NodeSetValue(value) {
|
|
7
|
+
this.value = value;
|
|
8
|
+
this.type = 'node-set';
|
|
9
|
+
}
|
|
10
|
+
NodeSetValue.prototype.stringValue = function () {
|
|
11
|
+
if (this.value.length === 0) {
|
|
12
|
+
return '';
|
|
13
|
+
}
|
|
14
|
+
return (0, dom_1.xmlValue)(this.value[0]);
|
|
15
|
+
};
|
|
16
|
+
NodeSetValue.prototype.booleanValue = function () {
|
|
17
|
+
return this.value.length > 0;
|
|
18
|
+
};
|
|
19
|
+
NodeSetValue.prototype.numberValue = function () {
|
|
20
|
+
return this.stringValue() - 0;
|
|
21
|
+
};
|
|
22
|
+
NodeSetValue.prototype.nodeSetValue = function () {
|
|
23
|
+
return this.value;
|
|
24
|
+
};
|
|
25
|
+
return NodeSetValue;
|
|
26
|
+
}());
|
|
27
|
+
exports.NodeSetValue = NodeSetValue;
|
|
28
|
+
//# sourceMappingURL=node-set-value.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-set-value.js","sourceRoot":"","sources":["../../../src/xpath/values/node-set-value.ts"],"names":[],"mappings":";;;AAAA,iCAAqC;AAErC;IAII,sBAAY,KAAU;QAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IAC3B,CAAC;IAED,kCAAW,GAAX;QACI,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACzB,OAAO,EAAE,CAAC;SACb;QAED,OAAO,IAAA,cAAQ,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC;IAED,mCAAY,GAAZ;QACI,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IACjC,CAAC;IAED,kCAAW,GAAX;QACI,OAAO,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IAClC,CAAC;IAED,mCAAY,GAAZ;QACI,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IACL,mBAAC;AAAD,CAAC,AA5BD,IA4BC;AA5BY,oCAAY"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NumberValue = void 0;
|
|
4
|
+
var NumberValue = /** @class */ (function () {
|
|
5
|
+
function NumberValue(value) {
|
|
6
|
+
this.value = value;
|
|
7
|
+
this.type = 'number';
|
|
8
|
+
}
|
|
9
|
+
NumberValue.prototype.stringValue = function () {
|
|
10
|
+
return "".concat(this.value);
|
|
11
|
+
};
|
|
12
|
+
NumberValue.prototype.booleanValue = function () {
|
|
13
|
+
return !!this.value;
|
|
14
|
+
};
|
|
15
|
+
NumberValue.prototype.numberValue = function () {
|
|
16
|
+
return this.value - 0;
|
|
17
|
+
};
|
|
18
|
+
NumberValue.prototype.nodeSetValue = function () {
|
|
19
|
+
throw this;
|
|
20
|
+
};
|
|
21
|
+
return NumberValue;
|
|
22
|
+
}());
|
|
23
|
+
exports.NumberValue = NumberValue;
|
|
24
|
+
//# sourceMappingURL=number-value.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number-value.js","sourceRoot":"","sources":["../../../src/xpath/values/number-value.ts"],"names":[],"mappings":";;;AAAA;IAKI,qBAAY,KAAU;QAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC;IACzB,CAAC;IAED,iCAAW,GAAX;QACI,OAAO,UAAG,IAAI,CAAC,KAAK,CAAE,CAAC;IAC3B,CAAC;IAED,kCAAY,GAAZ;QACI,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;IACxB,CAAC;IAED,iCAAW,GAAX;QACI,OAAO,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IAC1B,CAAC;IAED,kCAAY,GAAZ;QACI,MAAM,IAAI,CAAC;IACf,CAAC;IACL,kBAAC;AAAD,CAAC,AAzBD,IAyBC;AAzBY,kCAAW"}
|
|
@@ -33,23 +33,24 @@
|
|
|
33
33
|
//
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
35
|
exports.StringValue = void 0;
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
var StringValue = /** @class */ (function () {
|
|
37
|
+
function StringValue(value) {
|
|
38
38
|
this.value = value;
|
|
39
39
|
this.type = 'string';
|
|
40
40
|
}
|
|
41
|
-
stringValue() {
|
|
41
|
+
StringValue.prototype.stringValue = function () {
|
|
42
42
|
return this.value;
|
|
43
|
-
}
|
|
44
|
-
booleanValue() {
|
|
43
|
+
};
|
|
44
|
+
StringValue.prototype.booleanValue = function () {
|
|
45
45
|
return this.value.length > 0;
|
|
46
|
-
}
|
|
47
|
-
numberValue() {
|
|
46
|
+
};
|
|
47
|
+
StringValue.prototype.numberValue = function () {
|
|
48
48
|
return this.value - 0;
|
|
49
|
-
}
|
|
50
|
-
nodeSetValue() {
|
|
49
|
+
};
|
|
50
|
+
StringValue.prototype.nodeSetValue = function () {
|
|
51
51
|
throw this;
|
|
52
|
-
}
|
|
53
|
-
|
|
52
|
+
};
|
|
53
|
+
return StringValue;
|
|
54
|
+
}());
|
|
54
55
|
exports.StringValue = StringValue;
|
|
55
56
|
//# sourceMappingURL=string-value.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string-value.js","sourceRoot":"","sources":["../../../src/xpath/values/string-value.ts"],"names":[],"mappings":";AAAA,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,qEAAqE;AACrE,kEAAkE;AAClE,gEAAgE;AAChE,sEAAsE;AACtE,oEAAoE;AACpE,wDAAwD;AACxD,EAAE;AACF,sBAAsB;AACtB,EAAE;AACF,gBAAgB;AAChB,EAAE;AACF,gBAAgB;AAChB,EAAE;AACF,iBAAiB;AACjB,EAAE;AACF,iBAAiB;AACjB,EAAE;AACF,qEAAqE;AACrE,2CAA2C;AAC3C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,iEAAiE;AACjE,EAAE;AACF,qEAAqE;AACrE,kBAAkB;AAClB,EAAE;;;AAEF;IAKI,qBAAY,KAAK;QACb,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC;IACzB,CAAC;IAED,iCAAW,GAAX;QACI,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,kCAAY,GAAZ;QACI,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IACjC,CAAC;IAED,iCAAW,GAAX;QACI,OAAO,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IAC1B,CAAC;IAED,kCAAY,GAAZ;QACI,MAAM,IAAI,CAAC;IACf,CAAC;IACL,kBAAC;AAAD,CAAC,AAzBD,IAyBC;AAzBY,kCAAW"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export declare const XPathLocationPath: {
|
|
2
|
+
label: string;
|
|
3
|
+
key: any;
|
|
4
|
+
};
|
|
5
|
+
export declare const XPathRelativeLocationPath: {
|
|
6
|
+
label: string;
|
|
7
|
+
key: any;
|
|
8
|
+
};
|
|
9
|
+
export declare const XPathAbsoluteLocationPath: {
|
|
10
|
+
label: string;
|
|
11
|
+
key: any;
|
|
12
|
+
};
|
|
13
|
+
export declare const XPathStep: {
|
|
14
|
+
label: string;
|
|
15
|
+
key: any;
|
|
16
|
+
};
|
|
17
|
+
export declare const XPathNodeTest: {
|
|
18
|
+
label: string;
|
|
19
|
+
key: any;
|
|
20
|
+
};
|
|
21
|
+
export declare const XPathPredicate: {
|
|
22
|
+
label: string;
|
|
23
|
+
key: any;
|
|
24
|
+
};
|
|
25
|
+
export declare const XPathLiteral: {
|
|
26
|
+
label: string;
|
|
27
|
+
key: any;
|
|
28
|
+
};
|
|
29
|
+
export declare const XPathExpr: {
|
|
30
|
+
label: string;
|
|
31
|
+
key: any;
|
|
32
|
+
};
|
|
33
|
+
export declare const XPathPrimaryExpr: {
|
|
34
|
+
label: string;
|
|
35
|
+
key: any;
|
|
36
|
+
};
|
|
37
|
+
export declare const XPathVariableReference: {
|
|
38
|
+
label: string;
|
|
39
|
+
key: any;
|
|
40
|
+
};
|
|
41
|
+
export declare const XPathNumber: {
|
|
42
|
+
label: string;
|
|
43
|
+
key: any;
|
|
44
|
+
};
|
|
45
|
+
export declare const XPathFunctionCall: {
|
|
46
|
+
label: string;
|
|
47
|
+
key: any;
|
|
48
|
+
};
|
|
49
|
+
export declare const XPathArgumentRemainder: {
|
|
50
|
+
label: string;
|
|
51
|
+
key: any;
|
|
52
|
+
};
|
|
53
|
+
export declare const XPathPathExpr: {
|
|
54
|
+
label: string;
|
|
55
|
+
key: any;
|
|
56
|
+
};
|
|
57
|
+
export declare const XPathUnionExpr: {
|
|
58
|
+
label: string;
|
|
59
|
+
key: any;
|
|
60
|
+
};
|
|
61
|
+
export declare const XPathFilterExpr: {
|
|
62
|
+
label: string;
|
|
63
|
+
key: any;
|
|
64
|
+
};
|
|
65
|
+
export declare const XPathDigits: {
|
|
66
|
+
label: string;
|
|
67
|
+
key: any;
|
|
68
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xpath-grammar-rules.js","sourceRoot":"","sources":["../../src/xpath/xpath-grammar-rules.ts"],"names":[],"mappings":";AAAA,mEAAmE;AACnE,kEAAkE;;;AAElE,eAAe;AACF,QAAA,iBAAiB,GAAG;IAC7B,KAAK,EAAE,cAAc;IACrB,GAAG,EAAE,SAAS;CACjB,CAAC;AACW,QAAA,yBAAyB,GAAG;IACrC,KAAK,EAAE,sBAAsB;IAC7B,GAAG,EAAE,SAAS;CACjB,CAAC;AACW,QAAA,yBAAyB,GAAG;IACrC,KAAK,EAAE,sBAAsB;IAC7B,GAAG,EAAE,SAAS;CACjB,CAAC;AACW,QAAA,SAAS,GAAG;IACrB,KAAK,EAAE,MAAM;IACb,GAAG,EAAE,SAAS;CACjB,CAAC;AACW,QAAA,aAAa,GAAG;IACzB,KAAK,EAAE,UAAU;IACjB,GAAG,EAAE,SAAS;CACjB,CAAC;AACW,QAAA,cAAc,GAAG;IAC1B,KAAK,EAAE,WAAW;IAClB,GAAG,EAAE,SAAS;CACjB,CAAC;AACW,QAAA,YAAY,GAAG;IACxB,KAAK,EAAE,SAAS;IAChB,GAAG,EAAE,SAAS;CACjB,CAAC;AACW,QAAA,SAAS,GAAG;IACrB,KAAK,EAAE,MAAM;IACb,GAAG,EAAE,SAAS;CACjB,CAAC;AACW,QAAA,gBAAgB,GAAG;IAC5B,KAAK,EAAE,aAAa;IACpB,GAAG,EAAE,SAAS;CACjB,CAAC;AACW,QAAA,sBAAsB,GAAG;IAClC,KAAK,EAAE,mBAAmB;IAC1B,GAAG,EAAE,SAAS;CACjB,CAAC;AACW,QAAA,WAAW,GAAG;IACvB,KAAK,EAAE,QAAQ;IACf,GAAG,EAAE,SAAS;CACjB,CAAC;AACW,QAAA,iBAAiB,GAAG;IAC7B,KAAK,EAAE,cAAc;IACrB,GAAG,EAAE,SAAS;CACjB,CAAC;AACW,QAAA,sBAAsB,GAAG;IAClC,KAAK,EAAE,mBAAmB;IAC1B,GAAG,EAAE,SAAS;CACjB,CAAC;AACW,QAAA,aAAa,GAAG;IACzB,KAAK,EAAE,UAAU;IACjB,GAAG,EAAE,SAAS;CACjB,CAAC;AACW,QAAA,cAAc,GAAG;IAC1B,KAAK,EAAE,WAAW;IAClB,GAAG,EAAE,SAAS;CACjB,CAAC;AACW,QAAA,eAAe,GAAG;IAC3B,KAAK,EAAE,YAAY;IACnB,GAAG,EAAE,SAAS;CACjB,CAAC;AACW,QAAA,WAAW,GAAG;IACvB,KAAK,EAAE,QAAQ;IACf,GAAG,EAAE,SAAS;CACjB,CAAC"}
|
package/xpath/xpath.d.ts
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { ExprContext } from './expr-context';
|
|
2
|
+
import { BinaryExpr, FunctionCallExpr, LiteralExpr, LocationExpr, NumberExpr, PathExpr, PredicateExpr, StepExpr, TokenExpr, UnaryMinusExpr, UnionExpr, VariableExpr } from './expressions';
|
|
3
|
+
import { NodeTestAny } from './node-test-any';
|
|
4
|
+
import { NodeTestComment } from './node-test-comment';
|
|
5
|
+
import { NodeTestElementOrAttribute } from './node-test-element-or-attribute';
|
|
6
|
+
import { NodeTestName } from './node-test-name';
|
|
7
|
+
import { NodeTestNC } from './node-test-nc';
|
|
8
|
+
import { NodeTestPI } from './node-test-pi';
|
|
9
|
+
import { NodeTestText } from './node-test-text';
|
|
10
|
+
export declare class XPath {
|
|
11
|
+
xPathParseCache: any;
|
|
12
|
+
xPathRules: any[];
|
|
13
|
+
xPathGrammarRules: ((number | {
|
|
14
|
+
label: string;
|
|
15
|
+
key: any;
|
|
16
|
+
} | {
|
|
17
|
+
label: string;
|
|
18
|
+
key: any;
|
|
19
|
+
}[] | ((rel: any, slash: any, step: any) => any))[] | (number | {
|
|
20
|
+
label: string;
|
|
21
|
+
key: any;
|
|
22
|
+
} | {
|
|
23
|
+
label: string;
|
|
24
|
+
}[] | ((name: any, pareno: any, arg1: any, args: any) => FunctionCallExpr))[] | (number | {
|
|
25
|
+
label: string;
|
|
26
|
+
key: any;
|
|
27
|
+
} | {
|
|
28
|
+
label: string;
|
|
29
|
+
}[] | ((expr: any, predicates: any) => any))[] | (number | boolean | {
|
|
30
|
+
label: string;
|
|
31
|
+
key: any;
|
|
32
|
+
} | {
|
|
33
|
+
label: string;
|
|
34
|
+
key: any;
|
|
35
|
+
}[] | ((expr1: any, op: any, expr2: any) => BinaryExpr))[])[];
|
|
36
|
+
constructor();
|
|
37
|
+
makeTokenExpr(m: any): TokenExpr;
|
|
38
|
+
passExpr(e: any): any;
|
|
39
|
+
makeLocationExpr1(slash: any, rel: any): any;
|
|
40
|
+
makeLocationExpr2(dslash: any, rel: any): any;
|
|
41
|
+
makeLocationExpr3(): LocationExpr;
|
|
42
|
+
makeLocationExpr4(dslash: any): LocationExpr;
|
|
43
|
+
makeLocationExpr5(step: any): LocationExpr;
|
|
44
|
+
makeLocationExpr6(rel: any, slash: any, step: any): any;
|
|
45
|
+
makeLocationExpr7(rel: any, dslash: any, step: any): any;
|
|
46
|
+
makeStepExpr1(dot: any): StepExpr;
|
|
47
|
+
makeStepExpr2(ddot: any): StepExpr;
|
|
48
|
+
makeStepExpr3(axisname: any, axis: any, nodetest: any): StepExpr;
|
|
49
|
+
makeStepExpr4(at: any, nodetest: any): StepExpr;
|
|
50
|
+
makeStepExpr5(nodetest: any): StepExpr;
|
|
51
|
+
makeStepExpr6(step: any, predicate: any): any;
|
|
52
|
+
makeAbbrevStep(abbrev: any): StepExpr;
|
|
53
|
+
makeNodeTestExpr1(): NodeTestElementOrAttribute;
|
|
54
|
+
makeNodeTestExpr2(ncname: any): NodeTestNC;
|
|
55
|
+
makeNodeTestExpr3(qname: any): NodeTestName;
|
|
56
|
+
makeNodeTestExpr4(typeo: any): NodeTestAny | NodeTestComment | NodeTestPI | NodeTestText;
|
|
57
|
+
makeNodeTestExpr5(typeo: any, target: any): NodeTestPI;
|
|
58
|
+
makePredicateExpr(pareno: any, expr: any): PredicateExpr;
|
|
59
|
+
makePrimaryExpr(pareno: any, expr: any): any;
|
|
60
|
+
makeFunctionCallExpr1(name: any): FunctionCallExpr;
|
|
61
|
+
makeFunctionCallExpr2(name: any, pareno: any, arg1: any, args: any): FunctionCallExpr;
|
|
62
|
+
makeArgumentExpr(comma: any, expr: any): any;
|
|
63
|
+
makeUnionExpr(expr1: any, pipe: any, expr2: any): UnionExpr;
|
|
64
|
+
makePathExpr1(filter: any, slash: any, rel: any): PathExpr;
|
|
65
|
+
makePathExpr2(filter: any, dslash: any, rel: any): PathExpr;
|
|
66
|
+
makeFilterExpr(expr: any, predicates: any): any;
|
|
67
|
+
makeUnaryMinusExpr(minus: any, expr: any): UnaryMinusExpr;
|
|
68
|
+
makeBinaryExpr(expr1: any, op: any, expr2: any): BinaryExpr;
|
|
69
|
+
makeLiteralExpr(token: any): LiteralExpr;
|
|
70
|
+
makeNumberExpr(token: any): NumberExpr;
|
|
71
|
+
makeVariableReference(dollar: any, name: any): VariableExpr;
|
|
72
|
+
makeSimpleExpr(expr: any): LocationExpr | NumberExpr | VariableExpr;
|
|
73
|
+
makeSimpleExpr2(expr: any): LocationExpr;
|
|
74
|
+
stackToString(stack: any[]): string;
|
|
75
|
+
xPathCacheLookup(expr: any): any;
|
|
76
|
+
xPathCollectDescendants(nodelist: any, node: any, opt_tagName?: any): void;
|
|
77
|
+
xPathCollectDescendantsReverse(nodelist: any, node: any): void;
|
|
78
|
+
xPathEval(select: string, context: ExprContext): any;
|
|
79
|
+
/**
|
|
80
|
+
* DGF - extract a tag name suitable for getElementsByTagName
|
|
81
|
+
*
|
|
82
|
+
* @param nodetest the node test
|
|
83
|
+
* @param ignoreNonElementNodesForNTA if true, the node list returned when
|
|
84
|
+
* evaluating "node()" will not contain
|
|
85
|
+
* non-element nodes. This can boost
|
|
86
|
+
* performance. This is false by default.
|
|
87
|
+
*/
|
|
88
|
+
xPathExtractTagNameFromNodeTest(nodetest: any, ignoreNonElementNodesForNTA: any): string;
|
|
89
|
+
xPathMatchStack(stack: any, pattern: any): any;
|
|
90
|
+
/**
|
|
91
|
+
* The entry point for the parser.
|
|
92
|
+
* @param expr a string that contains an XPath expression.
|
|
93
|
+
* @param xPathLog TODO
|
|
94
|
+
* @returns an expression object that can be evaluated with an
|
|
95
|
+
* expression context.
|
|
96
|
+
*/
|
|
97
|
+
xPathParse(expr: any, xPathLog?: (message: string) => void): any;
|
|
98
|
+
xPathParseInit(xPathLog: Function): void;
|
|
99
|
+
xPathReduce(stack: any, ahead: any, xpathLog?: (message: string) => void): any;
|
|
100
|
+
xPathSort(context: ExprContext, sort: any[]): void;
|
|
101
|
+
xPathSortByKey(v1: any, v2: any): number;
|
|
102
|
+
xPathStep(nodes: any[], steps: any[], step: any, input: any, ctx: ExprContext): void;
|
|
103
|
+
xPathGrammarPrecedence(frame: any): number;
|
|
104
|
+
xPathTokenPrecedence(tag: any): any;
|
|
105
|
+
}
|