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.
- package/README.md +7 -2
- package/index.d.mts +817 -0
- package/index.d.ts +817 -4
- package/index.js +4467 -12
- package/index.js.map +1 -1
- package/index.mjs +4431 -0
- package/index.mjs.map +1 -0
- package/package.json +24 -19
- package/umd/xslt-processor.global.js +9 -0
- package/umd/xslt-processor.global.js.map +1 -0
- package/constants.d.ts +0 -12
- package/constants.js +0 -17
- package/constants.js.map +0 -1
- package/dom/functions.d.ts +0 -14
- package/dom/functions.js +0 -57
- package/dom/functions.js.map +0 -1
- package/dom/index.d.ts +0 -7
- package/dom/index.js +0 -24
- package/dom/index.js.map +0 -1
- package/dom/util.d.ts +0 -7
- package/dom/util.js +0 -43
- package/dom/util.js.map +0 -1
- package/dom/xbrowser-node.d.ts +0 -9
- package/dom/xbrowser-node.js +0 -32
- package/dom/xbrowser-node.js.map +0 -1
- package/dom/xdocument.d.ts +0 -16
- package/dom/xdocument.js +0 -74
- package/dom/xdocument.js.map +0 -1
- package/dom/xml-functions.d.ts +0 -73
- package/dom/xml-functions.js +0 -402
- package/dom/xml-functions.js.map +0 -1
- package/dom/xml-output-options.d.ts +0 -6
- package/dom/xml-output-options.js +0 -3
- package/dom/xml-output-options.js.map +0 -1
- package/dom/xml-parser.d.ts +0 -47
- package/dom/xml-parser.js +0 -308
- package/dom/xml-parser.js.map +0 -1
- package/dom/xmltoken.d.ts +0 -12
- package/dom/xmltoken.js +0 -102
- package/dom/xmltoken.js.map +0 -1
- package/dom/xnode.d.ts +0 -73
- package/dom/xnode.js +0 -451
- package/dom/xnode.js.map +0 -1
- package/test-without-jest.d.ts +0 -1
- package/test-without-jest.js +0 -63
- package/test-without-jest.js.map +0 -1
- package/umd/constants.d.ts +0 -12
- package/umd/dom/functions.d.ts +0 -14
- package/umd/dom/index.d.ts +0 -7
- package/umd/dom/util.d.ts +0 -7
- package/umd/dom/xbrowser-node.d.ts +0 -9
- package/umd/dom/xdocument.d.ts +0 -16
- package/umd/dom/xml-functions.d.ts +0 -73
- package/umd/dom/xml-output-options.d.ts +0 -6
- package/umd/dom/xml-parser.d.ts +0 -47
- package/umd/dom/xmltoken.d.ts +0 -12
- package/umd/dom/xnode.d.ts +0 -73
- package/umd/index.d.ts +0 -4
- package/umd/test-without-jest.d.ts +0 -1
- package/umd/xpath/common-function.d.ts +0 -8
- package/umd/xpath/expr-context.d.ts +0 -116
- package/umd/xpath/expressions/binary-expr.d.ts +0 -11
- package/umd/xpath/expressions/expression.d.ts +0 -4
- package/umd/xpath/expressions/filter-expr.d.ts +0 -9
- package/umd/xpath/expressions/function-call-expr.d.ts +0 -12
- package/umd/xpath/expressions/index.d.ts +0 -13
- package/umd/xpath/expressions/literal-expr.d.ts +0 -7
- package/umd/xpath/expressions/location-expr.d.ts +0 -15
- package/umd/xpath/expressions/number-expr.d.ts +0 -7
- package/umd/xpath/expressions/path-expr.d.ts +0 -9
- package/umd/xpath/expressions/predicate-expr.d.ts +0 -8
- package/umd/xpath/expressions/step-expr.d.ts +0 -25
- package/umd/xpath/expressions/token-expr.d.ts +0 -7
- package/umd/xpath/expressions/unary-minus-expr.d.ts +0 -8
- package/umd/xpath/expressions/union-expr.d.ts +0 -9
- package/umd/xpath/expressions/variable-expr.d.ts +0 -7
- package/umd/xpath/functions/index.d.ts +0 -4
- package/umd/xpath/functions/internal-functions.d.ts +0 -2
- package/umd/xpath/functions/non-standard.d.ts +0 -12
- package/umd/xpath/functions/standard-20.d.ts +0 -5
- package/umd/xpath/functions/standard.d.ts +0 -40
- package/umd/xpath/functions/xslt-specific.d.ts +0 -3
- package/umd/xpath/grammar-rule-candidate.d.ts +0 -8
- package/umd/xpath/index.d.ts +0 -3
- package/umd/xpath/match-resolver.d.ts +0 -55
- package/umd/xpath/node-tests/index.d.ts +0 -8
- package/umd/xpath/node-tests/node-test-any.d.ts +0 -6
- package/umd/xpath/node-tests/node-test-comment.d.ts +0 -6
- package/umd/xpath/node-tests/node-test-element-or-attribute.d.ts +0 -6
- package/umd/xpath/node-tests/node-test-name.d.ts +0 -10
- package/umd/xpath/node-tests/node-test-nc.d.ts +0 -9
- package/umd/xpath/node-tests/node-test-pi.d.ts +0 -8
- package/umd/xpath/node-tests/node-test-text.d.ts +0 -6
- package/umd/xpath/node-tests/node-test.d.ts +0 -5
- package/umd/xpath/tokens.d.ts +0 -62
- package/umd/xpath/values/boolean-value.d.ts +0 -11
- package/umd/xpath/values/index.d.ts +0 -5
- package/umd/xpath/values/node-set-value.d.ts +0 -11
- package/umd/xpath/values/node-value.d.ts +0 -7
- package/umd/xpath/values/number-value.d.ts +0 -11
- package/umd/xpath/values/string-value.d.ts +0 -11
- package/umd/xpath/xpath-grammar-rules.d.ts +0 -68
- package/umd/xpath/xpath-token-rule.d.ts +0 -7
- package/umd/xpath/xpath.d.ts +0 -174
- package/umd/xpathdebug.d.ts +0 -2
- package/umd/xslt/index.d.ts +0 -3
- package/umd/xslt/xslt-decimal-format-settings.d.ts +0 -28
- package/umd/xslt/xslt-options.d.ts +0 -7
- package/umd/xslt/xslt-parameter.d.ts +0 -5
- package/umd/xslt/xslt.d.ts +0 -269
- package/umd/xslt-processor.js +0 -2
- package/umd/xslt-processor.js.map +0 -1
- package/xpath/common-function.d.ts +0 -8
- package/xpath/common-function.js +0 -32
- package/xpath/common-function.js.map +0 -1
- package/xpath/expr-context.d.ts +0 -116
- package/xpath/expr-context.js +0 -191
- package/xpath/expr-context.js.map +0 -1
- package/xpath/expressions/binary-expr.d.ts +0 -11
- package/xpath/expressions/binary-expr.js +0 -166
- package/xpath/expressions/binary-expr.js.map +0 -1
- package/xpath/expressions/expression.d.ts +0 -4
- package/xpath/expressions/expression.js +0 -10
- package/xpath/expressions/expression.js.map +0 -1
- package/xpath/expressions/filter-expr.d.ts +0 -9
- package/xpath/expressions/filter-expr.js +0 -53
- package/xpath/expressions/filter-expr.js.map +0 -1
- package/xpath/expressions/function-call-expr.d.ts +0 -12
- package/xpath/expressions/function-call-expr.js +0 -97
- package/xpath/expressions/function-call-expr.js.map +0 -1
- package/xpath/expressions/index.d.ts +0 -13
- package/xpath/expressions/index.js +0 -30
- package/xpath/expressions/index.js.map +0 -1
- package/xpath/expressions/literal-expr.d.ts +0 -7
- package/xpath/expressions/literal-expr.js +0 -34
- package/xpath/expressions/literal-expr.js.map +0 -1
- package/xpath/expressions/location-expr.d.ts +0 -15
- package/xpath/expressions/location-expr.js +0 -99
- package/xpath/expressions/location-expr.js.map +0 -1
- package/xpath/expressions/number-expr.d.ts +0 -7
- package/xpath/expressions/number-expr.js +0 -34
- package/xpath/expressions/number-expr.js.map +0 -1
- package/xpath/expressions/path-expr.d.ts +0 -9
- package/xpath/expressions/path-expr.js +0 -52
- package/xpath/expressions/path-expr.js.map +0 -1
- package/xpath/expressions/predicate-expr.d.ts +0 -8
- package/xpath/expressions/predicate-expr.js +0 -41
- package/xpath/expressions/predicate-expr.js.map +0 -1
- package/xpath/expressions/step-expr.d.ts +0 -25
- package/xpath/expressions/step-expr.js +0 -281
- package/xpath/expressions/step-expr.js.map +0 -1
- package/xpath/expressions/token-expr.d.ts +0 -7
- package/xpath/expressions/token-expr.js +0 -34
- package/xpath/expressions/token-expr.js.map +0 -1
- package/xpath/expressions/unary-minus-expr.d.ts +0 -8
- package/xpath/expressions/unary-minus-expr.js +0 -34
- package/xpath/expressions/unary-minus-expr.js.map +0 -1
- package/xpath/expressions/union-expr.d.ts +0 -9
- package/xpath/expressions/union-expr.js +0 -51
- package/xpath/expressions/union-expr.js.map +0 -1
- package/xpath/expressions/variable-expr.d.ts +0 -7
- package/xpath/expressions/variable-expr.js +0 -33
- package/xpath/expressions/variable-expr.js.map +0 -1
- package/xpath/functions/index.d.ts +0 -4
- package/xpath/functions/index.js +0 -21
- package/xpath/functions/index.js.map +0 -1
- package/xpath/functions/internal-functions.d.ts +0 -2
- package/xpath/functions/internal-functions.js +0 -22
- package/xpath/functions/internal-functions.js.map +0 -1
- package/xpath/functions/non-standard.d.ts +0 -12
- package/xpath/functions/non-standard.js +0 -45
- package/xpath/functions/non-standard.js.map +0 -1
- package/xpath/functions/standard-20.d.ts +0 -5
- package/xpath/functions/standard-20.js +0 -26
- package/xpath/functions/standard-20.js.map +0 -1
- package/xpath/functions/standard.d.ts +0 -40
- package/xpath/functions/standard.js +0 -442
- package/xpath/functions/standard.js.map +0 -1
- package/xpath/functions/xslt-specific.d.ts +0 -3
- package/xpath/functions/xslt-specific.js +0 -14
- package/xpath/functions/xslt-specific.js.map +0 -1
- package/xpath/grammar-rule-candidate.d.ts +0 -8
- package/xpath/grammar-rule-candidate.js +0 -3
- package/xpath/grammar-rule-candidate.js.map +0 -1
- package/xpath/index.d.ts +0 -3
- package/xpath/index.js +0 -20
- package/xpath/index.js.map +0 -1
- package/xpath/match-resolver.d.ts +0 -55
- package/xpath/match-resolver.js +0 -137
- package/xpath/match-resolver.js.map +0 -1
- package/xpath/node-tests/index.d.ts +0 -8
- package/xpath/node-tests/index.js +0 -18
- package/xpath/node-tests/index.js.map +0 -1
- package/xpath/node-tests/node-test-any.d.ts +0 -6
- package/xpath/node-tests/node-test-any.js +0 -15
- package/xpath/node-tests/node-test-any.js.map +0 -1
- package/xpath/node-tests/node-test-comment.d.ts +0 -6
- package/xpath/node-tests/node-test-comment.js +0 -15
- package/xpath/node-tests/node-test-comment.js.map +0 -1
- package/xpath/node-tests/node-test-element-or-attribute.d.ts +0 -6
- package/xpath/node-tests/node-test-element-or-attribute.js +0 -16
- package/xpath/node-tests/node-test-element-or-attribute.js.map +0 -1
- package/xpath/node-tests/node-test-name.d.ts +0 -10
- package/xpath/node-tests/node-test-name.js +0 -39
- package/xpath/node-tests/node-test-name.js.map +0 -1
- package/xpath/node-tests/node-test-nc.d.ts +0 -9
- package/xpath/node-tests/node-test-nc.js +0 -17
- package/xpath/node-tests/node-test-nc.js.map +0 -1
- package/xpath/node-tests/node-test-pi.d.ts +0 -8
- package/xpath/node-tests/node-test-pi.js +0 -17
- package/xpath/node-tests/node-test-pi.js.map +0 -1
- package/xpath/node-tests/node-test-text.d.ts +0 -6
- package/xpath/node-tests/node-test-text.js +0 -15
- package/xpath/node-tests/node-test-text.js.map +0 -1
- package/xpath/node-tests/node-test.d.ts +0 -5
- package/xpath/node-tests/node-test.js +0 -3
- package/xpath/node-tests/node-test.js.map +0 -1
- package/xpath/tokens.d.ts +0 -62
- package/xpath/tokens.js +0 -301
- package/xpath/tokens.js.map +0 -1
- package/xpath/values/boolean-value.d.ts +0 -11
- package/xpath/values/boolean-value.js +0 -24
- package/xpath/values/boolean-value.js.map +0 -1
- package/xpath/values/index.d.ts +0 -5
- package/xpath/values/index.js +0 -47
- package/xpath/values/index.js.map +0 -1
- package/xpath/values/node-set-value.d.ts +0 -11
- package/xpath/values/node-set-value.js +0 -28
- package/xpath/values/node-set-value.js.map +0 -1
- package/xpath/values/node-value.d.ts +0 -7
- package/xpath/values/node-value.js +0 -3
- package/xpath/values/node-value.js.map +0 -1
- package/xpath/values/number-value.d.ts +0 -11
- package/xpath/values/number-value.js +0 -24
- package/xpath/values/number-value.js.map +0 -1
- package/xpath/values/string-value.d.ts +0 -11
- package/xpath/values/string-value.js +0 -24
- package/xpath/values/string-value.js.map +0 -1
- package/xpath/xpath-grammar-rules.d.ts +0 -68
- package/xpath/xpath-grammar-rules.js +0 -75
- package/xpath/xpath-grammar-rules.js.map +0 -1
- package/xpath/xpath-token-rule.d.ts +0 -7
- package/xpath/xpath-token-rule.js +0 -3
- package/xpath/xpath-token-rule.js.map +0 -1
- package/xpath/xpath.d.ts +0 -174
- package/xpath/xpath.js +0 -912
- package/xpath/xpath.js.map +0 -1
- package/xpathdebug.d.ts +0 -2
- package/xpathdebug.js +0 -188
- package/xpathdebug.js.map +0 -1
- package/xslt/index.d.ts +0 -3
- package/xslt/index.js +0 -20
- package/xslt/index.js.map +0 -1
- package/xslt/xslt-decimal-format-settings.d.ts +0 -28
- package/xslt/xslt-decimal-format-settings.js +0 -3
- package/xslt/xslt-decimal-format-settings.js.map +0 -1
- package/xslt/xslt-options.d.ts +0 -7
- package/xslt/xslt-options.js +0 -3
- package/xslt/xslt-options.js.map +0 -1
- package/xslt/xslt-parameter.d.ts +0 -5
- package/xslt/xslt-parameter.js +0 -3
- package/xslt/xslt-parameter.js.map +0 -1
- package/xslt/xslt.d.ts +0 -269
- package/xslt/xslt.js +0 -1325
- package/xslt/xslt.js.map +0 -1
package/xpath/tokens.js
DELETED
|
@@ -1,301 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// The tokens of the language. The label property is just used for
|
|
3
|
-
// generating debug output. The prec property is the precedence used
|
|
4
|
-
// for shift/reduce resolution. Default precedence is 0 as a lookahead
|
|
5
|
-
// token and 2 on the stack. TODO(mesch): this is certainly not
|
|
6
|
-
// necessary and too complicated. Simplify this!
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.ASSOC_LEFT = exports.Q_ONE_OR_MULTIPLE = exports.Q_ZERO_OR_MULTIPLE = exports.Q_ZERO_OR_ONE = exports.xPathTokenRules = exports.TOK_NODEO = exports.TOK_QNAME = exports.TOK_NUMBER = exports.TOK_LITERALQQ = exports.TOK_LITERALQ = exports.TOK_ASTERISK = exports.TOK_NCNAME = exports.TOK_DOLLAR = exports.TOK_BRACKC = exports.TOK_BRACKO = exports.TOK_MOD = exports.TOK_DIV = exports.TOK_MINUS = exports.TOK_PLUS = exports.TOK_LT = exports.TOK_LE = exports.TOK_GT = exports.TOK_GE = exports.TOK_NEQ = exports.TOK_EQ = exports.TOK_AND = exports.TOK_OR = exports.TOK_COMMA = exports.TOK_AT = exports.TOK_DOT = exports.TOK_DDOT = exports.TOK_PARENC = exports.TOK_PARENO = exports.TOK_AXISNAME = exports.TOK_COLON = exports.TOK_AXIS = exports.TOK_SLASH = exports.TOK_DSLASH = exports.TOK_PIPE = exports.xPathAxis = void 0;
|
|
9
|
-
var xmltoken_1 = require("../dom/xmltoken");
|
|
10
|
-
// NOTE: tabular formatting is the big exception, but here it should
|
|
11
|
-
// be OK.
|
|
12
|
-
// The axes of XPath expressions.
|
|
13
|
-
exports.xPathAxis = {
|
|
14
|
-
ANCESTOR_OR_SELF: 'ancestor-or-self',
|
|
15
|
-
ANCESTOR: 'ancestor',
|
|
16
|
-
ATTRIBUTE: 'attribute',
|
|
17
|
-
CHILD: 'child',
|
|
18
|
-
DESCENDANT_OR_SELF: 'descendant-or-self',
|
|
19
|
-
DESCENDANT: 'descendant',
|
|
20
|
-
FOLLOWING_SIBLING: 'following-sibling',
|
|
21
|
-
FOLLOWING: 'following',
|
|
22
|
-
NAMESPACE: 'namespace',
|
|
23
|
-
PARENT: 'parent',
|
|
24
|
-
PRECEDING_SIBLING: 'preceding-sibling',
|
|
25
|
-
PRECEDING: 'preceding',
|
|
26
|
-
SELF: 'self',
|
|
27
|
-
SELF_AND_SIBLINGS: 'self-and-siblings' // Doesn't exist officially.
|
|
28
|
-
// It is here for a special case of `<xsl:apply-templates>`.
|
|
29
|
-
};
|
|
30
|
-
var xpathAxesRe = [
|
|
31
|
-
exports.xPathAxis.ANCESTOR_OR_SELF,
|
|
32
|
-
exports.xPathAxis.ANCESTOR,
|
|
33
|
-
exports.xPathAxis.ATTRIBUTE,
|
|
34
|
-
exports.xPathAxis.CHILD,
|
|
35
|
-
exports.xPathAxis.DESCENDANT_OR_SELF,
|
|
36
|
-
exports.xPathAxis.DESCENDANT,
|
|
37
|
-
exports.xPathAxis.FOLLOWING_SIBLING,
|
|
38
|
-
exports.xPathAxis.FOLLOWING,
|
|
39
|
-
exports.xPathAxis.NAMESPACE,
|
|
40
|
-
exports.xPathAxis.PARENT,
|
|
41
|
-
exports.xPathAxis.PRECEDING_SIBLING,
|
|
42
|
-
exports.xPathAxis.PRECEDING,
|
|
43
|
-
exports.xPathAxis.SELF
|
|
44
|
-
].join('(?=::)|') + '(?=::)'; //(viat) bodgy fix because namespace-uri() was getting detected as the namespace axis. maybe less bodgy fix later.
|
|
45
|
-
exports.TOK_PIPE = {
|
|
46
|
-
label: '|',
|
|
47
|
-
prec: 17,
|
|
48
|
-
re: new RegExp('^\\|'),
|
|
49
|
-
key: undefined
|
|
50
|
-
};
|
|
51
|
-
exports.TOK_DSLASH = {
|
|
52
|
-
label: '//',
|
|
53
|
-
prec: 19,
|
|
54
|
-
re: new RegExp('^//'),
|
|
55
|
-
key: undefined
|
|
56
|
-
};
|
|
57
|
-
exports.TOK_SLASH = {
|
|
58
|
-
label: '/',
|
|
59
|
-
prec: 30,
|
|
60
|
-
re: new RegExp('^/'),
|
|
61
|
-
key: undefined
|
|
62
|
-
};
|
|
63
|
-
exports.TOK_AXIS = {
|
|
64
|
-
label: '::',
|
|
65
|
-
prec: 20,
|
|
66
|
-
re: new RegExp('^::'),
|
|
67
|
-
key: undefined
|
|
68
|
-
};
|
|
69
|
-
exports.TOK_COLON = {
|
|
70
|
-
label: ':',
|
|
71
|
-
prec: 1000,
|
|
72
|
-
re: new RegExp('^:'),
|
|
73
|
-
key: undefined
|
|
74
|
-
};
|
|
75
|
-
exports.TOK_AXISNAME = {
|
|
76
|
-
label: '[axis]',
|
|
77
|
-
re: new RegExp("^(".concat(xpathAxesRe, ")")),
|
|
78
|
-
key: undefined
|
|
79
|
-
};
|
|
80
|
-
exports.TOK_PARENO = {
|
|
81
|
-
label: '(',
|
|
82
|
-
prec: 34,
|
|
83
|
-
re: new RegExp('^\\('),
|
|
84
|
-
key: undefined
|
|
85
|
-
};
|
|
86
|
-
exports.TOK_PARENC = {
|
|
87
|
-
label: ')',
|
|
88
|
-
re: new RegExp('^\\)'),
|
|
89
|
-
key: undefined
|
|
90
|
-
};
|
|
91
|
-
exports.TOK_DDOT = {
|
|
92
|
-
label: '..',
|
|
93
|
-
prec: 34,
|
|
94
|
-
re: new RegExp('^\\.\\.'),
|
|
95
|
-
key: undefined
|
|
96
|
-
};
|
|
97
|
-
exports.TOK_DOT = {
|
|
98
|
-
label: '.',
|
|
99
|
-
prec: 34,
|
|
100
|
-
re: new RegExp('^\\.'),
|
|
101
|
-
key: undefined
|
|
102
|
-
};
|
|
103
|
-
exports.TOK_AT = {
|
|
104
|
-
label: '@',
|
|
105
|
-
prec: 34,
|
|
106
|
-
re: new RegExp('^@'),
|
|
107
|
-
key: undefined
|
|
108
|
-
};
|
|
109
|
-
exports.TOK_COMMA = {
|
|
110
|
-
label: ',',
|
|
111
|
-
re: new RegExp('^,'),
|
|
112
|
-
key: undefined
|
|
113
|
-
};
|
|
114
|
-
exports.TOK_OR = {
|
|
115
|
-
label: 'or',
|
|
116
|
-
prec: 10,
|
|
117
|
-
re: new RegExp('^or\\b'),
|
|
118
|
-
key: undefined
|
|
119
|
-
};
|
|
120
|
-
exports.TOK_AND = {
|
|
121
|
-
label: 'and',
|
|
122
|
-
prec: 11,
|
|
123
|
-
re: new RegExp('^and\\b'),
|
|
124
|
-
key: undefined
|
|
125
|
-
};
|
|
126
|
-
exports.TOK_EQ = {
|
|
127
|
-
label: '=',
|
|
128
|
-
prec: 12,
|
|
129
|
-
re: new RegExp('^='),
|
|
130
|
-
key: undefined
|
|
131
|
-
};
|
|
132
|
-
exports.TOK_NEQ = {
|
|
133
|
-
label: '!=',
|
|
134
|
-
prec: 12,
|
|
135
|
-
re: new RegExp('^!='),
|
|
136
|
-
key: undefined
|
|
137
|
-
};
|
|
138
|
-
exports.TOK_GE = {
|
|
139
|
-
label: '>=',
|
|
140
|
-
prec: 13,
|
|
141
|
-
re: new RegExp('^>='),
|
|
142
|
-
key: undefined
|
|
143
|
-
};
|
|
144
|
-
exports.TOK_GT = {
|
|
145
|
-
label: '>',
|
|
146
|
-
prec: 13,
|
|
147
|
-
re: new RegExp('^>'),
|
|
148
|
-
key: undefined
|
|
149
|
-
};
|
|
150
|
-
exports.TOK_LE = {
|
|
151
|
-
label: '<=',
|
|
152
|
-
prec: 13,
|
|
153
|
-
re: new RegExp('^<='),
|
|
154
|
-
key: undefined
|
|
155
|
-
};
|
|
156
|
-
exports.TOK_LT = {
|
|
157
|
-
label: '<',
|
|
158
|
-
prec: 13,
|
|
159
|
-
re: new RegExp('^<'),
|
|
160
|
-
key: undefined
|
|
161
|
-
};
|
|
162
|
-
exports.TOK_PLUS = {
|
|
163
|
-
label: '+',
|
|
164
|
-
prec: 14,
|
|
165
|
-
re: new RegExp('^\\+'),
|
|
166
|
-
left: true,
|
|
167
|
-
key: undefined
|
|
168
|
-
};
|
|
169
|
-
exports.TOK_MINUS = {
|
|
170
|
-
label: '-',
|
|
171
|
-
prec: 14,
|
|
172
|
-
re: new RegExp('^\\-'),
|
|
173
|
-
left: true,
|
|
174
|
-
key: undefined
|
|
175
|
-
};
|
|
176
|
-
exports.TOK_DIV = {
|
|
177
|
-
label: 'div',
|
|
178
|
-
prec: 15,
|
|
179
|
-
re: new RegExp('^div\\b'),
|
|
180
|
-
left: true,
|
|
181
|
-
key: undefined
|
|
182
|
-
};
|
|
183
|
-
exports.TOK_MOD = {
|
|
184
|
-
label: 'mod',
|
|
185
|
-
prec: 15,
|
|
186
|
-
re: new RegExp('^mod\\b'),
|
|
187
|
-
left: true,
|
|
188
|
-
key: undefined
|
|
189
|
-
};
|
|
190
|
-
exports.TOK_BRACKO = {
|
|
191
|
-
label: '[',
|
|
192
|
-
prec: 32,
|
|
193
|
-
re: new RegExp('^\\['),
|
|
194
|
-
key: undefined
|
|
195
|
-
};
|
|
196
|
-
exports.TOK_BRACKC = {
|
|
197
|
-
label: ']',
|
|
198
|
-
re: new RegExp('^\\]'),
|
|
199
|
-
key: undefined
|
|
200
|
-
};
|
|
201
|
-
exports.TOK_DOLLAR = {
|
|
202
|
-
label: '$',
|
|
203
|
-
re: new RegExp('^\\$'),
|
|
204
|
-
key: undefined
|
|
205
|
-
};
|
|
206
|
-
exports.TOK_NCNAME = {
|
|
207
|
-
label: '[ncname]',
|
|
208
|
-
re: new RegExp("^".concat(xmltoken_1.XML_NC_NAME)),
|
|
209
|
-
key: undefined
|
|
210
|
-
};
|
|
211
|
-
exports.TOK_ASTERISK = {
|
|
212
|
-
label: '*',
|
|
213
|
-
prec: 15,
|
|
214
|
-
re: new RegExp('^\\*'),
|
|
215
|
-
left: true,
|
|
216
|
-
key: undefined
|
|
217
|
-
};
|
|
218
|
-
exports.TOK_LITERALQ = {
|
|
219
|
-
label: '[litq]',
|
|
220
|
-
prec: 20,
|
|
221
|
-
re: new RegExp("^'[^\\']*'"),
|
|
222
|
-
key: undefined
|
|
223
|
-
};
|
|
224
|
-
exports.TOK_LITERALQQ = {
|
|
225
|
-
label: '[litqq]',
|
|
226
|
-
prec: 20,
|
|
227
|
-
re: new RegExp('^"[^\\"]*"'),
|
|
228
|
-
key: undefined
|
|
229
|
-
};
|
|
230
|
-
exports.TOK_NUMBER = {
|
|
231
|
-
label: '[number]',
|
|
232
|
-
prec: 35,
|
|
233
|
-
re: new RegExp('^\\d+(\\.\\d*)?'),
|
|
234
|
-
key: undefined
|
|
235
|
-
};
|
|
236
|
-
exports.TOK_QNAME = {
|
|
237
|
-
label: '[qname]',
|
|
238
|
-
re: new RegExp("^(".concat(xmltoken_1.XML_NC_NAME, ":)?").concat(xmltoken_1.XML_NC_NAME)),
|
|
239
|
-
key: undefined
|
|
240
|
-
};
|
|
241
|
-
exports.TOK_NODEO = {
|
|
242
|
-
label: '[nodeTest-start]',
|
|
243
|
-
re: new RegExp('^(processing-instruction|comment|text|node)\\('),
|
|
244
|
-
key: undefined
|
|
245
|
-
};
|
|
246
|
-
// The table of the tokens of our grammar, used by the lexer: first
|
|
247
|
-
// column the tag, second column a regexp to recognize it in the
|
|
248
|
-
// input, third column the precedence of the token, fourth column a
|
|
249
|
-
// factory function for the semantic value of the token.
|
|
250
|
-
//
|
|
251
|
-
// NOTE: order of this list is important, because the first match
|
|
252
|
-
// counts. Cf. DDOT and DOT, and AXIS and COLON.
|
|
253
|
-
exports.xPathTokenRules = [
|
|
254
|
-
exports.TOK_DSLASH,
|
|
255
|
-
exports.TOK_SLASH,
|
|
256
|
-
exports.TOK_DDOT,
|
|
257
|
-
exports.TOK_DOT,
|
|
258
|
-
exports.TOK_AXIS,
|
|
259
|
-
exports.TOK_COLON,
|
|
260
|
-
exports.TOK_AXISNAME,
|
|
261
|
-
exports.TOK_NODEO,
|
|
262
|
-
exports.TOK_PARENO,
|
|
263
|
-
exports.TOK_PARENC,
|
|
264
|
-
exports.TOK_BRACKO,
|
|
265
|
-
exports.TOK_BRACKC,
|
|
266
|
-
exports.TOK_AT,
|
|
267
|
-
exports.TOK_COMMA,
|
|
268
|
-
exports.TOK_OR,
|
|
269
|
-
exports.TOK_AND,
|
|
270
|
-
exports.TOK_NEQ,
|
|
271
|
-
exports.TOK_EQ,
|
|
272
|
-
exports.TOK_GE,
|
|
273
|
-
exports.TOK_GT,
|
|
274
|
-
exports.TOK_LE,
|
|
275
|
-
exports.TOK_LT,
|
|
276
|
-
exports.TOK_PLUS,
|
|
277
|
-
exports.TOK_MINUS,
|
|
278
|
-
exports.TOK_ASTERISK,
|
|
279
|
-
exports.TOK_PIPE,
|
|
280
|
-
exports.TOK_MOD,
|
|
281
|
-
exports.TOK_DIV,
|
|
282
|
-
exports.TOK_LITERALQ,
|
|
283
|
-
exports.TOK_LITERALQQ,
|
|
284
|
-
exports.TOK_NUMBER,
|
|
285
|
-
exports.TOK_QNAME,
|
|
286
|
-
exports.TOK_NCNAME,
|
|
287
|
-
exports.TOK_DOLLAR
|
|
288
|
-
];
|
|
289
|
-
// Quantifiers that are used in the productions of the grammar.
|
|
290
|
-
exports.Q_ZERO_OR_ONE = {
|
|
291
|
-
label: '?'
|
|
292
|
-
};
|
|
293
|
-
exports.Q_ZERO_OR_MULTIPLE = {
|
|
294
|
-
label: '*'
|
|
295
|
-
};
|
|
296
|
-
exports.Q_ONE_OR_MULTIPLE = {
|
|
297
|
-
label: '+'
|
|
298
|
-
};
|
|
299
|
-
// Tag for left associativity (right assoc is implied by undefined).
|
|
300
|
-
exports.ASSOC_LEFT = true;
|
|
301
|
-
//# sourceMappingURL=tokens.js.map
|
package/x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,EAAE,EAAE,IAAI,MAAM,CAAC,YAAK,sBAAW,gBAAM,sBAAW,CAAE,CAAC;IACnD,GAAG,EAAE,SAAS;CACjB,CAAC;AAEW,QAAA,SAAS,GAAmB;IACrC,KAAK,EAAE,kBAAkB;IACzB,EAAE,EAAE,IAAI,MAAM,CAAC,gDAAgD,CAAC;IAChE,GAAG,EAAE,SAAS;CACjB,CAAC;AAEF,mEAAmE;AACnE,gEAAgE;AAChE,mEAAmE;AACnE,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,gDAAgD;AAEnC,QAAA,eAAe,GAAqB;IAC7C,kBAAU;IACV,iBAAS;IACT,gBAAQ;IACR,eAAO;IACP,gBAAQ;IACR,iBAAS;IACT,oBAAY;IACZ,iBAAS;IACT,kBAAU;IACV,kBAAU;IACV,kBAAU;IACV,kBAAU;IACV,cAAM;IACN,iBAAS;IACT,cAAM;IACN,eAAO;IACP,eAAO;IACP,cAAM;IACN,cAAM;IACN,cAAM;IACN,cAAM;IACN,cAAM;IACN,gBAAQ;IACR,iBAAS;IACT,oBAAY;IACZ,gBAAQ;IACR,eAAO;IACP,eAAO;IACP,oBAAY;IACZ,qBAAa;IACb,kBAAU;IACV,iBAAS;IACT,kBAAU;IACV,kBAAU;CACb,CAAC;AAEF,+DAA+D;AAClD,QAAA,aAAa,GAAG;IACzB,KAAK,EAAE,GAAG;CACb,CAAC;AACW,QAAA,kBAAkB,GAAG;IAC9B,KAAK,EAAE,GAAG;CACb,CAAC;AACW,QAAA,iBAAiB,GAAG;IAC7B,KAAK,EAAE,GAAG;CACb,CAAC;AAEF,oEAAoE;AACvD,QAAA,UAAU,GAAG,IAAI,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { XNode } from "../../dom";
|
|
2
|
-
import { NodeValue } from "./node-value";
|
|
3
|
-
export declare class BooleanValue implements NodeValue {
|
|
4
|
-
value: any;
|
|
5
|
-
type: string;
|
|
6
|
-
constructor(value: any);
|
|
7
|
-
stringValue(): string;
|
|
8
|
-
booleanValue(): any;
|
|
9
|
-
numberValue(): 1 | 0;
|
|
10
|
-
nodeSetValue(): XNode[];
|
|
11
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BooleanValue = void 0;
|
|
4
|
-
var BooleanValue = /** @class */ (function () {
|
|
5
|
-
function BooleanValue(value) {
|
|
6
|
-
this.value = value;
|
|
7
|
-
this.type = 'boolean';
|
|
8
|
-
}
|
|
9
|
-
BooleanValue.prototype.stringValue = function () {
|
|
10
|
-
return "".concat(this.value);
|
|
11
|
-
};
|
|
12
|
-
BooleanValue.prototype.booleanValue = function () {
|
|
13
|
-
return this.value;
|
|
14
|
-
};
|
|
15
|
-
BooleanValue.prototype.numberValue = function () {
|
|
16
|
-
return this.value ? 1 : 0;
|
|
17
|
-
};
|
|
18
|
-
BooleanValue.prototype.nodeSetValue = function () {
|
|
19
|
-
throw this;
|
|
20
|
-
};
|
|
21
|
-
return BooleanValue;
|
|
22
|
-
}());
|
|
23
|
-
exports.BooleanValue = BooleanValue;
|
|
24
|
-
//# sourceMappingURL=boolean-value.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"boolean-value.js","sourceRoot":"","sources":["../../../src/xpath/values/boolean-value.ts"],"names":[],"mappings":";;;AAGA;IAII,sBAAY,KAAU;QAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;IAC1B,CAAC;IAED,kCAAW,GAAX;QACI,OAAO,UAAG,IAAI,CAAC,KAAK,CAAE,CAAC;IAC3B,CAAC;IAED,mCAAY,GAAZ;QACI,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,kCAAW,GAAX;QACI,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC;IAED,mCAAY,GAAZ;QACI,MAAM,IAAI,CAAC;IACf,CAAC;IACL,mBAAC;AAAD,CAAC,AAxBD,IAwBC;AAxBY,oCAAY"}
|
package/xpath/values/index.d.ts
DELETED
package/xpath/values/index.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// XPath expression values. They are what XPath expressions evaluate
|
|
3
|
-
// to. Strangely, the different value types are not specified in the
|
|
4
|
-
// XPath syntax, but only in the semantics, so they don't show up as
|
|
5
|
-
// nonterminals in the grammar. Yet, some expressions are required to
|
|
6
|
-
// evaluate to particular types, and not every type can be coerced
|
|
7
|
-
// into every other type. Although the types of XPath values are
|
|
8
|
-
// similar to the types present in JavaScript, the type coercion rules
|
|
9
|
-
// are a bit peculiar, so we explicitly model XPath types instead of
|
|
10
|
-
// mapping them onto JavaScript types. (See XPath spec.)
|
|
11
|
-
//
|
|
12
|
-
// The four types are:
|
|
13
|
-
//
|
|
14
|
-
// - `StringValue`
|
|
15
|
-
// - `NumberValue`
|
|
16
|
-
// - `BooleanValue`
|
|
17
|
-
// - `NodeSetValue`
|
|
18
|
-
//
|
|
19
|
-
// The common interface of the value classes consists of methods that
|
|
20
|
-
// implement the XPath type coercion rules:
|
|
21
|
-
//
|
|
22
|
-
// - `stringValue()` -- returns the value as a JavaScript String;
|
|
23
|
-
// - `numberValue()` -- returns the value as a JavaScript Number;
|
|
24
|
-
// - `booleanValue()` -- returns the value as a JavaScript Boolean;
|
|
25
|
-
// - `nodeSetValue()` -- returns the value as a JavaScript Array of DOM
|
|
26
|
-
// Node objects.
|
|
27
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
28
|
-
if (k2 === undefined) k2 = k;
|
|
29
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
30
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
31
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
32
|
-
}
|
|
33
|
-
Object.defineProperty(o, k2, desc);
|
|
34
|
-
}) : (function(o, m, k, k2) {
|
|
35
|
-
if (k2 === undefined) k2 = k;
|
|
36
|
-
o[k2] = m[k];
|
|
37
|
-
}));
|
|
38
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
39
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
__exportStar(require("./boolean-value"), exports);
|
|
43
|
-
__exportStar(require("./node-set-value"), exports);
|
|
44
|
-
__exportStar(require("./node-value"), exports);
|
|
45
|
-
__exportStar(require("./number-value"), exports);
|
|
46
|
-
__exportStar(require("./string-value"), exports);
|
|
47
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/xpath/values/index.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,oBAAoB;AACpB,oBAAoB;AACpB,qBAAqB;AACrB,qBAAqB;AACrB,EAAE;AACF,qEAAqE;AACrE,2CAA2C;AAC3C,EAAE;AACF,mEAAmE;AACnE,mEAAmE;AACnE,qEAAqE;AACrE,yEAAyE;AACzE,sCAAsC;;;;;;;;;;;;;;;;AAEtC,kDAAgC;AAChC,mDAAiC;AACjC,+CAA6B;AAC7B,iDAA+B;AAC/B,iDAA+B"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { XNode } from "../../dom";
|
|
2
|
-
import { NodeValue } from "./node-value";
|
|
3
|
-
export declare class NodeSetValue implements NodeValue {
|
|
4
|
-
value: XNode[];
|
|
5
|
-
type: string;
|
|
6
|
-
constructor(value: XNode[]);
|
|
7
|
-
stringValue(): string;
|
|
8
|
-
booleanValue(): boolean;
|
|
9
|
-
numberValue(): number;
|
|
10
|
-
nodeSetValue(): XNode[];
|
|
11
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
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 parseInt(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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-set-value.js","sourceRoot":"","sources":["../../../src/xpath/values/node-set-value.ts"],"names":[],"mappings":";;;AAAA,iCAA4C;AAG5C;IAII,sBAAY,KAAc;QACtB,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,CAAC;YAC1B,OAAO,EAAE,CAAC;QACd,CAAC;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,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC;IAC5C,CAAC;IAED,mCAAY,GAAZ;QACI,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IACL,mBAAC;AAAD,CAAC,AA5BD,IA4BC;AA5BY,oCAAY"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-value.js","sourceRoot":"","sources":["../../../src/xpath/values/node-value.ts"],"names":[],"mappings":""}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { XNode } from "../../dom";
|
|
2
|
-
import { NodeValue } from "./node-value";
|
|
3
|
-
export declare class NumberValue implements NodeValue {
|
|
4
|
-
value: any;
|
|
5
|
-
type: string;
|
|
6
|
-
constructor(value: any);
|
|
7
|
-
stringValue(): string;
|
|
8
|
-
booleanValue(): boolean;
|
|
9
|
-
numberValue(): number;
|
|
10
|
-
nodeSetValue(): XNode[];
|
|
11
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"number-value.js","sourceRoot":"","sources":["../../../src/xpath/values/number-value.ts"],"names":[],"mappings":";;;AAGA;IAII,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,AAxBD,IAwBC;AAxBY,kCAAW"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { XNode } from "../../dom";
|
|
2
|
-
import { NodeValue } from "./node-value";
|
|
3
|
-
export declare class StringValue implements NodeValue {
|
|
4
|
-
value: any;
|
|
5
|
-
type: string;
|
|
6
|
-
constructor(value: any);
|
|
7
|
-
stringValue(): string;
|
|
8
|
-
booleanValue(): boolean;
|
|
9
|
-
numberValue(): number;
|
|
10
|
-
nodeSetValue(): XNode[];
|
|
11
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StringValue = void 0;
|
|
4
|
-
var StringValue = /** @class */ (function () {
|
|
5
|
-
function StringValue(value) {
|
|
6
|
-
this.value = value;
|
|
7
|
-
this.type = 'string';
|
|
8
|
-
}
|
|
9
|
-
StringValue.prototype.stringValue = function () {
|
|
10
|
-
return String(this.value);
|
|
11
|
-
};
|
|
12
|
-
StringValue.prototype.booleanValue = function () {
|
|
13
|
-
return this.value.length > 0;
|
|
14
|
-
};
|
|
15
|
-
StringValue.prototype.numberValue = function () {
|
|
16
|
-
return this.value - 0;
|
|
17
|
-
};
|
|
18
|
-
StringValue.prototype.nodeSetValue = function () {
|
|
19
|
-
throw this;
|
|
20
|
-
};
|
|
21
|
-
return StringValue;
|
|
22
|
-
}());
|
|
23
|
-
exports.StringValue = StringValue;
|
|
24
|
-
//# sourceMappingURL=string-value.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string-value.js","sourceRoot":"","sources":["../../../src/xpath/values/string-value.ts"],"names":[],"mappings":";;;AAGA;IAII,qBAAY,KAAU;QAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC;IACzB,CAAC;IAED,iCAAW,GAAX;QACI,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,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,AAxBD,IAwBC;AAxBY,kCAAW"}
|
|
@@ -1,68 +0,0 @@
|
|
|
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
|
-
};
|