xslt-processor 0.11.5 → 0.12.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 (86) hide show
  1. package/package.json +68 -50
  2. package/src/constants.d.ts +8 -0
  3. package/src/dom/constants.d.ts +8 -0
  4. package/src/dom/functions.d.ts +3 -0
  5. package/src/dom/index.d.ts +3 -0
  6. package/src/dom/util.d.ts +46 -0
  7. package/src/dom/xdocument.d.ts +15 -0
  8. package/src/dom/xmltoken.d.ts +12 -0
  9. package/src/dom/xnode.d.ts +38 -0
  10. package/src/index.d.ts +4 -0
  11. package/src/xmltoken.d.ts +12 -0
  12. package/src/xpath/binary-expr.d.ts +9 -0
  13. package/src/xpath/boolean-value.d.ts +9 -0
  14. package/src/xpath/expr-context.d.ts +26 -0
  15. package/src/xpath/factory-functions.d.ts +56 -0
  16. package/src/xpath/filter-expr.d.ts +7 -0
  17. package/src/xpath/function-call-expr.d.ts +47 -0
  18. package/src/xpath/functions.d.ts +16 -0
  19. package/src/xpath/index.d.ts +25 -0
  20. package/src/xpath/literal-expr.d.ts +6 -0
  21. package/src/xpath/location-expr.d.ts +10 -0
  22. package/src/xpath/node-set-value.d.ts +9 -0
  23. package/src/xpath/node-test-any.d.ts +5 -0
  24. package/src/xpath/node-test-comment.d.ts +4 -0
  25. package/src/xpath/node-test-element-or-attribute.d.ts +4 -0
  26. package/src/xpath/node-test-name.d.ts +7 -0
  27. package/src/xpath/node-test-nc.d.ts +7 -0
  28. package/src/xpath/node-test-pi.d.ts +6 -0
  29. package/src/xpath/node-test-text.d.ts +4 -0
  30. package/src/xpath/number-expr.d.ts +6 -0
  31. package/src/xpath/number-value.d.ts +9 -0
  32. package/src/xpath/path-expr.d.ts +7 -0
  33. package/src/xpath/predicate-expr.d.ts +6 -0
  34. package/src/xpath/step-expr.d.ts +10 -0
  35. package/src/xpath/string-value.d.ts +9 -0
  36. package/src/xpath/token-expr.d.ts +6 -0
  37. package/src/xpath/tokens.d.ts +231 -0
  38. package/src/xpath/unary-minus-expr.d.ts +6 -0
  39. package/src/xpath/union-expr.d.ts +7 -0
  40. package/src/xpath/variable-expr.d.ts +5 -0
  41. package/src/xpath/xpath-grammar-rules.d.ts +93 -0
  42. package/src/xpathdebug.d.ts +2 -0
  43. package/src/xslt.d.ts +1 -0
  44. package/tests/dom.test.d.ts +1 -0
  45. package/tests/escape.test.d.ts +1 -0
  46. package/tests/local-name.test.d.ts +1 -0
  47. package/tests/namespaces.test.d.ts +1 -0
  48. package/tests/root-element.test.d.ts +1 -0
  49. package/tests/simple.test.d.ts +1 -0
  50. package/tests/template-precedence.test.d.ts +1 -0
  51. package/tests/variables-as-parameters.test.d.ts +1 -0
  52. package/tests/xml-to-json.test.d.ts +1 -0
  53. package/tests/xmltoken.test.d.ts +1 -0
  54. package/tests/xpath.test.d.ts +1 -0
  55. package/tests/xslt.test.d.ts +1 -0
  56. package/xslt-processor.js +2 -0
  57. package/xslt-processor.js.map +1 -0
  58. package/.babelrc +0 -9
  59. package/.eslintrc.js +0 -290
  60. package/.travis.yml +0 -3
  61. package/AUTHORS +0 -1
  62. package/ChangeLog +0 -143
  63. package/LICENSE +0 -165
  64. package/README.md +0 -92
  65. package/TODO.md +0 -8
  66. package/dist/xslt-processor.js +0 -1
  67. package/docs/original_license.txt +0 -35
  68. package/rollup.config.js +0 -18
  69. package/src/dom.js +0 -488
  70. package/src/index.js +0 -3
  71. package/src/util.js +0 -326
  72. package/src/xmltoken.js +0 -117
  73. package/src/xpath.js +0 -2745
  74. package/src/xpathdebug.js +0 -209
  75. package/src/xslt.js +0 -604
  76. package/test/xpath.html +0 -11
  77. package/test/xslt.html +0 -53
  78. package/test_src/simplelog.js +0 -70
  79. package/test_src/xpath_script.js +0 -60
  80. package/test_src/xslt_script.js +0 -40
  81. package/tests/dom.test.js +0 -139
  82. package/tests/escape.test.js +0 -96
  83. package/tests/simple.test.js +0 -45
  84. package/tests/xmltoken.test.js +0 -811
  85. package/tests/xpath.test.js +0 -718
  86. package/tests/xslt.test.js +0 -162
