xslt-processor 3.0.0 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/README.md +2 -2
  2. package/constants.d.ts +12 -12
  3. package/constants.js +16 -16
  4. package/dom/functions.d.ts +14 -14
  5. package/dom/functions.js +56 -57
  6. package/dom/functions.js.map +1 -1
  7. package/dom/index.d.ts +6 -6
  8. package/dom/index.js +22 -22
  9. package/dom/util.d.ts +7 -7
  10. package/dom/util.js +42 -43
  11. package/dom/util.js.map +1 -1
  12. package/dom/xdocument.d.ts +16 -16
  13. package/dom/xdocument.js +73 -74
  14. package/dom/xdocument.js.map +1 -1
  15. package/dom/xml-functions.d.ts +58 -58
  16. package/dom/xml-functions.js +369 -370
  17. package/dom/xml-functions.js.map +1 -1
  18. package/dom/xml-output-options.d.ts +6 -6
  19. package/dom/xml-output-options.js +2 -2
  20. package/dom/xml-parser.d.ts +47 -47
  21. package/dom/xml-parser.js +307 -307
  22. package/dom/xml-parser.js.map +1 -1
  23. package/dom/xmltoken.d.ts +12 -12
  24. package/dom/xmltoken.js +101 -101
  25. package/dom/xnode.d.ts +73 -73
  26. package/dom/xnode.js +450 -450
  27. package/dom/xnode.js.map +1 -1
  28. package/index.d.ts +4 -4
  29. package/index.js +12 -12
  30. package/package.json +11 -11
  31. package/test-without-jest.d.ts +1 -0
  32. package/test-without-jest.js +63 -0
  33. package/test-without-jest.js.map +1 -0
  34. package/umd/constants.d.ts +12 -12
  35. package/umd/dom/functions.d.ts +14 -14
  36. package/umd/dom/index.d.ts +6 -6
  37. package/umd/dom/util.d.ts +7 -7
  38. package/umd/dom/xdocument.d.ts +16 -16
  39. package/umd/dom/xml-functions.d.ts +58 -58
  40. package/umd/dom/xml-output-options.d.ts +6 -6
  41. package/umd/dom/xml-parser.d.ts +47 -47
  42. package/umd/dom/xmltoken.d.ts +12 -12
  43. package/umd/dom/xnode.d.ts +73 -73
  44. package/umd/index.d.ts +4 -4
  45. package/umd/test-without-jest.d.ts +1 -0
  46. package/umd/xpath/common-function.d.ts +8 -8
  47. package/umd/xpath/expr-context.d.ts +111 -111
  48. package/umd/xpath/expressions/binary-expr.d.ts +11 -11
  49. package/umd/xpath/expressions/expression.d.ts +4 -4
  50. package/umd/xpath/expressions/filter-expr.d.ts +9 -9
  51. package/umd/xpath/expressions/function-call-expr.d.ts +12 -12
  52. package/umd/xpath/expressions/index.d.ts +13 -13
  53. package/umd/xpath/expressions/literal-expr.d.ts +7 -7
  54. package/umd/xpath/expressions/location-expr.d.ts +15 -15
  55. package/umd/xpath/expressions/number-expr.d.ts +7 -7
  56. package/umd/xpath/expressions/path-expr.d.ts +9 -9
  57. package/umd/xpath/expressions/predicate-expr.d.ts +8 -8
  58. package/umd/xpath/expressions/step-expr.d.ts +25 -25
  59. package/umd/xpath/expressions/token-expr.d.ts +7 -7
  60. package/umd/xpath/expressions/unary-minus-expr.d.ts +8 -8
  61. package/umd/xpath/expressions/union-expr.d.ts +9 -9
  62. package/umd/xpath/expressions/variable-expr.d.ts +7 -7
  63. package/umd/xpath/functions/index.d.ts +2 -2
  64. package/umd/xpath/functions/internal-functions.d.ts +2 -2
  65. package/umd/xpath/functions/non-standard.d.ts +12 -12
  66. package/umd/xpath/functions/standard-20.d.ts +5 -5
  67. package/umd/xpath/functions/standard.d.ts +40 -40
  68. package/umd/xpath/grammar-rule-candidate.d.ts +8 -8
  69. package/umd/xpath/index.d.ts +3 -3
  70. package/umd/xpath/match-resolver.d.ts +55 -55
  71. package/umd/xpath/node-tests/index.d.ts +8 -8
  72. package/umd/xpath/node-tests/node-test-any.d.ts +6 -6
  73. package/umd/xpath/node-tests/node-test-comment.d.ts +6 -6
  74. package/umd/xpath/node-tests/node-test-element-or-attribute.d.ts +6 -6
  75. package/umd/xpath/node-tests/node-test-name.d.ts +10 -10
  76. package/umd/xpath/node-tests/node-test-nc.d.ts +9 -9
  77. package/umd/xpath/node-tests/node-test-pi.d.ts +8 -8
  78. package/umd/xpath/node-tests/node-test-text.d.ts +6 -6
  79. package/umd/xpath/node-tests/node-test.d.ts +5 -5
  80. package/umd/xpath/tokens.d.ts +62 -62
  81. package/umd/xpath/values/boolean-value.d.ts +11 -11
  82. package/umd/xpath/values/index.d.ts +5 -5
  83. package/umd/xpath/values/node-set-value.d.ts +11 -11
  84. package/umd/xpath/values/node-value.d.ts +7 -7
  85. package/umd/xpath/values/number-value.d.ts +11 -11
  86. package/umd/xpath/values/string-value.d.ts +11 -11
  87. package/umd/xpath/xpath-grammar-rules.d.ts +68 -68
  88. package/umd/xpath/xpath-token-rule.d.ts +7 -7
  89. package/umd/xpath/xpath.d.ts +174 -170
  90. package/umd/xpathdebug.d.ts +2 -2
  91. package/umd/xslt/index.d.ts +3 -3
  92. package/umd/xslt/xslt-decimal-format-settings.d.ts +28 -28
  93. package/umd/xslt/xslt-options.d.ts +7 -7
  94. package/umd/xslt/xslt-parameter.d.ts +5 -5
  95. package/umd/xslt/xslt.d.ts +207 -190
  96. package/umd/xslt-processor.js +1 -15
  97. package/umd/xslt-processor.js.map +1 -1
  98. package/xpath/common-function.d.ts +8 -8
  99. package/xpath/common-function.js +31 -32
  100. package/xpath/common-function.js.map +1 -1
  101. package/xpath/expr-context.d.ts +111 -111
  102. package/xpath/expr-context.js +189 -189
  103. package/xpath/expr-context.js.map +1 -1
  104. package/xpath/expressions/binary-expr.d.ts +11 -11
  105. package/xpath/expressions/binary-expr.js +165 -165
  106. package/xpath/expressions/binary-expr.js.map +1 -1
  107. package/xpath/expressions/expression.d.ts +4 -4
  108. package/xpath/expressions/expression.js +9 -9
  109. package/xpath/expressions/filter-expr.d.ts +9 -9
  110. package/xpath/expressions/filter-expr.js +52 -52
  111. package/xpath/expressions/filter-expr.js.map +1 -1
  112. package/xpath/expressions/function-call-expr.d.ts +12 -12
  113. package/xpath/expressions/function-call-expr.js +95 -95
  114. package/xpath/expressions/function-call-expr.js.map +1 -1
  115. package/xpath/expressions/index.d.ts +13 -13
  116. package/xpath/expressions/index.js +29 -29
  117. package/xpath/expressions/literal-expr.d.ts +7 -7
  118. package/xpath/expressions/literal-expr.js +33 -33
  119. package/xpath/expressions/literal-expr.js.map +1 -1
  120. package/xpath/expressions/location-expr.d.ts +15 -15
  121. package/xpath/expressions/location-expr.js +98 -98
  122. package/xpath/expressions/location-expr.js.map +1 -1
  123. package/xpath/expressions/number-expr.d.ts +7 -7
  124. package/xpath/expressions/number-expr.js +33 -33
  125. package/xpath/expressions/number-expr.js.map +1 -1
  126. package/xpath/expressions/path-expr.d.ts +9 -9
  127. package/xpath/expressions/path-expr.js +51 -51
  128. package/xpath/expressions/path-expr.js.map +1 -1
  129. package/xpath/expressions/predicate-expr.d.ts +8 -8
  130. package/xpath/expressions/predicate-expr.js +40 -40
  131. package/xpath/expressions/predicate-expr.js.map +1 -1
  132. package/xpath/expressions/step-expr.d.ts +25 -25
  133. package/xpath/expressions/step-expr.js +280 -280
  134. package/xpath/expressions/step-expr.js.map +1 -1
  135. package/xpath/expressions/token-expr.d.ts +7 -7
  136. package/xpath/expressions/token-expr.js +33 -33
  137. package/xpath/expressions/token-expr.js.map +1 -1
  138. package/xpath/expressions/unary-minus-expr.d.ts +8 -8
  139. package/xpath/expressions/unary-minus-expr.js +33 -33
  140. package/xpath/expressions/unary-minus-expr.js.map +1 -1
  141. package/xpath/expressions/union-expr.d.ts +9 -9
  142. package/xpath/expressions/union-expr.js +50 -50
  143. package/xpath/expressions/union-expr.js.map +1 -1
  144. package/xpath/expressions/variable-expr.d.ts +7 -7
  145. package/xpath/expressions/variable-expr.js +32 -32
  146. package/xpath/expressions/variable-expr.js.map +1 -1
  147. package/xpath/functions/index.d.ts +2 -2
  148. package/xpath/functions/index.js +18 -18
  149. package/xpath/functions/internal-functions.d.ts +2 -2
  150. package/xpath/functions/internal-functions.js +21 -22
  151. package/xpath/functions/internal-functions.js.map +1 -1
  152. package/xpath/functions/non-standard.d.ts +12 -12
  153. package/xpath/functions/non-standard.js +44 -45
  154. package/xpath/functions/non-standard.js.map +1 -1
  155. package/xpath/functions/standard-20.d.ts +5 -5
  156. package/xpath/functions/standard-20.js +25 -26
  157. package/xpath/functions/standard-20.js.map +1 -1
  158. package/xpath/functions/standard.d.ts +40 -40
  159. package/xpath/functions/standard.js +441 -442
  160. package/xpath/functions/standard.js.map +1 -1
  161. package/xpath/grammar-rule-candidate.d.ts +8 -8
  162. package/xpath/grammar-rule-candidate.js +2 -2
  163. package/xpath/index.d.ts +3 -3
  164. package/xpath/index.js +19 -19
  165. package/xpath/match-resolver.d.ts +55 -55
  166. package/xpath/match-resolver.js +136 -136
  167. package/xpath/match-resolver.js.map +1 -1
  168. package/xpath/node-tests/index.d.ts +8 -8
  169. package/xpath/node-tests/index.js +17 -17
  170. package/xpath/node-tests/node-test-any.d.ts +6 -6
  171. package/xpath/node-tests/node-test-any.js +14 -14
  172. package/xpath/node-tests/node-test-comment.d.ts +6 -6
  173. package/xpath/node-tests/node-test-comment.js +14 -14
  174. package/xpath/node-tests/node-test-element-or-attribute.d.ts +6 -6
  175. package/xpath/node-tests/node-test-element-or-attribute.js +15 -15
  176. package/xpath/node-tests/node-test-name.d.ts +10 -10
  177. package/xpath/node-tests/node-test-name.js +38 -38
  178. package/xpath/node-tests/node-test-name.js.map +1 -1
  179. package/xpath/node-tests/node-test-nc.d.ts +9 -9
  180. package/xpath/node-tests/node-test-nc.js +16 -16
  181. package/xpath/node-tests/node-test-pi.d.ts +8 -8
  182. package/xpath/node-tests/node-test-pi.js +16 -16
  183. package/xpath/node-tests/node-test-pi.js.map +1 -1
  184. package/xpath/node-tests/node-test-text.d.ts +6 -6
  185. package/xpath/node-tests/node-test-text.js +14 -14
  186. package/xpath/node-tests/node-test.d.ts +5 -5
  187. package/xpath/node-tests/node-test.js +2 -2
  188. package/xpath/tokens.d.ts +62 -62
  189. package/xpath/tokens.js +300 -300
  190. package/xpath/tokens.js.map +1 -1
  191. package/xpath/values/boolean-value.d.ts +11 -11
  192. package/xpath/values/boolean-value.js +23 -23
  193. package/xpath/values/index.d.ts +5 -5
  194. package/xpath/values/index.js +46 -46
  195. package/xpath/values/node-set-value.d.ts +11 -11
  196. package/xpath/values/node-set-value.js +27 -27
  197. package/xpath/values/node-set-value.js.map +1 -1
  198. package/xpath/values/node-value.d.ts +7 -7
  199. package/xpath/values/node-value.js +2 -2
  200. package/xpath/values/number-value.d.ts +11 -11
  201. package/xpath/values/number-value.js +23 -23
  202. package/xpath/values/string-value.d.ts +11 -11
  203. package/xpath/values/string-value.js +23 -23
  204. package/xpath/xpath-grammar-rules.d.ts +68 -68
  205. package/xpath/xpath-grammar-rules.js +74 -74
  206. package/xpath/xpath-token-rule.d.ts +7 -7
  207. package/xpath/xpath-token-rule.js +2 -2
  208. package/xpath/xpath.d.ts +174 -170
  209. package/xpath/xpath.js +911 -909
  210. package/xpath/xpath.js.map +1 -1
  211. package/xpathdebug.d.ts +2 -2
  212. package/xpathdebug.js +187 -187
  213. package/xpathdebug.js.map +1 -1
  214. package/xslt/index.d.ts +3 -3
  215. package/xslt/index.js +19 -19
  216. package/xslt/xslt-decimal-format-settings.d.ts +28 -28
  217. package/xslt/xslt-decimal-format-settings.js +2 -2
  218. package/xslt/xslt-options.d.ts +7 -7
  219. package/xslt/xslt-options.js +2 -2
  220. package/xslt/xslt-parameter.d.ts +5 -5
  221. package/xslt/xslt-parameter.js +2 -2
  222. package/xslt/xslt.d.ts +207 -190
  223. package/xslt/xslt.js +1135 -1079
  224. package/xslt/xslt.js.map +1 -1
