xslt-processor 3.3.1 → 4.0.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.
Files changed (265) hide show
  1. package/README.md +7 -2
  2. package/index.d.mts +817 -0
  3. package/index.d.ts +817 -4
  4. package/index.js +4467 -12
  5. package/index.js.map +1 -1
  6. package/index.mjs +4431 -0
  7. package/index.mjs.map +1 -0
  8. package/package.json +24 -19
  9. package/umd/xslt-processor.global.js +9 -0
  10. package/umd/xslt-processor.global.js.map +1 -0
  11. package/constants.d.ts +0 -12
  12. package/constants.js +0 -17
  13. package/constants.js.map +0 -1
  14. package/dom/functions.d.ts +0 -14
  15. package/dom/functions.js +0 -57
  16. package/dom/functions.js.map +0 -1
  17. package/dom/index.d.ts +0 -7
  18. package/dom/index.js +0 -24
  19. package/dom/index.js.map +0 -1
  20. package/dom/util.d.ts +0 -7
  21. package/dom/util.js +0 -43
  22. package/dom/util.js.map +0 -1
  23. package/dom/xbrowser-node.d.ts +0 -9
  24. package/dom/xbrowser-node.js +0 -32
  25. package/dom/xbrowser-node.js.map +0 -1
  26. package/dom/xdocument.d.ts +0 -16
  27. package/dom/xdocument.js +0 -74
  28. package/dom/xdocument.js.map +0 -1
  29. package/dom/xml-functions.d.ts +0 -73
  30. package/dom/xml-functions.js +0 -402
  31. package/dom/xml-functions.js.map +0 -1
  32. package/dom/xml-output-options.d.ts +0 -6
  33. package/dom/xml-output-options.js +0 -3
  34. package/dom/xml-output-options.js.map +0 -1
  35. package/dom/xml-parser.d.ts +0 -47
  36. package/dom/xml-parser.js +0 -308
  37. package/dom/xml-parser.js.map +0 -1
  38. package/dom/xmltoken.d.ts +0 -12
  39. package/dom/xmltoken.js +0 -102
  40. package/dom/xmltoken.js.map +0 -1
  41. package/dom/xnode.d.ts +0 -73
  42. package/dom/xnode.js +0 -451
  43. package/dom/xnode.js.map +0 -1
  44. package/test-without-jest.d.ts +0 -1
  45. package/test-without-jest.js +0 -63
  46. package/test-without-jest.js.map +0 -1
  47. package/umd/constants.d.ts +0 -12
  48. package/umd/dom/functions.d.ts +0 -14
  49. package/umd/dom/index.d.ts +0 -7
  50. package/umd/dom/util.d.ts +0 -7
  51. package/umd/dom/xbrowser-node.d.ts +0 -9
  52. package/umd/dom/xdocument.d.ts +0 -16
  53. package/umd/dom/xml-functions.d.ts +0 -73
  54. package/umd/dom/xml-output-options.d.ts +0 -6
  55. package/umd/dom/xml-parser.d.ts +0 -47
  56. package/umd/dom/xmltoken.d.ts +0 -12
  57. package/umd/dom/xnode.d.ts +0 -73
  58. package/umd/index.d.ts +0 -4
  59. package/umd/test-without-jest.d.ts +0 -1
  60. package/umd/xpath/common-function.d.ts +0 -8
  61. package/umd/xpath/expr-context.d.ts +0 -116
  62. package/umd/xpath/expressions/binary-expr.d.ts +0 -11
  63. package/umd/xpath/expressions/expression.d.ts +0 -4
  64. package/umd/xpath/expressions/filter-expr.d.ts +0 -9
  65. package/umd/xpath/expressions/function-call-expr.d.ts +0 -12
  66. package/umd/xpath/expressions/index.d.ts +0 -13
  67. package/umd/xpath/expressions/literal-expr.d.ts +0 -7
  68. package/umd/xpath/expressions/location-expr.d.ts +0 -15
  69. package/umd/xpath/expressions/number-expr.d.ts +0 -7
  70. package/umd/xpath/expressions/path-expr.d.ts +0 -9
  71. package/umd/xpath/expressions/predicate-expr.d.ts +0 -8
  72. package/umd/xpath/expressions/step-expr.d.ts +0 -25
  73. package/umd/xpath/expressions/token-expr.d.ts +0 -7
  74. package/umd/xpath/expressions/unary-minus-expr.d.ts +0 -8
  75. package/umd/xpath/expressions/union-expr.d.ts +0 -9
  76. package/umd/xpath/expressions/variable-expr.d.ts +0 -7
  77. package/umd/xpath/functions/index.d.ts +0 -4
  78. package/umd/xpath/functions/internal-functions.d.ts +0 -2
  79. package/umd/xpath/functions/non-standard.d.ts +0 -12
  80. package/umd/xpath/functions/standard-20.d.ts +0 -5
  81. package/umd/xpath/functions/standard.d.ts +0 -40
  82. package/umd/xpath/functions/xslt-specific.d.ts +0 -3
  83. package/umd/xpath/grammar-rule-candidate.d.ts +0 -8
  84. package/umd/xpath/index.d.ts +0 -3
  85. package/umd/xpath/match-resolver.d.ts +0 -55
  86. package/umd/xpath/node-tests/index.d.ts +0 -8
  87. package/umd/xpath/node-tests/node-test-any.d.ts +0 -6
  88. package/umd/xpath/node-tests/node-test-comment.d.ts +0 -6
  89. package/umd/xpath/node-tests/node-test-element-or-attribute.d.ts +0 -6
  90. package/umd/xpath/node-tests/node-test-name.d.ts +0 -10
  91. package/umd/xpath/node-tests/node-test-nc.d.ts +0 -9
  92. package/umd/xpath/node-tests/node-test-pi.d.ts +0 -8
  93. package/umd/xpath/node-tests/node-test-text.d.ts +0 -6
  94. package/umd/xpath/node-tests/node-test.d.ts +0 -5
  95. package/umd/xpath/tokens.d.ts +0 -62
  96. package/umd/xpath/values/boolean-value.d.ts +0 -11
  97. package/umd/xpath/values/index.d.ts +0 -5
  98. package/umd/xpath/values/node-set-value.d.ts +0 -11
  99. package/umd/xpath/values/node-value.d.ts +0 -7
  100. package/umd/xpath/values/number-value.d.ts +0 -11
  101. package/umd/xpath/values/string-value.d.ts +0 -11
  102. package/umd/xpath/xpath-grammar-rules.d.ts +0 -68
  103. package/umd/xpath/xpath-token-rule.d.ts +0 -7
  104. package/umd/xpath/xpath.d.ts +0 -174
  105. package/umd/xpathdebug.d.ts +0 -2
  106. package/umd/xslt/index.d.ts +0 -3
  107. package/umd/xslt/xslt-decimal-format-settings.d.ts +0 -28
  108. package/umd/xslt/xslt-options.d.ts +0 -7
  109. package/umd/xslt/xslt-parameter.d.ts +0 -5
  110. package/umd/xslt/xslt.d.ts +0 -269
  111. package/umd/xslt-processor.js +0 -2
  112. package/umd/xslt-processor.js.map +0 -1
  113. package/xpath/common-function.d.ts +0 -8
  114. package/xpath/common-function.js +0 -32
  115. package/xpath/common-function.js.map +0 -1
  116. package/xpath/expr-context.d.ts +0 -116
  117. package/xpath/expr-context.js +0 -191
  118. package/xpath/expr-context.js.map +0 -1
  119. package/xpath/expressions/binary-expr.d.ts +0 -11
  120. package/xpath/expressions/binary-expr.js +0 -166
  121. package/xpath/expressions/binary-expr.js.map +0 -1
  122. package/xpath/expressions/expression.d.ts +0 -4
  123. package/xpath/expressions/expression.js +0 -10
  124. package/xpath/expressions/expression.js.map +0 -1
  125. package/xpath/expressions/filter-expr.d.ts +0 -9
  126. package/xpath/expressions/filter-expr.js +0 -53
  127. package/xpath/expressions/filter-expr.js.map +0 -1
  128. package/xpath/expressions/function-call-expr.d.ts +0 -12
  129. package/xpath/expressions/function-call-expr.js +0 -97
  130. package/xpath/expressions/function-call-expr.js.map +0 -1
  131. package/xpath/expressions/index.d.ts +0 -13
  132. package/xpath/expressions/index.js +0 -30
  133. package/xpath/expressions/index.js.map +0 -1
  134. package/xpath/expressions/literal-expr.d.ts +0 -7
  135. package/xpath/expressions/literal-expr.js +0 -34
  136. package/xpath/expressions/literal-expr.js.map +0 -1
  137. package/xpath/expressions/location-expr.d.ts +0 -15
  138. package/xpath/expressions/location-expr.js +0 -99
  139. package/xpath/expressions/location-expr.js.map +0 -1
  140. package/xpath/expressions/number-expr.d.ts +0 -7
  141. package/xpath/expressions/number-expr.js +0 -34
  142. package/xpath/expressions/number-expr.js.map +0 -1
  143. package/xpath/expressions/path-expr.d.ts +0 -9
  144. package/xpath/expressions/path-expr.js +0 -52
  145. package/xpath/expressions/path-expr.js.map +0 -1
  146. package/xpath/expressions/predicate-expr.d.ts +0 -8
  147. package/xpath/expressions/predicate-expr.js +0 -41
  148. package/xpath/expressions/predicate-expr.js.map +0 -1
  149. package/xpath/expressions/step-expr.d.ts +0 -25
  150. package/xpath/expressions/step-expr.js +0 -281
  151. package/xpath/expressions/step-expr.js.map +0 -1
  152. package/xpath/expressions/token-expr.d.ts +0 -7
  153. package/xpath/expressions/token-expr.js +0 -34
  154. package/xpath/expressions/token-expr.js.map +0 -1
  155. package/xpath/expressions/unary-minus-expr.d.ts +0 -8
  156. package/xpath/expressions/unary-minus-expr.js +0 -34
  157. package/xpath/expressions/unary-minus-expr.js.map +0 -1
  158. package/xpath/expressions/union-expr.d.ts +0 -9
  159. package/xpath/expressions/union-expr.js +0 -51
  160. package/xpath/expressions/union-expr.js.map +0 -1
  161. package/xpath/expressions/variable-expr.d.ts +0 -7
  162. package/xpath/expressions/variable-expr.js +0 -33
  163. package/xpath/expressions/variable-expr.js.map +0 -1
  164. package/xpath/functions/index.d.ts +0 -4
  165. package/xpath/functions/index.js +0 -21
  166. package/xpath/functions/index.js.map +0 -1
  167. package/xpath/functions/internal-functions.d.ts +0 -2
  168. package/xpath/functions/internal-functions.js +0 -22
  169. package/xpath/functions/internal-functions.js.map +0 -1
  170. package/xpath/functions/non-standard.d.ts +0 -12
  171. package/xpath/functions/non-standard.js +0 -45
  172. package/xpath/functions/non-standard.js.map +0 -1
  173. package/xpath/functions/standard-20.d.ts +0 -5
  174. package/xpath/functions/standard-20.js +0 -26
  175. package/xpath/functions/standard-20.js.map +0 -1
  176. package/xpath/functions/standard.d.ts +0 -40
  177. package/xpath/functions/standard.js +0 -442
  178. package/xpath/functions/standard.js.map +0 -1
  179. package/xpath/functions/xslt-specific.d.ts +0 -3
  180. package/xpath/functions/xslt-specific.js +0 -14
  181. package/xpath/functions/xslt-specific.js.map +0 -1
  182. package/xpath/grammar-rule-candidate.d.ts +0 -8
  183. package/xpath/grammar-rule-candidate.js +0 -3
  184. package/xpath/grammar-rule-candidate.js.map +0 -1
  185. package/xpath/index.d.ts +0 -3
  186. package/xpath/index.js +0 -20
  187. package/xpath/index.js.map +0 -1
  188. package/xpath/match-resolver.d.ts +0 -55
  189. package/xpath/match-resolver.js +0 -137
  190. package/xpath/match-resolver.js.map +0 -1
  191. package/xpath/node-tests/index.d.ts +0 -8
  192. package/xpath/node-tests/index.js +0 -18
  193. package/xpath/node-tests/index.js.map +0 -1
  194. package/xpath/node-tests/node-test-any.d.ts +0 -6
  195. package/xpath/node-tests/node-test-any.js +0 -15
  196. package/xpath/node-tests/node-test-any.js.map +0 -1
  197. package/xpath/node-tests/node-test-comment.d.ts +0 -6
  198. package/xpath/node-tests/node-test-comment.js +0 -15
  199. package/xpath/node-tests/node-test-comment.js.map +0 -1
  200. package/xpath/node-tests/node-test-element-or-attribute.d.ts +0 -6
  201. package/xpath/node-tests/node-test-element-or-attribute.js +0 -16
  202. package/xpath/node-tests/node-test-element-or-attribute.js.map +0 -1
  203. package/xpath/node-tests/node-test-name.d.ts +0 -10
  204. package/xpath/node-tests/node-test-name.js +0 -39
  205. package/xpath/node-tests/node-test-name.js.map +0 -1
  206. package/xpath/node-tests/node-test-nc.d.ts +0 -9
  207. package/xpath/node-tests/node-test-nc.js +0 -17
  208. package/xpath/node-tests/node-test-nc.js.map +0 -1
  209. package/xpath/node-tests/node-test-pi.d.ts +0 -8
  210. package/xpath/node-tests/node-test-pi.js +0 -17
  211. package/xpath/node-tests/node-test-pi.js.map +0 -1
  212. package/xpath/node-tests/node-test-text.d.ts +0 -6
  213. package/xpath/node-tests/node-test-text.js +0 -15
  214. package/xpath/node-tests/node-test-text.js.map +0 -1
  215. package/xpath/node-tests/node-test.d.ts +0 -5
  216. package/xpath/node-tests/node-test.js +0 -3
  217. package/xpath/node-tests/node-test.js.map +0 -1
  218. package/xpath/tokens.d.ts +0 -62
  219. package/xpath/tokens.js +0 -301
  220. package/xpath/tokens.js.map +0 -1
  221. package/xpath/values/boolean-value.d.ts +0 -11
  222. package/xpath/values/boolean-value.js +0 -24
  223. package/xpath/values/boolean-value.js.map +0 -1
  224. package/xpath/values/index.d.ts +0 -5
  225. package/xpath/values/index.js +0 -47
  226. package/xpath/values/index.js.map +0 -1
  227. package/xpath/values/node-set-value.d.ts +0 -11
  228. package/xpath/values/node-set-value.js +0 -28
  229. package/xpath/values/node-set-value.js.map +0 -1
  230. package/xpath/values/node-value.d.ts +0 -7
  231. package/xpath/values/node-value.js +0 -3
  232. package/xpath/values/node-value.js.map +0 -1
  233. package/xpath/values/number-value.d.ts +0 -11
  234. package/xpath/values/number-value.js +0 -24
  235. package/xpath/values/number-value.js.map +0 -1
  236. package/xpath/values/string-value.d.ts +0 -11
  237. package/xpath/values/string-value.js +0 -24
  238. package/xpath/values/string-value.js.map +0 -1
  239. package/xpath/xpath-grammar-rules.d.ts +0 -68
  240. package/xpath/xpath-grammar-rules.js +0 -75
  241. package/xpath/xpath-grammar-rules.js.map +0 -1
  242. package/xpath/xpath-token-rule.d.ts +0 -7
  243. package/xpath/xpath-token-rule.js +0 -3
  244. package/xpath/xpath-token-rule.js.map +0 -1
  245. package/xpath/xpath.d.ts +0 -174
  246. package/xpath/xpath.js +0 -912
  247. package/xpath/xpath.js.map +0 -1
  248. package/xpathdebug.d.ts +0 -2
  249. package/xpathdebug.js +0 -188
  250. package/xpathdebug.js.map +0 -1
  251. package/xslt/index.d.ts +0 -3
  252. package/xslt/index.js +0 -20
  253. package/xslt/index.js.map +0 -1
  254. package/xslt/xslt-decimal-format-settings.d.ts +0 -28
  255. package/xslt/xslt-decimal-format-settings.js +0 -3
  256. package/xslt/xslt-decimal-format-settings.js.map +0 -1
  257. package/xslt/xslt-options.d.ts +0 -7
  258. package/xslt/xslt-options.js +0 -3
  259. package/xslt/xslt-options.js.map +0 -1
  260. package/xslt/xslt-parameter.d.ts +0 -5
  261. package/xslt/xslt-parameter.js +0 -3
  262. package/xslt/xslt-parameter.js.map +0 -1
  263. package/xslt/xslt.d.ts +0 -269
  264. package/xslt/xslt.js +0 -1325
  265. package/xslt/xslt.js.map +0 -1