package/package.json CHANGED
@@ -1,50 +1,68 @@
1
- {
2
- "name": "xslt-processor",
3
- "version": "0.11.5",
4
- "description": "a JavaScript XSLT Processor",
5
- "main": "dist/xslt-processor.js",
6
- "module": "src/index.js",
7
- "directories": {
8
- "doc": "docs",
9
- "test": "tests"
10
- },
11
- "scripts": {
12
- "test": "jest",
13
- "build": "rollup src/index.js -c -f cjs -o dist/xslt-processor.js",
14
- "build_test": "npm run build_tests && npm run build_xpath_script && npm run build_xslt_script",
15
- "build_xpath_script": "rollup test_src/xpath_script.js -c -f iife -o test_dist/xpath_script.js",
16
- "build_xslt_script": "rollup test_src/xslt_script.js -c -f iife -o test_dist/xslt_script.js",
17
- "prepare": "npm run build",
18
- "prepublishOnly": "npm run lint",
19
- "lint": "eslint src/"
20
- },
21
- "repository": {
22
- "type": "git",
23
- "url": "git+https://github.com/fiduswriter/xslt-processor.git"
24
- },
25
- "keywords": [
26
- "xslt"
27
- ],
28
- "author": "Johannes Wilm",
29
- "license": "LGPL-3.0",
30
- "bugs": {
31
- "url": "https://github.com/fiduswriter/xslt-processor/issues"
32
- },
33
- "homepage": "https://github.com/fiduswriter/xslt-processor#readme",
34
- "devDependencies": {
35
- "@babel/preset-env": "^7.3.1",
36
- "@babel/preset-react": "^7.0.0",
37
- "eslint": "^5.12.1",
38
- "isomorphic-jsx": "^0.3.0",
39
- "jest": "^24.0.0",
40
- "rollup": "^1.1.2",
41
- "rollup-plugin-buble": "^0.19.6",
42
- "rollup-plugin-commonjs": "^9.2.0",
43
- "rollup-plugin-node-resolve": "^4.0.0",
44
- "rollup-plugin-terser": "^4.0.3",
45
- "npm-check-updates": "^2.15.0"
46
- },
47
- "dependencies": {
48
- "he": "^1.2.0"
49
- }
50
- }
1
+ {
2
+ "name": "xslt-processor",
3
+ "version": "0.12.0-0",
4
+ "description": "A JavaScript XSLT Processor",
5
+ "main": "dist/xslt-processor.js",
6
+ "module": "src/index.js",
7
+ "directories": {
8
+ "doc": "docs",
9
+ "test": "tests"
10
+ },
11
+ "scripts": {
12
+ "test": "jest",
13
+ "build": "rollup src/index.ts -c -f cjs -o dist/xslt-processor.js",
14
+ "build_test": "yarn build_tests && yarn build_xpath_script && yarn build_xslt_script",
15
+ "build_xpath_script": "rollup test_src/xpath_script.js -c -f iife -o test_dist/xpath_script.js",
16
+ "build_xslt_script": "rollup test_src/xslt_script.js -c -f iife -o test_dist/xslt_script.js",
17
+ "lint": "eslint src/**/*"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/DesignLiquido/xslt-processor.git"
22
+ },
23
+ "keywords": [
24
+ "xslt"
25
+ ],
26
+ "author": "Johannes Wilm",
27
+ "contributors": [
28
+ {
29
+ "name": "Leonel Sanches da Silva",
30
+ "url": "https://www.linkedin.com/in/leonelsanchesdasilva/"
31
+ }
32
+ ],
33
+ "license": "LGPL-3.0",
34
+ "bugs": {
35
+ "url": "https://github.com/DesignLiquido/xslt-processor/issues"
36
+ },
37
+ "homepage": "https://github.com/DesignLiquido/xslt-processor#readme",
38
+ "devDependencies": {
39
+ "@babel/cli": "^7.22.5",
40
+ "@babel/core": "^7.22.5",
41
+ "@babel/eslint-parser": "^7.22.5",
42
+ "@babel/preset-env": "^7.22.5",
43
+ "@babel/preset-react": "^7.22.5",
44
+ "@babel/preset-typescript": "^7.22.5",
45
+ "@rollup/plugin-typescript": "^11.1.1",
46
+ "@types/he": "^1.2.0",
47
+ "@types/jest": "^29.5.2",
48
+ "@typescript-eslint/eslint-plugin": "^5.60.0",
49
+ "@typescript-eslint/parser": "^5.60.0",
50
+ "babel-jest": "^29.5.0",
51
+ "eslint": "^5.12.1",
52
+ "isomorphic-jsx": "^0.3.0",
53
+ "jest": "^29.5.0",
54
+ "npm-check-updates": "^16.10.13",
55
+ "release-it": "^15.11.0",
56
+ "rollup": "^1.1.2",
57
+ "rollup-plugin-buble": "^0.19.6",
58
+ "rollup-plugin-commonjs": "^9.2.0",
59
+ "rollup-plugin-node-resolve": "^4.0.0",
60
+ "rollup-plugin-terser": "^4.0.3",
61
+ "ts-jest": "^29.1.0",
62
+ "ts-node": "^10.9.1",
63
+ "typescript": "4.9.4"
64
+ },
65
+ "dependencies": {
66
+ "he": "^1.2.0"
67
+ }
68
+ }
@@ -0,0 +1,8 @@
1
+ export declare const DOM_ELEMENT_NODE = 1;
2
+ export declare const DOM_ATTRIBUTE_NODE = 2;
3
+ export declare const DOM_TEXT_NODE = 3;
4
+ export declare const DOM_CDATA_SECTION_NODE = 4;
5
+ export declare const DOM_PROCESSING_INSTRUCTION_NODE = 7;
6
+ export declare const DOM_COMMENT_NODE = 8;
7
+ export declare const DOM_DOCUMENT_NODE = 9;
8
+ export declare const DOM_DOCUMENT_FRAGMENT_NODE = 11;
@@ -0,0 +1,8 @@
1
+ export declare const DOM_ELEMENT_NODE = 1;
2
+ export declare const DOM_ATTRIBUTE_NODE = 2;
3
+ export declare const DOM_TEXT_NODE = 3;
4
+ export declare const DOM_CDATA_SECTION_NODE = 4;
5
+ export declare const DOM_PROCESSING_INSTRUCTION_NODE = 7;
6
+ export declare const DOM_COMMENT_NODE = 8;
7
+ export declare const DOM_DOCUMENT_NODE = 9;
8
+ export declare const DOM_DOCUMENT_FRAGMENT_NODE = 11;
@@ -0,0 +1,3 @@
1
+ import { XDocument } from "./xdocument";
2
+ export declare function domTraverseElements(node: any, opt_pre: any, opt_post: any): boolean;
3
+ export declare function xmlParse(xml: any): XDocument;
@@ -0,0 +1,3 @@
1
+ export * from './functions';
2
+ export * from './xdocument';
3
+ export * from './xnode';
@@ -0,0 +1,46 @@
1
+ export declare function assert(b: any): void;
2
+ export declare function mapExec(array: any, func: any): void;
3
+ export declare function mapExpr(array: any, func: any): any[];
4
+ export declare function reverseInplace(array: any): void;
5
+ export declare function copyArray(dst: any, src: any): void;
6
+ /**
7
+ * This is an optimization for copying attribute lists in IE. IE includes many
8
+ * extraneous properties in its DOM attribute lists, which take require
9
+ * significant extra processing when evaluating attribute steps. With this
10
+ * function, we ignore any such attributes that has an empty string value.
11
+ */
12
+ export declare function copyArrayIgnoringAttributesWithoutValue(dst: any, src: any): void;
13
+ export declare function xmlValue(node: any, disallowBrowserSpecificOptimization?: boolean): any;
14
+ export declare function xmlText(node: any, opt_cdata?: boolean): string;
15
+ export declare function xmlEscapeText(s: any): string;
16
+ /**
17
+ * Wrapper function to access the owner document uniformly for document
18
+ * and other nodes: for the document node, the owner document is the
19
+ * node itself, for all others it's the ownerDocument property.
20
+ *
21
+ * @param {Node} node
22
+ * @return {Document}
23
+ */
24
+ export declare function xmlOwnerDocument(node: any): any;
25
+ export declare function domGetAttribute(node: any, name: any): any;
26
+ export declare function domSetAttribute(node: any, name: any, value: any): any;
27
+ export declare function domAppendChild(node: any, child: any): any;
28
+ export declare function domCreateTextNode(doc: any, text: any): any;
29
+ export declare function domCreateElement(doc: any, name: any): any;
30
+ export declare function domCreateCDATASection(doc: any, data: any): any;
31
+ export declare function domCreateComment(doc: any, text: any): any;
32
+ export declare function domCreateDocumentFragment(doc: any): any;
33
+ export declare function regExpEscape(text: any): any;
34
+ /**
35
+ * Determines whether a predicate expression contains a "positional selector".
36
+ * A positional selector filters nodes from the nodelist input based on their
37
+ * position within that list. When such selectors are encountered, the
38
+ * evaluation of the predicate cannot be depth-first, because the positional
39
+ * selector may be based on the result of evaluating predicates that precede
40
+ * it.
41
+ */
42
+ export declare function predicateExprHasPositionalSelector(expr: any, isRecursiveCall?: any): any;
43
+ export declare function namespaceMapAt(node: any): {
44
+ xmlns: string;
45
+ xml: string;
46
+ };
@@ -0,0 +1,15 @@
1
+ import { XNode } from "./xnode";
2
+ export declare class XDocument extends XNode {
3
+ documentElement: any;
4
+ constructor();
5
+ clear(): void;
6
+ appendChild(node: any): void;
7
+ createElement(name: any): any;
8
+ createElementNS(namespace: any, name: any): any;
9
+ createDocumentFragment(): any;
10
+ createTextNode(value: any): any;
11
+ createAttribute(name: any): any;
12
+ createAttributeNS(namespace: any, name: any): any;
13
+ createComment(data: any): any;
14
+ createCDATASection(data: any): any;
15
+ }
@@ -0,0 +1,12 @@
1
+ export declare const XML_CHAR_REF = "&#[0-9]+;|&#x[0-9a-fA-F]+;";
2
+ export declare const XML10_VERSION_INFO: string;
3
+ export declare const XML10_NAME: string;
4
+ export declare const XML10_ENTITY_REF: string;
5
+ export declare const XML10_ATT_VALUE: string;
6
+ export declare const XML10_ATTRIBUTE: string;
7
+ export declare const XML11_VERSION_INFO: string;
8
+ export declare const XML11_NAME: string;
9
+ export declare const XML11_ENTITY_REF: string;
10
+ export declare const XML11_ATT_VALUE: string;
11
+ export declare const XML11_ATTRIBUTE: string;
12
+ export declare const XML_NC_NAME: string;
@@ -0,0 +1,38 @@
1
+ export declare class XNode {
2
+ attributes: any[];
3
+ childNodes: any[];
4
+ nodeType: any;
5
+ nodeName: string;
6
+ nodeValue: string;
7
+ ownerDocument: any;
8
+ namespaceURI: any;
9
+ prefix: any;
10
+ localName: any;
11
+ firstChild: any;
12
+ lastChild: any;
13
+ nextSibling: any;
14
+ previousSibling: any;
15
+ parentNode: any;
16
+ static _unusedXNodes: any[];
17
+ constructor(type: any, name: any, opt_value: any, opt_owner: any, opt_namespace?: any);
18
+ init(type: any, name: any, value: any, owner: any, namespace: any): void;
19
+ qualifiedNameToParts(name: any): any;
20
+ static recycle(node: any): void;
21
+ static create(type: any, name: any, value: any, owner: any, namespace?: any): any;
22
+ appendChild(node: any): void;
23
+ replaceChild(newNode: any, oldNode: any): void;
24
+ insertBefore(newNode: any, oldNode: any): void;
25
+ removeChild(node: any): void;
26
+ hasAttributes(): boolean;
27
+ setAttribute(name: any, value: any): void;
28
+ setAttributeNS(namespace: any, name: any, value: any): void;
29
+ getAttribute(name: any): any;
30
+ getAttributeNS(namespace: any, localName: any): any;
31
+ hasAttribute(name: any): boolean;
32
+ hasAttributeNS(namespace: any, localName: any): boolean;
33
+ removeAttribute(name: any): void;
34
+ removeAttributeNS(namespace: any, localName: any): void;
35
+ getElementsByTagName(name: any): any[];
36
+ getElementsByTagNameNS(namespace: any, localName: any): any[];
37
+ getElementById(id: any): any;
38
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export { xsltProcess } from './xslt';
2
+ export { xmlParse } from './dom';
3
+ export { ExprContext } from './xpath';
4
+ export { xpathParse } from './xpath/functions';
@@ -0,0 +1,12 @@
1
+ export declare const XML_CHAR_REF = "&#[0-9]+;|&#x[0-9a-fA-F]+;";
2
+ export declare const XML10_VERSION_INFO: string;
3
+ export declare const XML10_NAME: string;
4
+ export declare const XML10_ENTITY_REF: string;
5
+ export declare const XML10_ATT_VALUE: string;
6
+ export declare const XML10_ATTRIBUTE: string;
7
+ export declare const XML11_VERSION_INFO: string;
8
+ export declare const XML11_NAME: string;
9
+ export declare const XML11_ENTITY_REF: string;
10
+ export declare const XML11_ATT_VALUE: string;
11
+ export declare const XML11_ATTRIBUTE: string;
12
+ export declare const XML_NC_NAME: string;
@@ -0,0 +1,9 @@
1
+ import { BooleanValue } from "./boolean-value";
2
+ export declare class BinaryExpr {
3
+ expr1: any;
4
+ expr2: any;
5
+ op: any;
6
+ constructor(expr1: any, op: any, expr2: any);
7
+ evaluate(ctx: any): any;
8
+ compare(ctx: any, cmp: any): BooleanValue;
9
+ }
@@ -0,0 +1,9 @@
1
+ export declare class BooleanValue {
2
+ value: any;
3
+ type: string;
4
+ constructor(value: any);
5
+ stringValue(): string;
6
+ booleanValue(): any;
7
+ numberValue(): 1 | 0;
8
+ nodeSetValue(): void;
9
+ }
@@ -0,0 +1,26 @@
1
+ export declare class ExprContext {
2
+ node: any;
3
+ position: any;
4
+ nodelist: any;
5
+ variables: any;
6
+ parent: any;
7
+ caseInsensitive: any;
8
+ ignoreAttributesWithoutValue: any;
9
+ returnOnFirstMatch: any;
10
+ ignoreNonElementNodesForNTA: any;
11
+ root: any;
12
+ constructor(node: any, opt_position?: any, opt_nodelist?: any, opt_parent?: any, opt_caseInsensitive?: any, opt_ignoreAttributesWithoutValue?: any, opt_returnOnFirstMatch?: any, opt_ignoreNonElementNodesForNTA?: any);
13
+ clone(opt_node: any, opt_position: any, opt_nodelist: any): ExprContext;
14
+ setVariable(name?: any, value?: any): void;
15
+ getVariable(name: any): any;
16
+ setNode(position: any): void;
17
+ contextSize(): any;
18
+ isCaseInsensitive(): any;
19
+ setCaseInsensitive(caseInsensitive: any): any;
20
+ isIgnoreAttributesWithoutValue(): any;
21
+ setIgnoreAttributesWithoutValue(ignore: any): any;
22
+ isReturnOnFirstMatch(): any;
23
+ setReturnOnFirstMatch(returnOnFirstMatch: any): any;
24
+ isIgnoreNonElementNodesForNTA(): any;
25
+ setIgnoreNonElementNodesForNTA(ignoreNonElementNodesForNTA: any): any;
26
+ }
@@ -0,0 +1,56 @@
1
+ import { BinaryExpr } from "./binary-expr";
2
+ import { FunctionCallExpr } from "./function-call-expr";
3
+ import { LiteralExpr } from "./literal-expr";
4
+ import { LocationExpr } from "./location-expr";
5
+ import { NodeTestAny } from "./node-test-any";
6
+ import { NodeTestComment } from "./node-test-comment";
7
+ import { NodeTestElementOrAttribute } from "./node-test-element-or-attribute";
8
+ import { NodeTestName } from "./node-test-name";
9
+ import { NodeTestNC } from "./node-test-nc";
10
+ import { NodeTestPI } from "./node-test-pi";
11
+ import { NodeTestText } from "./node-test-text";
12
+ import { NumberExpr } from "./number-expr";
13
+ import { PathExpr } from "./path-expr";
14
+ import { PredicateExpr } from "./predicate-expr";
15
+ import { StepExpr } from "./step-expr";
16
+ import { TokenExpr } from "./token-expr";
17
+ import { UnaryMinusExpr } from "./unary-minus-expr";
18
+ import { UnionExpr } from "./union-expr";
19
+ import { VariableExpr } from "./variable-expr";
20
+ export declare function makeTokenExpr(m: any): TokenExpr;
21
+ export declare function passExpr(e: any): any;
22
+ export declare function makeLocationExpr1(slash: any, rel: any): any;
23
+ export declare function makeLocationExpr2(dslash: any, rel: any): any;
24
+ export declare function makeLocationExpr3(): LocationExpr;
25
+ export declare function makeLocationExpr4(dslash: any): LocationExpr;
26
+ export declare function makeLocationExpr5(step: any): LocationExpr;
27
+ export declare function makeLocationExpr6(rel: any, slash: any, step: any): any;
28
+ export declare function makeLocationExpr7(rel: any, dslash: any, step: any): any;
29
+ export declare function makeStepExpr1(dot: any): StepExpr;
30
+ export declare function makeStepExpr2(ddot: any): StepExpr;
31
+ export declare function makeStepExpr3(axisname: any, axis: any, nodetest: any): StepExpr;
32
+ export declare function makeStepExpr4(at: any, nodetest: any): StepExpr;
33
+ export declare function makeStepExpr5(nodetest: any): StepExpr;
34
+ export declare function makeStepExpr6(step: any, predicate: any): any;
35
+ export declare function makeAbbrevStep(abbrev: any): StepExpr;
36
+ export declare function makeNodeTestExpr1(): NodeTestElementOrAttribute;
37
+ export declare function makeNodeTestExpr2(ncname: any): NodeTestNC;
38
+ export declare function makeNodeTestExpr3(qname: any): NodeTestName;
39
+ export declare function makeNodeTestExpr4(typeo: any): NodeTestAny | NodeTestComment | NodeTestPI | NodeTestText;
40
+ export declare function makeNodeTestExpr5(typeo: any, target: any): NodeTestPI;
41
+ export declare function makePredicateExpr(pareno: any, expr: any): PredicateExpr;
42
+ export declare function makePrimaryExpr(pareno: any, expr: any): any;
43
+ export declare function makeFunctionCallExpr1(name: any): FunctionCallExpr;
44
+ export declare function makeFunctionCallExpr2(name: any, pareno: any, arg1: any, args: any): FunctionCallExpr;
45
+ export declare function makeArgumentExpr(comma: any, expr: any): any;
46
+ export declare function makeUnionExpr(expr1: any, pipe: any, expr2: any): UnionExpr;
47
+ export declare function makePathExpr1(filter: any, slash: any, rel: any): PathExpr;
48
+ export declare function makePathExpr2(filter: any, dslash: any, rel: any): PathExpr;
49
+ export declare function makeFilterExpr(expr: any, predicates: any): any;
50
+ export declare function makeUnaryMinusExpr(minus: any, expr: any): UnaryMinusExpr;
51
+ export declare function makeBinaryExpr(expr1: any, op: any, expr2: any): BinaryExpr;
52
+ export declare function makeLiteralExpr(token: any): LiteralExpr;
53
+ export declare function makeNumberExpr(token: any): NumberExpr;
54
+ export declare function makeVariableReference(dollar: any, name: any): VariableExpr;
55
+ export declare function makeSimpleExpr(expr: any): NumberExpr | VariableExpr | LocationExpr;
56
+ export declare function makeSimpleExpr2(expr: any): LocationExpr;
@@ -0,0 +1,7 @@
1
+ import { NodeSetValue } from "./node-set-value";
2
+ export declare class FilterExpr {
3
+ expr: any;
4
+ predicate: any;
5
+ constructor(expr: any, predicate: any);
6
+ evaluate(ctx: any): NodeSetValue;
7
+ }
@@ -0,0 +1,47 @@
1
+ import { BooleanValue } from "./boolean-value";
2
+ import { NodeSetValue } from "./node-set-value";
3
+ import { NumberValue } from "./number-value";
4
+ import { StringValue } from "./string-value";
5
+ export declare class FunctionCallExpr {
6
+ name: any;
7
+ args: any[];
8
+ xpathfunctions: {
9
+ last(ctx: any): NumberValue;
10
+ position(ctx: any): NumberValue;
11
+ count(ctx: any): NumberValue;
12
+ 'generate-id'(_ctx: any): never;
13
+ id(ctx: any): NodeSetValue;
14
+ 'xml-to-json'(ctx: any): StringValue;
15
+ 'local-name'(ctx: any): StringValue;
16
+ 'namespace-uri'(ctx: any): StringValue;
17
+ name(ctx: any): StringValue;
18
+ string(ctx: any): StringValue;
19
+ concat(ctx: any): StringValue;
20
+ 'starts-with'(ctx: any): BooleanValue;
21
+ 'ends-with'(ctx: any): BooleanValue;
22
+ contains(ctx: any): BooleanValue;
23
+ 'substring-before'(ctx: any): StringValue;
24
+ 'substring-after'(ctx: any): StringValue;
25
+ substring(ctx: any): StringValue;
26
+ 'string-length'(ctx: any): NumberValue;
27
+ 'normalize-space'(ctx: any): StringValue;
28
+ translate(ctx: any): StringValue;
29
+ matches(ctx: any): BooleanValue;
30
+ boolean(ctx: any): BooleanValue;
31
+ not(ctx: any): BooleanValue;
32
+ true(): BooleanValue;
33
+ false(): BooleanValue;
34
+ lang(ctx: any): BooleanValue;
35
+ number(ctx: any): NumberValue;
36
+ sum(ctx: any): NumberValue;
37
+ floor(ctx: any): NumberValue;
38
+ ceiling(ctx: any): NumberValue;
39
+ round(ctx: any): NumberValue;
40
+ 'ext-join'(ctx: any): StringValue;
41
+ 'ext-if'(ctx: any): any;
42
+ 'ext-cardinal'(ctx: any): NodeSetValue;
43
+ };
44
+ constructor(name: any);
45
+ appendArg(arg: any): void;
46
+ evaluate(ctx: any): any;
47
+ }
@@ -0,0 +1,16 @@
1
+ export declare function xpathCollectDescendants(nodelist: any, node: any, opt_tagName?: any): void;
2
+ export declare function xpathCollectDescendantsReverse(nodelist: any, node: any): void;
3
+ export declare function xpathEval(select: any, context: any): any;
4
+ /**
5
+ * DGF - extract a tag name suitable for getElementsByTagName
6
+ *
7
+ * @param nodetest the node test
8
+ * @param ignoreNonElementNodesForNTA if true, the node list returned when
9
+ * evaluating "node()" will not contain
10
+ * non-element nodes. This can boost
11
+ * performance. This is false by default.
12
+ */
13
+ export declare function xpathExtractTagNameFromNodeTest(nodetest: any, ignoreNonElementNodesForNTA: any): string;
14
+ export declare function xpathParse(expr: any, xpathLog?: (message: string) => void): any;
15
+ export declare function xpathSort(input: any, sort: any): void;
16
+ export declare function xPathStep(nodes: any, steps: any, step: any, input: any, ctx: any): void;
@@ -0,0 +1,25 @@
1
+ export * from './binary-expr';
2
+ export * from './boolean-value';
3
+ export * from './expr-context';
4
+ export * from './filter-expr';
5
+ export * from './function-call-expr';
6
+ export * from './literal-expr';
7
+ export * from './location-expr';
8
+ export * from './node-set-value';
9
+ export * from './node-test-any';
10
+ export * from './node-test-comment';
11
+ export * from './node-test-element-or-attribute';
12
+ export * from './node-test-name';
13
+ export * from './node-test-nc';
14
+ export * from './node-test-pi';
15
+ export * from './node-test-text';
16
+ export * from './number-expr';
17
+ export * from './number-value';
18
+ export * from './path-expr';
19
+ export * from './predicate-expr';
20
+ export * from './step-expr';
21
+ export * from './string-value';
22
+ export * from './token-expr';
23
+ export * from './unary-minus-expr';
24
+ export * from './union-expr';
25
+ export * from './variable-expr';
@@ -0,0 +1,6 @@
1
+ import { StringValue } from "./string-value";
2
+ export declare class LiteralExpr {
3
+ value: any;
4
+ constructor(value: any);
5
+ evaluate(): StringValue;
6
+ }
@@ -0,0 +1,10 @@
1
+ import { NodeSetValue } from "./node-set-value";
2
+ export declare class LocationExpr {
3
+ absolute: boolean;
4
+ steps: any[];
5
+ constructor();
6
+ appendStep(s: any): void;
7
+ prependStep(s: any): void;
8
+ _combineSteps(prevStep: any, nextStep: any): any;
9
+ evaluate(ctx: any): NodeSetValue;
10
+ }
@@ -0,0 +1,9 @@
1
+ export declare class NodeSetValue {
2
+ value: any;
3
+ type: string;
4
+ constructor(value: any);
5
+ stringValue(): any;
6
+ booleanValue(): boolean;
7
+ numberValue(): number;
8
+ nodeSetValue(): any;
9
+ }
@@ -0,0 +1,5 @@
1
+ export declare class NodeTestAny {
2
+ value: any;
3
+ constructor();
4
+ evaluate(): any;
5
+ }
@@ -0,0 +1,4 @@
1
+ import { BooleanValue } from "./boolean-value";
2
+ export declare class NodeTestComment {
3
+ evaluate(ctx: any): BooleanValue;
4
+ }
@@ -0,0 +1,4 @@
1
+ import { BooleanValue } from "./boolean-value";
2
+ export declare class NodeTestElementOrAttribute {
3
+ evaluate(ctx: any): BooleanValue;
4
+ }
@@ -0,0 +1,7 @@
1
+ import { BooleanValue } from "./boolean-value";
2
+ export declare class NodeTestName {
3
+ name: string;
4
+ re: RegExp;
5
+ constructor(name: any);
6
+ evaluate(ctx: any): BooleanValue;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { BooleanValue } from "./boolean-value";
2
+ export declare class NodeTestNC {
3
+ regex: RegExp;
4
+ nsprefix: any;
5
+ constructor(nsprefix: any);
6
+ evaluate(ctx: any): BooleanValue;
7
+ }
@@ -0,0 +1,6 @@
1
+ import { BooleanValue } from "./boolean-value";
2
+ export declare class NodeTestPI {
3
+ target: any;
4
+ constructor(target: any);
5
+ evaluate(ctx: any): BooleanValue;
6
+ }
@@ -0,0 +1,4 @@
1
+ import { BooleanValue } from "./boolean-value";
2
+ export declare class NodeTestText {
3
+ evaluate(ctx: any): BooleanValue;
4
+ }
@@ -0,0 +1,6 @@
1
+ import { NumberValue } from "./number-value";
2
+ export declare class NumberExpr {
3
+ value: any;
4
+ constructor(value: any);
5
+ evaluate(): NumberValue;
6
+ }
@@ -0,0 +1,9 @@
1
+ export declare class NumberValue {
2
+ value: any;
3
+ type: string;
4
+ constructor(value: any);
5
+ stringValue(): string;
6
+ booleanValue(): boolean;
7
+ numberValue(): number;
8
+ nodeSetValue(): void;
9
+ }
@@ -0,0 +1,7 @@
1
+ import { NodeSetValue } from "./node-set-value";
2
+ export declare class PathExpr {
3
+ filter: any;
4
+ rel: any;
5
+ constructor(filter: any, rel: any);
6
+ evaluate(ctx: any): NodeSetValue;
7
+ }
@@ -0,0 +1,6 @@
1
+ import { BooleanValue } from "./boolean-value";
2
+ export declare class PredicateExpr {
3
+ expr: any;
4
+ constructor(expr: any);
5
+ evaluate(ctx: any): BooleanValue;
6
+ }
@@ -0,0 +1,10 @@
1
+ import { NodeSetValue } from "./node-set-value";
2
+ export declare class StepExpr {
3
+ axis: any;
4
+ nodetest: any;
5
+ predicate: any;
6
+ hasPositionalPredicate: any;
7
+ constructor(axis: any, nodetest: any, opt_predicate?: any);
8
+ appendPredicate(p: any): void;
9
+ evaluate(ctx: any): NodeSetValue;
10
+ }
@@ -0,0 +1,9 @@
1
+ export declare class StringValue {
2
+ value: any;
3
+ type: string;
4
+ constructor(value: any);
5
+ stringValue(): any;
6
+ booleanValue(): boolean;
7
+ numberValue(): number;
8
+ nodeSetValue(): void;
9
+ }
@@ -0,0 +1,6 @@
1
+ import { StringValue } from "./string-value";
2
+ export declare class TokenExpr {
3
+ value: any;
4
+ constructor(m: any);
5
+ evaluate(): StringValue;
6
+ }