@@ -1,190 +1,190 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ExprContext = void 0;
4
- var constants_1 = require("../constants");
5
- var boolean_value_1 = require("./values/boolean-value");
6
- var node_set_value_1 = require("./values/node-set-value");
7
- var number_value_1 = require("./values/number-value");
8
- var string_value_1 = require("./values/string-value");
9
- var tokens_1 = require("./tokens");
10
- /**
11
- * XPath expression evaluation context. An XPath context consists of a
12
- * DOM node, a list of DOM nodes that contains this node, a number
13
- * that represents the position of the single node in the list, and a
14
- * current set of variable bindings. (See XPath spec.)
15
- *
16
- * setVariable(name, expr) -- binds given XPath expression to the
17
- * name.
18
- *
19
- * getVariable(name) -- what the name says.
20
- *
21
- * setNode(position) -- sets the context to the node at the given
22
- * position. Needed to implement scoping rules for variables in
23
- * XPath. (A variable is visible to all subsequent siblings, not
24
- * only to its children.)
25
- *
26
- * set/isCaseInsensitive -- specifies whether node name tests should
27
- * be case sensitive. If you're executing xpaths against a regular
28
- * HTML DOM, you probably don't want case-sensitivity, because
29
- * browsers tend to disagree about whether elements & attributes
30
- * should be upper/lower case. If you're running xpaths in an
31
- * XSLT instance, you probably DO want case sensitivity, as per the
32
- * XSL spec.
33
- *
34
- * set/isReturnOnFirstMatch -- whether XPath evaluation should quit as soon
35
- * as a result is found. This is an optimization that might make sense if you
36
- * only care about the first result.
37
- *
38
- * set/isIgnoreNonElementNodesForNTA -- whether to ignore non-element nodes
39
- * when evaluating the "node()" any node test. While technically this is
40
- * contrary to the XPath spec, practically it can enhance performance
41
- * significantly, and makes sense if you a) use "node()" when you mean "*",
42
- * and b) use "//" when you mean "/descendant::* /".
43
- */
44
- var ExprContext = /** @class */ (function () {
45
- /**
46
- * Constructor -- gets the node, its position, the node set it
47
- * belongs to, and a parent context as arguments. The parent context
48
- * is used to implement scoping rules for variables: if a variable
49
- * is not found in the current context, it is looked for in the
50
- * parent context, recursively. Except for node, all arguments have
51
- * default values: default position is 0, default node set is the
52
- * set that contains only the node, and the default parent is null.
53
- *
54
- * Notice that position starts at 0 at the outside interface;
55
- * inside XPath expressions this shows up as position()=1.
56
- * @param nodeList TODO
57
- * @param outputNodeList TODO
58
- * @param opt_position TODO
59
- * @param opt_outputPosition TODO
60
- * @param opt_parent TODO
61
- * @param opt_caseInsensitive TODO
62
- * @param opt_ignoreAttributesWithoutValue TODO
63
- * @param opt_returnOnFirstMatch TODO
64
- * @param opt_ignoreNonElementNodesForNTA TODO
65
- */
66
- function ExprContext(nodeList, outputNodeList, xsltVersion, opt_position, opt_outputPosition, opt_outputDepth, opt_decimalFormatSettings, opt_variables, opt_knownNamespaces, opt_parent, opt_caseInsensitive, opt_ignoreAttributesWithoutValue, opt_returnOnFirstMatch, opt_ignoreNonElementNodesForNTA) {
67
- if (xsltVersion === void 0) { xsltVersion = '1.0'; }
68
- this.nodeList = nodeList;
69
- this.outputNodeList = outputNodeList;
70
- this.xsltVersion = xsltVersion;
71
- this.position = opt_position || 0;
72
- this.outputPosition = opt_outputPosition || 0;
73
- this.variables = opt_variables || {};
74
- this.knownNamespaces = opt_knownNamespaces || {};
75
- this.parent = opt_parent || null;
76
- this.caseInsensitive = opt_caseInsensitive || false;
77
- this.ignoreAttributesWithoutValue = opt_ignoreAttributesWithoutValue || false;
78
- this.returnOnFirstMatch = opt_returnOnFirstMatch || false;
79
- this.ignoreNonElementNodesForNTA = opt_ignoreNonElementNodesForNTA || false;
80
- this.inApplyTemplates = false;
81
- this.baseTemplateMatched = false;
82
- this.outputDepth = opt_outputDepth || 0;
83
- this.decimalFormatSettings = opt_decimalFormatSettings || {
84
- decimalSeparator: '.',
85
- groupingSeparator: ',',
86
- infinity: 'Infinity',
87
- minusSign: '-',
88
- naN: 'NaN',
89
- percent: '%',
90
- perMille: '‰',
91
- zeroDigit: '0',
92
- digit: '#',
93
- patternSeparator: ';'
94
- };
95
- if (opt_parent) {
96
- this.root = opt_parent.root;
97
- }
98
- else if (this.nodeList[this.position].nodeType == constants_1.DOM_DOCUMENT_NODE) {
99
- // NOTE(mesch): DOM Spec stipulates that the ownerDocument of a
100
- // document is null. Our root, however is the document that we are
101
- // processing, so the initial context is created from its document
102
- // node, which case we must handle here explicitly.
103
- this.root = this.nodeList[this.position];
104
- }
105
- else {
106
- this.root = this.nodeList[this.position].ownerDocument;
107
- }
108
- }
109
- /**
110
- * clone() -- creates a new context with the current context as
111
- * parent. If passed as argument to clone(), the new context has a
112
- * different node, position, or node set. What is not passed is
113
- * inherited from the cloned context.
114
- * @param opt_nodeList TODO
115
- * @param opt_outputNodeList TODO
116
- * @param opt_position TODO
117
- * @param opt_outputPosition TODO
118
- * @returns TODO
119
- */
120
- ExprContext.prototype.clone = function (opt_nodeList, opt_outputNodeList, opt_position, opt_outputPosition) {
121
- return new ExprContext(opt_nodeList || this.nodeList, opt_outputNodeList || this.outputNodeList, this.xsltVersion, typeof opt_position !== 'undefined' ? opt_position : this.position, typeof opt_outputPosition !== 'undefined' ? opt_outputPosition : this.outputPosition, this.outputDepth, this.decimalFormatSettings, this.variables, this.knownNamespaces, this, this.caseInsensitive, this.ignoreAttributesWithoutValue, this.returnOnFirstMatch, this.ignoreNonElementNodesForNTA);
122
- };
123
- ExprContext.prototype.cloneByOutput = function (opt_outputNodeList, opt_outputPosition, opt_outputDepth) {
124
- return new ExprContext(this.nodeList, opt_outputNodeList || this.outputNodeList, this.xsltVersion, this.position, typeof opt_outputPosition !== 'undefined' ? opt_outputPosition : this.outputPosition, typeof opt_outputDepth !== 'undefined' ? opt_outputDepth : this.outputDepth, this.decimalFormatSettings, this.variables, this.knownNamespaces, this, this.caseInsensitive, this.ignoreAttributesWithoutValue, this.returnOnFirstMatch, this.ignoreNonElementNodesForNTA);
125
- };
126
- ExprContext.prototype.setVariable = function (name, value) {
127
- if (value instanceof string_value_1.StringValue ||
128
- value instanceof boolean_value_1.BooleanValue ||
129
- value instanceof number_value_1.NumberValue ||
130
- value instanceof node_set_value_1.NodeSetValue) {
131
- this.variables[name] = value;
132
- return;
133
- }
134
- if ('true' === value) {
135
- this.variables[name] = new boolean_value_1.BooleanValue(true);
136
- }
137
- else if ('false' === value) {
138
- this.variables[name] = new boolean_value_1.BooleanValue(false);
139
- }
140
- else if (tokens_1.TOK_NUMBER.re.test(value)) {
141
- this.variables[name] = new number_value_1.NumberValue(value);
142
- }
143
- else {
144
- // DGF What if it's null?
145
- this.variables[name] = new string_value_1.StringValue(value);
146
- }
147
- };
148
- ExprContext.prototype.getVariable = function (name) {
149
- if (typeof this.variables[name] != 'undefined') {
150
- return this.variables[name];
151
- }
152
- if (this.parent) {
153
- return this.parent.getVariable(name);
154
- }
155
- return null;
156
- };
157
- ExprContext.prototype.setNode = function (position) {
158
- this.position = position;
159
- };
160
- ExprContext.prototype.contextSize = function () {
161
- return this.nodeList.length;
162
- };
163
- ExprContext.prototype.isCaseInsensitive = function () {
164
- return this.caseInsensitive;
165
- };
166
- ExprContext.prototype.setCaseInsensitive = function (caseInsensitive) {
167
- return (this.caseInsensitive = caseInsensitive);
168
- };
169
- ExprContext.prototype.isIgnoreAttributesWithoutValue = function () {
170
- return this.ignoreAttributesWithoutValue;
171
- };
172
- ExprContext.prototype.setIgnoreAttributesWithoutValue = function (ignore) {
173
- return (this.ignoreAttributesWithoutValue = ignore);
174
- };
175
- ExprContext.prototype.isReturnOnFirstMatch = function () {
176
- return this.returnOnFirstMatch;
177
- };
178
- ExprContext.prototype.setReturnOnFirstMatch = function (returnOnFirstMatch) {
179
- return (this.returnOnFirstMatch = returnOnFirstMatch);
180
- };
181
- ExprContext.prototype.isIgnoreNonElementNodesForNTA = function () {
182
- return this.ignoreNonElementNodesForNTA;
183
- };
184
- ExprContext.prototype.setIgnoreNonElementNodesForNTA = function (ignoreNonElementNodesForNTA) {
185
- return (this.ignoreNonElementNodesForNTA = ignoreNonElementNodesForNTA);
186
- };
187
- return ExprContext;
188
- }());
189
- exports.ExprContext = ExprContext;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ExprContext = void 0;
4
+ var constants_1 = require("../constants");
5
+ var boolean_value_1 = require("./values/boolean-value");
6
+ var node_set_value_1 = require("./values/node-set-value");
7
+ var number_value_1 = require("./values/number-value");
8
+ var string_value_1 = require("./values/string-value");
9
+ var tokens_1 = require("./tokens");
10
+ /**
11
+ * XPath expression evaluation context. An XPath context consists of a
12
+ * DOM node, a list of DOM nodes that contains this node, a number
13
+ * that represents the position of the single node in the list, and a
14
+ * current set of variable bindings. (See XPath spec.)
15
+ *
16
+ * setVariable(name, expr) -- binds given XPath expression to the
17
+ * name.
18
+ *
19
+ * getVariable(name) -- what the name says.
20
+ *
21
+ * setNode(position) -- sets the context to the node at the given
22
+ * position. Needed to implement scoping rules for variables in
23
+ * XPath. (A variable is visible to all subsequent siblings, not
24
+ * only to its children.)
25
+ *
26
+ * set/isCaseInsensitive -- specifies whether node name tests should
27
+ * be case sensitive. If you're executing xpaths against a regular
28
+ * HTML DOM, you probably don't want case-sensitivity, because
29
+ * browsers tend to disagree about whether elements & attributes
30
+ * should be upper/lower case. If you're running xpaths in an
31
+ * XSLT instance, you probably DO want case sensitivity, as per the
32
+ * XSL spec.
33
+ *
34
+ * set/isReturnOnFirstMatch -- whether XPath evaluation should quit as soon
35
+ * as a result is found. This is an optimization that might make sense if you
36
+ * only care about the first result.
37
+ *
38
+ * set/isIgnoreNonElementNodesForNTA -- whether to ignore non-element nodes
39
+ * when evaluating the "node()" any node test. While technically this is
40
+ * contrary to the XPath spec, practically it can enhance performance
41
+ * significantly, and makes sense if you a) use "node()" when you mean "*",
42
+ * and b) use "//" when you mean "/descendant::* /".
43
+ */
44
+ var ExprContext = /** @class */ (function () {
45
+ /**
46
+ * Constructor -- gets the node, its position, the node set it
47
+ * belongs to, and a parent context as arguments. The parent context
48
+ * is used to implement scoping rules for variables: if a variable
49
+ * is not found in the current context, it is looked for in the
50
+ * parent context, recursively. Except for node, all arguments have
51
+ * default values: default position is 0, default node set is the
52
+ * set that contains only the node, and the default parent is null.
53
+ *
54
+ * Notice that position starts at 0 at the outside interface;
55
+ * inside XPath expressions this shows up as position()=1.
56
+ * @param nodeList TODO
57
+ * @param outputNodeList TODO
58
+ * @param opt_position TODO
59
+ * @param opt_outputPosition TODO
60
+ * @param opt_parent TODO
61
+ * @param opt_caseInsensitive TODO
62
+ * @param opt_ignoreAttributesWithoutValue TODO
63
+ * @param opt_returnOnFirstMatch TODO
64
+ * @param opt_ignoreNonElementNodesForNTA TODO
65
+ */
66
+ function ExprContext(nodeList, outputNodeList, xsltVersion, opt_position, opt_outputPosition, opt_outputDepth, opt_decimalFormatSettings, opt_variables, opt_knownNamespaces, opt_parent, opt_caseInsensitive, opt_ignoreAttributesWithoutValue, opt_returnOnFirstMatch, opt_ignoreNonElementNodesForNTA) {
67
+ if (xsltVersion === void 0) { xsltVersion = '1.0'; }
68
+ this.nodeList = nodeList;
69
+ this.outputNodeList = outputNodeList;
70
+ this.xsltVersion = xsltVersion;
71
+ this.position = opt_position || 0;
72
+ this.outputPosition = opt_outputPosition || 0;
73
+ this.variables = opt_variables || {};
74
+ this.knownNamespaces = opt_knownNamespaces || {};
75
+ this.parent = opt_parent || null;
76
+ this.caseInsensitive = opt_caseInsensitive || false;
77
+ this.ignoreAttributesWithoutValue = opt_ignoreAttributesWithoutValue || false;
78
+ this.returnOnFirstMatch = opt_returnOnFirstMatch || false;
79
+ this.ignoreNonElementNodesForNTA = opt_ignoreNonElementNodesForNTA || false;
80
+ this.inApplyTemplates = false;
81
+ this.baseTemplateMatched = false;
82
+ this.outputDepth = opt_outputDepth || 0;
83
+ this.decimalFormatSettings = opt_decimalFormatSettings || {
84
+ decimalSeparator: '.',
85
+ groupingSeparator: ',',
86
+ infinity: 'Infinity',
87
+ minusSign: '-',
88
+ naN: 'NaN',
89
+ percent: '%',
90
+ perMille: '‰',
91
+ zeroDigit: '0',
92
+ digit: '#',
93
+ patternSeparator: ';'
94
+ };
95
+ if (opt_parent) {
96
+ this.root = opt_parent.root;
97
+ }
98
+ else if (this.nodeList[this.position].nodeType == constants_1.DOM_DOCUMENT_NODE) {
99
+ // NOTE(mesch): DOM Spec stipulates that the ownerDocument of a
100
+ // document is null. Our root, however is the document that we are
101
+ // processing, so the initial context is created from its document
102
+ // node, which case we must handle here explicitly.
103
+ this.root = this.nodeList[this.position];
104
+ }
105
+ else {
106
+ this.root = this.nodeList[this.position].ownerDocument;
107
+ }
108
+ }
109
+ /**
110
+ * clone() -- creates a new context with the current context as
111
+ * parent. If passed as argument to clone(), the new context has a
112
+ * different node, position, or node set. What is not passed is
113
+ * inherited from the cloned context.
114
+ * @param opt_nodeList TODO
115
+ * @param opt_outputNodeList TODO
116
+ * @param opt_position TODO
117
+ * @param opt_outputPosition TODO
118
+ * @returns TODO
119
+ */
120
+ ExprContext.prototype.clone = function (opt_nodeList, opt_outputNodeList, opt_position, opt_outputPosition) {
121
+ return new ExprContext(opt_nodeList || this.nodeList, opt_outputNodeList || this.outputNodeList, this.xsltVersion, typeof opt_position !== 'undefined' ? opt_position : this.position, typeof opt_outputPosition !== 'undefined' ? opt_outputPosition : this.outputPosition, this.outputDepth, this.decimalFormatSettings, this.variables, this.knownNamespaces, this, this.caseInsensitive, this.ignoreAttributesWithoutValue, this.returnOnFirstMatch, this.ignoreNonElementNodesForNTA);
122
+ };
123
+ ExprContext.prototype.cloneByOutput = function (opt_outputNodeList, opt_outputPosition, opt_outputDepth) {
124
+ return new ExprContext(this.nodeList, opt_outputNodeList || this.outputNodeList, this.xsltVersion, this.position, typeof opt_outputPosition !== 'undefined' ? opt_outputPosition : this.outputPosition, typeof opt_outputDepth !== 'undefined' ? opt_outputDepth : this.outputDepth, this.decimalFormatSettings, this.variables, this.knownNamespaces, this, this.caseInsensitive, this.ignoreAttributesWithoutValue, this.returnOnFirstMatch, this.ignoreNonElementNodesForNTA);
125
+ };
126
+ ExprContext.prototype.setVariable = function (name, value) {
127
+ if (value instanceof string_value_1.StringValue ||
128
+ value instanceof boolean_value_1.BooleanValue ||
129
+ value instanceof number_value_1.NumberValue ||
130
+ value instanceof node_set_value_1.NodeSetValue) {
131
+ this.variables[name] = value;
132
+ return;
133
+ }
134
+ if ('true' === value) {
135
+ this.variables[name] = new boolean_value_1.BooleanValue(true);
136
+ }
137
+ else if ('false' === value) {
138
+ this.variables[name] = new boolean_value_1.BooleanValue(false);
139
+ }
140
+ else if (tokens_1.TOK_NUMBER.re.test(value)) {
141
+ this.variables[name] = new number_value_1.NumberValue(value);
142
+ }
143
+ else {
144
+ // DGF What if it's null?
145
+ this.variables[name] = new string_value_1.StringValue(value);
146
+ }
147
+ };
148
+ ExprContext.prototype.getVariable = function (name) {
149
+ if (typeof this.variables[name] != 'undefined') {
150
+ return this.variables[name];
151
+ }
152
+ if (this.parent) {
153
+ return this.parent.getVariable(name);
154
+ }
155
+ return null;
156
+ };
157
+ ExprContext.prototype.setNode = function (position) {
158
+ this.position = position;
159
+ };
160
+ ExprContext.prototype.contextSize = function () {
161
+ return this.nodeList.length;
162
+ };
163
+ ExprContext.prototype.isCaseInsensitive = function () {
164
+ return this.caseInsensitive;
165
+ };
166
+ ExprContext.prototype.setCaseInsensitive = function (caseInsensitive) {
167
+ return (this.caseInsensitive = caseInsensitive);
168
+ };
169
+ ExprContext.prototype.isIgnoreAttributesWithoutValue = function () {
170
+ return this.ignoreAttributesWithoutValue;
171
+ };
172
+ ExprContext.prototype.setIgnoreAttributesWithoutValue = function (ignore) {
173
+ return (this.ignoreAttributesWithoutValue = ignore);
174
+ };
175
+ ExprContext.prototype.isReturnOnFirstMatch = function () {
176
+ return this.returnOnFirstMatch;
177
+ };
178
+ ExprContext.prototype.setReturnOnFirstMatch = function (returnOnFirstMatch) {
179
+ return (this.returnOnFirstMatch = returnOnFirstMatch);
180
+ };
181
+ ExprContext.prototype.isIgnoreNonElementNodesForNTA = function () {
182
+ return this.ignoreNonElementNodesForNTA;
183
+ };
184
+ ExprContext.prototype.setIgnoreNonElementNodesForNTA = function (ignoreNonElementNodesForNTA) {
185
+ return (this.ignoreNonElementNodesForNTA = ignoreNonElementNodesForNTA);
186
+ };
187
+ return ExprContext;
188
+ }());
189
+ exports.ExprContext = ExprContext;
190
190
  //# sourceMappingURL=expr-context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"expr-context.js","sourceRoot":"","sources":["../../src/xpath/expr-context.ts"],"names":[],"mappings":";;;AAAA,0CAAiD;AACjD,wDAAsD;AACtD,0DAAuD;AACvD,sDAAoD;AACpD,sDAAoD;AACpD,mCAAsC;AAKtC;;;;;;;;;;;;;;;;;;;;;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QAC9B,OAAO,CAAC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC,CAAC;IACpD,CAAC;IAED,oDAA8B,GAA9B;QACI,OAAO,IAAI,CAAC,4BAA4B,CAAC;IAC7C,CAAC;IAED,qDAA+B,GAA/B,UAAgC,MAAM;QAClC,OAAO,CAAC,IAAI,CAAC,4BAA4B,GAAG,MAAM,CAAC,CAAC;IACxD,CAAC;IAED,0CAAoB,GAApB;QACI,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;IAED,2CAAqB,GAArB,UAAsB,kBAAkB;QACpC,OAAO,CAAC,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC,CAAC;IAC1D,CAAC;IAED,mDAA6B,GAA7B;QACI,OAAO,IAAI,CAAC,2BAA2B,CAAC;IAC5C,CAAC;IAED,oDAA8B,GAA9B,UAA+B,2BAA2B;QACtD,OAAO,CAAC,IAAI,CAAC,2BAA2B,GAAG,2BAA2B,CAAC,CAAC;IAC5E,CAAC;IACL,kBAAC;AAAD,CAAC,AAnOD,IAmOC;AAnOY,kCAAW"}
@@ -1,11 +1,11 @@
1
- import { ExprContext } from "../expr-context";
2
- import { BooleanValue } from "../values/boolean-value";
3
- import { Expression } from "./expression";
4
- export declare class BinaryExpr extends Expression {
5
- expr1: any;
6
- expr2: any;
7
- op: any;
8
- constructor(expr1: any, op: any, expr2: any);
9
- evaluate(ctx: any): any;
10
- compare(ctx: ExprContext, cmp: any): BooleanValue;
11
- }
1
+ import { ExprContext } from "../expr-context";
2
+ import { BooleanValue } from "../values/boolean-value";
3
+ import { Expression } from "./expression";
4
+ export declare class BinaryExpr extends Expression {
5
+ expr1: any;
6
+ expr2: any;
7
+ op: any;
8
+ constructor(expr1: any, op: any, expr2: any);
9
+ evaluate(ctx: any): any;
10
+ compare(ctx: ExprContext, cmp: any): BooleanValue;
11
+ }