@@ -1,12 +0,0 @@
1
- import { ExprContext } from '../expr-context';
2
- import { Expression } from './expression';
3
- export declare class FunctionCallExpr extends Expression {
4
- name: any;
5
- args: any[];
6
- xPathFunctions: {
7
- [key: string]: Function;
8
- };
9
- constructor(name: any);
10
- appendArg(arg: any): void;
11
- evaluate(context: ExprContext): any;
12
- }
@@ -1,97 +0,0 @@
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.FunctionCallExpr = void 0;
19
- var functions_1 = require("../functions");
20
- var non_standard_1 = require("../functions/non-standard");
21
- var standard_20_1 = require("../functions/standard-20");
22
- var boolean_value_1 = require("../values/boolean-value");
23
- var expression_1 = require("./expression");
24
- var FunctionCallExpr = /** @class */ (function (_super) {
25
- __extends(FunctionCallExpr, _super);
26
- function FunctionCallExpr(name) {
27
- var _this = _super.call(this) || this;
28
- _this.xPathFunctions = {
29
- boolean: functions_1.boolean,
30
- ceiling: functions_1.ceiling,
31
- concat: functions_1.concat,
32
- contains: functions_1.contains,
33
- count: functions_1.count,
34
- current: functions_1.current,
35
- 'ends-with': functions_1.endsWith,
36
- false: functions_1._false,
37
- 'format-number': functions_1.formatNumber,
38
- floor: functions_1.floor,
39
- 'generate-id': functions_1.generateId,
40
- id: functions_1.id,
41
- key: functions_1.key,
42
- lang: functions_1.lang,
43
- last: functions_1.last,
44
- 'local-name': functions_1.localName,
45
- 'lower-case': standard_20_1.lowerCase,
46
- 'replace': standard_20_1._replace,
47
- matches: functions_1.matches,
48
- name: functions_1._name,
49
- 'namespace-uri': functions_1.namespaceUri,
50
- 'normalize-space': functions_1.normalizeSpace,
51
- not: functions_1.not,
52
- number: functions_1.number,
53
- position: functions_1.position,
54
- round: functions_1.round,
55
- 'starts-with': functions_1.startsWith,
56
- string: functions_1._string,
57
- 'xml-to-json': functions_1.xmlToJson,
58
- substring: functions_1.substring,
59
- 'substring-before': functions_1.substringBefore,
60
- 'substring-after': functions_1.substringAfter,
61
- sum: functions_1.sum,
62
- 'string-length': functions_1.stringLength,
63
- translate: functions_1.translate,
64
- true: functions_1._true,
65
- 'upper-case': standard_20_1.upperCase,
66
- // TODO(mesch): The following functions are custom. There is a
67
- // standard that defines how to add functions, which should be
68
- // applied here.
69
- 'ext-join': non_standard_1.extJoin,
70
- // ext-if() evaluates and returns its second argument, if the
71
- // boolean value of its first argument is true, otherwise it
72
- // evaluates and returns its third argument.
73
- 'ext-if': non_standard_1.extIf,
74
- // ext-cardinal() evaluates its single argument as a number, and
75
- // returns the current node that many times. It can be used in the
76
- // select attribute to iterate over an integer range.
77
- 'ext-cardinal': non_standard_1.extCardinal
78
- };
79
- _this.name = name;
80
- _this.args = [];
81
- return _this;
82
- }
83
- FunctionCallExpr.prototype.appendArg = function (arg) {
84
- this.args.push(arg);
85
- };
86
- FunctionCallExpr.prototype.evaluate = function (context) {
87
- var functionName = "".concat(this.name.value);
88
- var resolvedFunction = this.xPathFunctions[functionName];
89
- if (resolvedFunction) {
90
- return resolvedFunction.call(this, context);
91
- }
92
- return new boolean_value_1.BooleanValue(false);
93
- };
94
- return FunctionCallExpr;
95
- }(expression_1.Expression));
96
- exports.FunctionCallExpr = FunctionCallExpr;
97
- //# sourceMappingURL=function-call-expr.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"function-call-expr.js","sourceRoot":"","sources":["../../../src/xpath/expressions/function-call-expr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,0CAmCsB;AACtB,0DAAwE;AACxE,wDAA0E;AAC1E,yDAAuD;AACvD,2CAA0C;AAE1C;IAAsC,oCAAU;IA8D5C,0BAAY,IAAS;QACjB,YAAA,MAAK,WAAE,SAAC;QA3DZ,oBAAc,GAAgC;YAC1C,OAAO,qBAAA;YACP,OAAO,qBAAA;YACP,MAAM,oBAAA;YACN,QAAQ,sBAAA;YACR,KAAK,mBAAA;YACL,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AK,CAAE,CAAC;QAC1C,IAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;QAC3D,IAAI,gBAAgB,EAAE,CAAC;YACnB,OAAO,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAChD,CAAC;QAED,OAAO,IAAI,4BAAY,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IACL,uBAAC;AAAD,CAAC,AAjFD,CAAsC,uBAAU,GAiF/C;AAjFY,4CAAgB"}
@@ -1,13 +0,0 @@
1
- export * from './binary-expr';
2
- export * from './filter-expr';
3
- export * from './function-call-expr';
4
- export * from './literal-expr';
5
- export * from './location-expr';
6
- export * from './number-expr';
7
- export * from './path-expr';
8
- export * from './predicate-expr';
9
- export * from './step-expr';
10
- export * from './token-expr';
11
- export * from './unary-minus-expr';
12
- export * from './union-expr';
13
- export * from './variable-expr';
@@ -1,30 +0,0 @@
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("./binary-expr"), exports);
18
- __exportStar(require("./filter-expr"), exports);
19
- __exportStar(require("./function-call-expr"), exports);
20
- __exportStar(require("./literal-expr"), exports);
21
- __exportStar(require("./location-expr"), exports);
22
- __exportStar(require("./number-expr"), exports);
23
- __exportStar(require("./path-expr"), exports);
24
- __exportStar(require("./predicate-expr"), exports);
25
- __exportStar(require("./step-expr"), exports);
26
- __exportStar(require("./token-expr"), exports);
27
- __exportStar(require("./unary-minus-expr"), exports);
28
- __exportStar(require("./union-expr"), exports);
29
- __exportStar(require("./variable-expr"), exports);
30
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/xpath/expressions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,gDAA8B;AAC9B,uDAAqC;AACrC,iDAA+B;AAC/B,kDAAgC;AAChC,gDAA8B;AAC9B,8CAA4B;AAC5B,mDAAiC;AACjC,8CAA4B;AAC5B,+CAA6B;AAC7B,qDAAmC;AACnC,+CAA6B;AAC7B,kDAAgC"}
@@ -1,7 +0,0 @@
1
- import { StringValue } from "../values/string-value";
2
- import { Expression } from "./expression";
3
- export declare class LiteralExpr extends Expression {
4
- value: any;
5
- constructor(value: any);
6
- evaluate(): StringValue;
7
- }
@@ -1,34 +0,0 @@
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.LiteralExpr = void 0;
19
- var string_value_1 = require("../values/string-value");
20
- var expression_1 = require("./expression");
21
- var LiteralExpr = /** @class */ (function (_super) {
22
- __extends(LiteralExpr, _super);
23
- function LiteralExpr(value) {
24
- var _this = _super.call(this) || this;
25
- _this.value = value;
26
- return _this;
27
- }
28
- LiteralExpr.prototype.evaluate = function () {
29
- return new string_value_1.StringValue(this.value);
30
- };
31
- return LiteralExpr;
32
- }(expression_1.Expression));
33
- exports.LiteralExpr = LiteralExpr;
34
- //# sourceMappingURL=literal-expr.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"literal-expr.js","sourceRoot":"","sources":["../../../src/xpath/expressions/literal-expr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uDAAqD;AACrD,2CAA0C;AAE1C;IAAiC,+BAAU;IAGvC,qBAAY,KAAU;QAClB,YAAA,MAAK,WAAE,SAAC;QACR,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAED,8BAAQ,GAAR;QACI,OAAO,IAAI,0BAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IACL,kBAAC;AAAD,CAAC,AAXD,CAAiC,uBAAU,GAW1C;AAXY,kCAAW"}
@@ -1,15 +0,0 @@
1
- import { ExprContext } from "../expr-context";
2
- import { NodeSetValue } from "../values/node-set-value";
3
- import { Expression } from "./expression";
4
- import { XPath } from "../xpath";
5
- import { StepExpr } from "./step-expr";
6
- export declare class LocationExpr extends Expression {
7
- absolute: boolean;
8
- steps: StepExpr[];
9
- xPath: XPath;
10
- constructor(xPath: XPath);
11
- appendStep(s: StepExpr): void;
12
- prependStep(s: StepExpr): void;
13
- private _combineSteps;
14
- evaluate(context: ExprContext): NodeSetValue;
15
- }
@@ -1,99 +0,0 @@
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.LocationExpr = void 0;
19
- var node_set_value_1 = require("../values/node-set-value");
20
- var node_test_any_1 = require("../node-tests/node-test-any");
21
- var tokens_1 = require("../tokens");
22
- var expression_1 = require("./expression");
23
- var LocationExpr = /** @class */ (function (_super) {
24
- __extends(LocationExpr, _super);
25
- function LocationExpr(xPath) {
26
- var _this = _super.call(this) || this;
27
- _this.absolute = false;
28
- _this.steps = [];
29
- _this.xPath = xPath;
30
- return _this;
31
- }
32
- LocationExpr.prototype.appendStep = function (s) {
33
- var combinedStep = this._combineSteps(this.steps[this.steps.length - 1], s);
34
- if (combinedStep) {
35
- this.steps[this.steps.length - 1] = combinedStep;
36
- }
37
- else {
38
- this.steps.push(s);
39
- }
40
- };
41
- LocationExpr.prototype.prependStep = function (s) {
42
- var combinedStep = this._combineSteps(s, this.steps[0]);
43
- if (combinedStep) {
44
- this.steps[0] = combinedStep;
45
- }
46
- else {
47
- this.steps.unshift(s);
48
- }
49
- };
50
- // DGF try to combine two steps into one step (perf enhancement)
51
- LocationExpr.prototype._combineSteps = function (prevStep, nextStep) {
52
- if (!prevStep)
53
- return null;
54
- if (!nextStep)
55
- return null;
56
- var hasPredicates = prevStep.predicates && prevStep.predicates.length > 0;
57
- if (prevStep.nodeTest instanceof node_test_any_1.NodeTestAny && !hasPredicates) {
58
- // maybe suitable to be combined
59
- if (prevStep.axis == tokens_1.xPathAxis.DESCENDANT_OR_SELF) {
60
- if (nextStep.axis == tokens_1.xPathAxis.CHILD) {
61
- // HBC - commenting out, because this is not a valid reduction
62
- //nextStep.axis = xpathAxis.DESCENDANT;
63
- //return nextStep;
64
- }
65
- else if (nextStep.axis == tokens_1.xPathAxis.SELF) {
66
- nextStep.axis = tokens_1.xPathAxis.DESCENDANT_OR_SELF;
67
- return nextStep;
68
- }
69
- }
70
- else if (prevStep.axis == tokens_1.xPathAxis.DESCENDANT) {
71
- if (nextStep.axis == tokens_1.xPathAxis.SELF) {
72
- nextStep.axis = tokens_1.xPathAxis.DESCENDANT;
73
- return nextStep;
74
- }
75
- }
76
- }
77
- return null;
78
- };
79
- LocationExpr.prototype.evaluate = function (context) {
80
- var start;
81
- if (this.absolute) {
82
- start = context.root;
83
- }
84
- else {
85
- start = context.nodeList[context.position];
86
- // TODO: `<xsl:template>` with relative path, starting on root node,
87
- // conflicts with `<xsl:template match="/">`, for some reason considered as relative.
88
- /* if (start.nodeName === '#document' && this.steps[0].axis === 'self-and-siblings') {
89
- start = start.childNodes[0];
90
- } */
91
- }
92
- var nodes = [];
93
- this.xPath.xPathStep(nodes, this.steps, 0, start, context);
94
- return new node_set_value_1.NodeSetValue(nodes);
95
- };
96
- return LocationExpr;
97
- }(expression_1.Expression));
98
- exports.LocationExpr = LocationExpr;
99
- //# sourceMappingURL=location-expr.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"location-expr.js","sourceRoot":"","sources":["../../../src/xpath/expressions/location-expr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2DAAwD;AACxD,6DAA0D;AAC1D,oCAAsC;AACtC,2CAA0C;AAK1C;IAAkC,gCAAU;IAKxC,sBAAY,KAAY;QACpB,YAAA,MAAK,WAAE,SAAC;QACR,KAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,KAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAED,iCAAU,GAAV,UAAW,CAAW;QAClB,IAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC9E,I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BAAkB,CAAC;oBAC7C,OAAO,QAAQ,CAAC;gBACpB,CAAC;YACL,CAAC;iBAAM,IAAI,QAAQ,CAAC,IAAI,IAAI,kBAAS,CAAC,UAAU,EAAE,CAAC;gBAC/C,IAAI,QAAQ,CAAC,IAAI,IAAI,kBAAS,CAAC,IAAI,EAAE,CAAC;oBAClC,QAAQ,CAAC,IAAI,GAAG,kBAAS,CAAC,UAAU,CAAC;oBACrC,OAAO,QAAQ,CAAC;gBACpB,CAAC;YACL,CAAC;QACL,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,+BAAQ,GAAR,UAAS,OAAoB;QACzB,IAAI,KAAY,CAAC;QACjB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChB,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,CAAC;aAAM,CAAC;YACJ,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAC3C,oEAAoE;YACpE,qFAAqF;YACrF;;gBAEI;QACR,CAAC;QAED,IAAM,KAAK,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QAC3D,OAAO,IAAI,6BAAY,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IACL,mBAAC;AAAD,CAAC,AAzED,CAAkC,uBAAU,GAyE3C;AAzEY,oCAAY"}
@@ -1,7 +0,0 @@
1
- import { NumberValue } from "../values/number-value";
2
- import { Expression } from "./expression";
3
- export declare class NumberExpr extends Expression {
4
- value: any;
5
- constructor(value: any);
6
- evaluate(): NumberValue;
7
- }
@@ -1,34 +0,0 @@
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.NumberExpr = void 0;
19
- var number_value_1 = require("../values/number-value");
20
- var expression_1 = require("./expression");
21
- var NumberExpr = /** @class */ (function (_super) {
22
- __extends(NumberExpr, _super);
23
- function NumberExpr(value) {
24
- var _this = _super.call(this) || this;
25
- _this.value = value;
26
- return _this;
27
- }
28
- NumberExpr.prototype.evaluate = function () {
29
- return new number_value_1.NumberValue(this.value);
30
- };
31
- return NumberExpr;
32
- }(expression_1.Expression));
33
- exports.NumberExpr = NumberExpr;
34
- //# sourceMappingURL=number-expr.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"number-expr.js","sourceRoot":"","sources":["../../../src/xpath/expressions/number-expr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uDAAqD;AACrD,2CAA0C;AAE1C;IAAgC,8BAAU;IAGtC,oBAAY,KAAU;QAClB,YAAA,MAAK,WAAE,SAAC;QACR,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAED,6BAAQ,GAAR;QACI,OAAO,IAAI,0BAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IACL,iBAAC;AAAD,CAAC,AAXD,CAAgC,uBAAU,GAWzC;AAXY,gCAAU"}
@@ -1,9 +0,0 @@
1
- import { ExprContext } from "..";
2
- import { NodeSetValue } from "../values/node-set-value";
3
- import { Expression } from "./expression";
4
- export declare class PathExpr extends Expression {
5
- filter: any;
6
- rel: any;
7
- constructor(filter: any, rel: any);
8
- evaluate(ctx: ExprContext): NodeSetValue;
9
- }
@@ -1,52 +0,0 @@
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.PathExpr = void 0;
19
- var node_set_value_1 = require("../values/node-set-value");
20
- var expression_1 = require("./expression");
21
- var PathExpr = /** @class */ (function (_super) {
22
- __extends(PathExpr, _super);
23
- function PathExpr(filter, rel) {
24
- var _this = _super.call(this) || this;
25
- _this.filter = filter;
26
- _this.rel = rel;
27
- return _this;
28
- }
29
- PathExpr.prototype.evaluate = function (ctx) {
30
- var nodes = this.filter.evaluate(ctx).nodeSetValue();
31
- var nodes1 = [];
32
- if (ctx.returnOnFirstMatch) {
33
- for (var i = 0; i < nodes.length; ++i) {
34
- nodes1 = this.rel.evaluate(ctx.clone(nodes, undefined, i)).nodeSetValue();
35
- if (nodes1.length > 0) {
36
- break;
37
- }
38
- }
39
- return new node_set_value_1.NodeSetValue(nodes1);
40
- }
41
- for (var i = 0; i < nodes.length; ++i) {
42
- var nodes0 = this.rel.evaluate(ctx.clone(nodes, undefined, i)).nodeSetValue();
43
- for (var ii = 0; ii < nodes0.length; ++ii) {
44
- nodes1.push(nodes0[ii]);
45
- }
46
- }
47
- return new node_set_value_1.NodeSetValue(nodes1);
48
- };
49
- return PathExpr;
50
- }(expression_1.Expression));
51
- exports.PathExpr = PathExpr;
52
- //# s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AAE,GAAG,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC;gBACxC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;YAC5B,CAAC;QACL,CAAC;QACD,OAAO,IAAI,6BAAY,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IACL,eAAC;AAAD,CAAC,AA/BD,CAA8B,uBAAU,GA+BvC;AA/BY,4BAAQ"}
@@ -1,8 +0,0 @@
1
- import { ExprContext } from "..";
2
- import { BooleanValue } from "../values/boolean-value";
3
- import { Expression } from "./expression";
4
- export declare class PredicateExpr extends Expression {
5
- expression: Expression;
6
- constructor(expression: Expression);
7
- evaluate(context: ExprContext): BooleanValue;
8
- }
@@ -1,41 +0,0 @@
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.PredicateExpr = void 0;
19
- var boolean_value_1 = require("../values/boolean-value");
20
- var expression_1 = require("./expression");
21
- var PredicateExpr = /** @class */ (function (_super) {
22
- __extends(PredicateExpr, _super);
23
- function PredicateExpr(expression) {
24
- var _this = _super.call(this) || this;
25
- _this.expression = expression;
26
- return _this;
27
- }
28
- PredicateExpr.prototype.evaluate = function (context) {
29
- var value = this.expression.evaluate(context);
30
- if (value.type == 'number') {
31
- // NOTE(mesch): Internally, position is represented starting with
32
- // 0, however in XPath position starts with 1. See functions
33
- // position() and last().
34
- return new boolean_value_1.BooleanValue(context.position == value.numberValue() - 1);
35
- }
36
- return new boolean_value_1.BooleanValue(value.booleanValue());
37
- };
38
- return PredicateExpr;
39
- }(expression_1.Expression));
40
- exports.PredicateExpr = PredicateExpr;
41
- //# sourceMappingURL=predicate-expr.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"predicate-expr.js","sourceRoot":"","sources":["../../../src/xpath/expressions/predicate-expr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,yDAAuD;AACvD,2CAA0C;AAE1C;IAAmC,iCAAU;IAGzC,uBAAY,UAAsB;QAC9B,YAAA,MAAK,WAAE,SAAC;QACR,KAAI,CAAC,UAAU,GAAG,UAAU,CAAC;;IACjC,CAAC;IAED,gCAAQ,GAAR,UAAS,OAAoB;QACzB,IAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,KAAK,CAAC,IAAI,IAAI,QAAQ,EAAE,CAAC;YACzB,iEAAiE;YACjE,4DAA4D;YAC5D,yBAAyB;YACzB,OAAO,IAAI,4BAAY,CAAC,OAAO,CAAC,QAAQ,IAAI,KAAK,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC;QACzE,CAAC;QAED,OAAO,IAAI,4BAAY,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC;IAClD,CAAC;IACL,oBAAC;AAAD,CAAC,AAnBD,CAAmC,uBAAU,GAmB5C;AAnBY,sCAAa"}
@@ -1,25 +0,0 @@
1
- import { ExprContext } from '../expr-context';
2
- import { NodeSetValue } from '../values/node-set-value';
3
- import { Expression } from './expression';
4
- import { XPath } from '../xpath';
5
- import { PredicateExpr } from './predicate-expr';
6
- export declare class StepExpr extends Expression {
7
- axis: any;
8
- nodeTest: any;
9
- predicate: any;
10
- hasPositionalPredicate: any;
11
- xPath: XPath;
12
- constructor(axis: any, nodeTest: any, xPath: XPath, opt_predicate?: any);
13
- /**
14
- * Determines whether a predicate expression contains a "positional selector".
15
- * A positional selector filters nodes from the nodeList input based on their
16
- * position within that list. When such selectors are encountered, the
17
- * evaluation of the predicate cannot be depth-first, because the positional
18
- * selector may be based on the result of evaluating predicates that precede
19
- * it.
20
- */
21
- private predicateExprHasPositionalSelector;
22
- private exprReturnsNumberValue;
23
- appendPredicate(predicateExpression: PredicateExpr): void;
24
- evaluate(context: ExprContext): NodeSetValue;
25
- }