xslt-processor 3.4.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -0
- package/index.d.mts +861 -0
- package/index.d.ts +861 -4
- package/index.js +4570 -12
- package/index.js.map +1 -1
- package/index.mjs +4534 -0
- package/index.mjs.map +1 -0
- package/package.json +23 -18
- 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 -275
- 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 -275
- package/xslt/xslt.js +0 -1329
- package/xslt/xslt.js.map +0 -1
package/umd/xslt/xslt.d.ts
DELETED
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
import { XDocument, XNode, XmlParser } from '../dom';
|
|
2
|
-
import { ExprContext, XPath } from '../xpath';
|
|
3
|
-
import { XsltOptions } from './xslt-options';
|
|
4
|
-
import { XsltDecimalFormatSettings } from './xslt-decimal-format-settings';
|
|
5
|
-
import { MatchResolver } from '../xpath/match-resolver';
|
|
6
|
-
/**
|
|
7
|
-
* The main class for XSL-T processing. The implementation is NOT
|
|
8
|
-
* complete; some xsl element are left out.
|
|
9
|
-
*
|
|
10
|
-
* References:
|
|
11
|
-
*
|
|
12
|
-
* [XSLT] XSL-T Specification
|
|
13
|
-
* <http://www.w3.org/TR/1999/REC-xslt-19991116>.
|
|
14
|
-
*
|
|
15
|
-
* [ECMA] ECMAScript Language Specification
|
|
16
|
-
* <http://www.ecma-international.org/publications/standards/Ecma-262.htm>.
|
|
17
|
-
*
|
|
18
|
-
* The XSL processor API has one entry point, the function
|
|
19
|
-
* `xsltProcess()`. It receives as arguments the starting point in the
|
|
20
|
-
* input document as an XPath expression context, the DOM root node of
|
|
21
|
-
* the XSL-T stylesheet, and a DOM node that receives the output.
|
|
22
|
-
*
|
|
23
|
-
* NOTE: Actually, XSL-T processing according to the specification is
|
|
24
|
-
* defined as operation on text documents, not as operation on DOM
|
|
25
|
-
* trees. So, strictly speaking, this implementation is not an XSL-T
|
|
26
|
-
* processor, but the processing engine that needs to be complemented
|
|
27
|
-
* by an XML parser and serializer in order to be complete. Those two
|
|
28
|
-
* are found in the `dom` folder.
|
|
29
|
-
*/
|
|
30
|
-
export declare class Xslt {
|
|
31
|
-
xPath: XPath;
|
|
32
|
-
xmlParser: XmlParser;
|
|
33
|
-
matchResolver: MatchResolver;
|
|
34
|
-
options: XsltOptions;
|
|
35
|
-
decimalFormatSettings: XsltDecimalFormatSettings;
|
|
36
|
-
outputDocument: XDocument;
|
|
37
|
-
outputMethod: 'xml' | 'html' | 'text' | 'name' | 'xhtml';
|
|
38
|
-
outputOmitXmlDeclaration: string;
|
|
39
|
-
version: string;
|
|
40
|
-
firstTemplateRan: boolean;
|
|
41
|
-
constructor(options?: Partial<XsltOptions>);
|
|
42
|
-
/**
|
|
43
|
-
* The exported entry point of the XSL-T processor.
|
|
44
|
-
* @param xmlDoc The input document root, as DOM node.
|
|
45
|
-
* @param stylesheet The stylesheet document root, as DOM node.
|
|
46
|
-
* @returns the processed document, as XML text in a string.
|
|
47
|
-
*/
|
|
48
|
-
xsltProcess(xmlDoc: XDocument, stylesheet: XDocument): Promise<string>;
|
|
49
|
-
/**
|
|
50
|
-
* The main entry point of the XSL-T processor, as explained on the top of the file.
|
|
51
|
-
* @param context The input document root, as XPath `ExprContext`.
|
|
52
|
-
* @param template The stylesheet document root, as DOM node.
|
|
53
|
-
* @param output If set, the output where the transformation should occur.
|
|
54
|
-
*/
|
|
55
|
-
protected xsltProcessContext(context: ExprContext, template: XNode, output?: XNode): Promise<void>;
|
|
56
|
-
/**
|
|
57
|
-
* Implements `xsl:apply-templates`.
|
|
58
|
-
* @param context The Expression Context.
|
|
59
|
-
* @param template The template.
|
|
60
|
-
* @param output The output. Only used if there's no corresponding output node already defined.
|
|
61
|
-
* @protected
|
|
62
|
-
*/
|
|
63
|
-
protected xsltApplyTemplates(context: ExprContext, template: XNode, output?: XNode): Promise<void>;
|
|
64
|
-
/**
|
|
65
|
-
* Implements `xsl:attribute`.
|
|
66
|
-
* @param context The Expression Context.
|
|
67
|
-
* @param template The template.
|
|
68
|
-
* @param output The output. Only used if there's no corresponding output node already defined.
|
|
69
|
-
* @protected
|
|
70
|
-
*/
|
|
71
|
-
protected xsltAttribute(context: ExprContext, template: XNode, output?: XNode): Promise<void>;
|
|
72
|
-
/**
|
|
73
|
-
* Implements `xsl:call-template`.
|
|
74
|
-
* @param context The Expression Context.
|
|
75
|
-
* @param template The template.
|
|
76
|
-
* @param output The output, used when a fragment is passed by a previous step.
|
|
77
|
-
*/
|
|
78
|
-
protected xsltCallTemplate(context: ExprContext, template: XNode, output?: XNode): Promise<void>;
|
|
79
|
-
/**
|
|
80
|
-
* Implements `xsl:choose`, its child nodes `xsl:when`, and
|
|
81
|
-
* `xsl:otherwise`.
|
|
82
|
-
* @param context The Expression Context.
|
|
83
|
-
* @param template The template.
|
|
84
|
-
* @param output The output. Only used if there's no corresponding output node already defined.
|
|
85
|
-
*/
|
|
86
|
-
protected xsltChoose(context: ExprContext, template: XNode, output?: XNode): Promise<void>;
|
|
87
|
-
/**
|
|
88
|
-
* Implements `xsl:copy` for all node types.
|
|
89
|
-
* @param {XNode} destination the node being copied to, part of output document.
|
|
90
|
-
* @param {XNode} source the node being copied, part in input document.
|
|
91
|
-
* @returns {XNode|null} If an element node was created, the element node. Otherwise, null.
|
|
92
|
-
*/
|
|
93
|
-
protected xsltCopy(destination: XNode, source: XNode): XNode;
|
|
94
|
-
/**
|
|
95
|
-
* Implements `xsl:comment`.
|
|
96
|
-
* @param context The Expression Context.
|
|
97
|
-
* @param template The template.
|
|
98
|
-
* @param output The output. Only used if there's no corresponding output node already defined.
|
|
99
|
-
*/
|
|
100
|
-
protected xsltComment(context: ExprContext, template: XNode, output?: XNode): Promise<void>;
|
|
101
|
-
/**
|
|
102
|
-
* Implements `xsl:copy-of` for node-set values of the select
|
|
103
|
-
* expression. Recurses down the source node tree, which is part of
|
|
104
|
-
* the input document.
|
|
105
|
-
* @param {XNode} destination the node being copied to, part of output document.
|
|
106
|
-
* @param {XNode} source the node being copied, part in input document.
|
|
107
|
-
*/
|
|
108
|
-
protected xsltCopyOf(destination: XNode, source: XNode): void;
|
|
109
|
-
/**
|
|
110
|
-
* Implements `xsl:decimal-format`, registering the settings in this instance
|
|
111
|
-
* and the current context.
|
|
112
|
-
* @param context The Expression Context.
|
|
113
|
-
* @param template The template.
|
|
114
|
-
*/
|
|
115
|
-
protected xsltDecimalFormat(context: ExprContext, template: XNode): void;
|
|
116
|
-
/**
|
|
117
|
-
* Implements `xsl:element`.
|
|
118
|
-
* @param context The Expression Context.
|
|
119
|
-
* @param template The template.
|
|
120
|
-
*/
|
|
121
|
-
protected xsltElement(context: ExprContext, template: XNode): Promise<void>;
|
|
122
|
-
/**
|
|
123
|
-
* Implements `xsl:for-each`.
|
|
124
|
-
* @param context The Expression Context.
|
|
125
|
-
* @param template The template.
|
|
126
|
-
* @param output The output.
|
|
127
|
-
*/
|
|
128
|
-
protected xsltForEach(context: ExprContext, template: XNode, output?: XNode): Promise<void>;
|
|
129
|
-
/**
|
|
130
|
-
* Implements `xsl:if`.
|
|
131
|
-
* @param context The Expression Context.
|
|
132
|
-
* @param template The template.
|
|
133
|
-
* @param output The output.
|
|
134
|
-
*/
|
|
135
|
-
protected xsltIf(context: ExprContext, template: XNode, output?: XNode): Promise<void>;
|
|
136
|
-
/**
|
|
137
|
-
* Implements `<xsl:import>`. For now the code is nearly identical to `<xsl:include>`, but there's
|
|
138
|
-
* no precedence evaluation implemented yet.
|
|
139
|
-
* @param context The Expression Context.
|
|
140
|
-
* @param template The template.
|
|
141
|
-
* @param output The output.
|
|
142
|
-
*/
|
|
143
|
-
protected xsltImport(context: ExprContext, template: XNode, output?: XNode): Promise<void>;
|
|
144
|
-
/**
|
|
145
|
-
* Implements `xsl:include`.
|
|
146
|
-
* @param context The Expression Context.
|
|
147
|
-
* @param template The template.
|
|
148
|
-
* @param output The output.
|
|
149
|
-
*/
|
|
150
|
-
protected xsltInclude(context: ExprContext, template: XNode, output?: XNode): Promise<void>;
|
|
151
|
-
/**
|
|
152
|
-
* Implements `xsl:key`.
|
|
153
|
-
* @param context The Expression Context.
|
|
154
|
-
* @param template The template.
|
|
155
|
-
*/
|
|
156
|
-
protected xsltKey(context: ExprContext, template: XNode): void;
|
|
157
|
-
/**
|
|
158
|
-
* Orders the current node list in the input context according to the
|
|
159
|
-
* sort order specified by xsl:sort child nodes of the current
|
|
160
|
-
* template node. This happens before the operation specified by the
|
|
161
|
-
* current template node is executed.
|
|
162
|
-
* @param context The expression context.
|
|
163
|
-
* @param template The template node.
|
|
164
|
-
* @todo case-order is not implemented.
|
|
165
|
-
*/
|
|
166
|
-
protected xsltSort(context: ExprContext, template: XNode): void;
|
|
167
|
-
/**
|
|
168
|
-
* Implements `xsl:template`.
|
|
169
|
-
* @param context The Expression Context.
|
|
170
|
-
* @param template The `<xsl:template>` node.
|
|
171
|
-
* @param output The output. In general, a fragment that will be used by
|
|
172
|
-
* the caller.
|
|
173
|
-
*/
|
|
174
|
-
protected xsltTemplate(context: ExprContext, template: XNode, output?: XNode): Promise<void>;
|
|
175
|
-
protected xsltText(context: ExprContext, template: XNode, output?: XNode): void;
|
|
176
|
-
/**
|
|
177
|
-
* Implements `<xsl:stylesheet>` and `<xsl:transform>`, and its corresponding
|
|
178
|
-
* validations.
|
|
179
|
-
* @param context The Expression Context.
|
|
180
|
-
* @param template The `<xsl:stylesheet>` or `<xsl:transform>` node.
|
|
181
|
-
* @param output The output. In general, a fragment that will be used by
|
|
182
|
-
* the caller.
|
|
183
|
-
*/
|
|
184
|
-
protected xsltTransformOrStylesheet(context: ExprContext, template: XNode, output?: XNode): Promise<void>;
|
|
185
|
-
protected xsltValueOf(context: ExprContext, template: XNode, output?: XNode): void;
|
|
186
|
-
/**
|
|
187
|
-
* Evaluates a variable or parameter and set it in the current input
|
|
188
|
-
* context. Implements `xsl:variable`, `xsl:param`, and `xsl:with-param`.
|
|
189
|
-
*
|
|
190
|
-
* @param context The expression context.
|
|
191
|
-
* @param template The template node.
|
|
192
|
-
* @param override flag that defines if the value computed here
|
|
193
|
-
* overrides the one already in the input context if that is the
|
|
194
|
-
* case. I.e. decides if this is a default value or a local
|
|
195
|
-
* value. `xsl:variable` and `xsl:with-param` override; `xsl:param` doesn't.
|
|
196
|
-
*/
|
|
197
|
-
protected xsltVariable(context: ExprContext, template: XNode, override: boolean): Promise<void>;
|
|
198
|
-
/**
|
|
199
|
-
* Traverses the template node tree. Calls the main processing
|
|
200
|
-
* function with the current input context for every child node of the
|
|
201
|
-
* current template node.
|
|
202
|
-
* @param context Normally the Expression Context.
|
|
203
|
-
* @param template The XSL-T definition.
|
|
204
|
-
* @param output If set, the output where the transformation should occur.
|
|
205
|
-
*/
|
|
206
|
-
protected xsltChildNodes(context: ExprContext, template: XNode, output?: XNode): Promise<void>;
|
|
207
|
-
/**
|
|
208
|
-
* This logic is used in two different places:
|
|
209
|
-
* - `xsltPassThrough`, if the template asks this library to write a text node;
|
|
210
|
-
* - `xsltProcessContext`, `apply-templates` operation, when the current node is text.
|
|
211
|
-
*
|
|
212
|
-
* Text nodes always require a parent, and they never have children.
|
|
213
|
-
* @param context The Expression Context.
|
|
214
|
-
* @param template The template, that contains the node value to be written.
|
|
215
|
-
* @param output The output.
|
|
216
|
-
*/
|
|
217
|
-
private commonLogicTextNode;
|
|
218
|
-
/**
|
|
219
|
-
* Passes template text to the output. The current template node does
|
|
220
|
-
* not specify an XSL-T operation and therefore is appended to the
|
|
221
|
-
* output with all its attributes. Then continues traversing the
|
|
222
|
-
* template node tree.
|
|
223
|
-
* @param context The Expression Context.
|
|
224
|
-
* @param template The XSLT stylesheet or transformation.
|
|
225
|
-
* @param output The output.
|
|
226
|
-
*/
|
|
227
|
-
protected xsltPassThrough(context: ExprContext, template: XNode, output: XNode): Promise<void>;
|
|
228
|
-
/**
|
|
229
|
-
* Determines if a text node in the XSLT template document is to be
|
|
230
|
-
* stripped according to XSLT whitespace stripping rules.
|
|
231
|
-
* @see [XSLT], section 3.4.
|
|
232
|
-
* @param template The XSLT template.
|
|
233
|
-
* @returns TODO
|
|
234
|
-
* @todo Whitespace stripping on the input document is
|
|
235
|
-
* currently not implemented.
|
|
236
|
-
*/
|
|
237
|
-
protected xsltPassText(template: XNode): boolean;
|
|
238
|
-
protected findAttributeInContext(attributeName: string, context: ExprContext): XNode;
|
|
239
|
-
/**
|
|
240
|
-
* Evaluates an XSL-T attribute value template. Attribute value
|
|
241
|
-
* templates are attributes on XSL-T elements that contain XPath
|
|
242
|
-
* expressions in braces {}. The XSL-T expressions are evaluated in
|
|
243
|
-
* the current input context.
|
|
244
|
-
* @param value TODO
|
|
245
|
-
* @param context TODO
|
|
246
|
-
* @returns TODO
|
|
247
|
-
*/
|
|
248
|
-
protected xsltAttributeValue(value: any, context: ExprContext): any;
|
|
249
|
-
/**
|
|
250
|
-
* Evaluates an XPath expression in the current input context as a
|
|
251
|
-
* match.
|
|
252
|
-
* @see [XSLT] section 5.2, paragraph 1
|
|
253
|
-
* @param match TODO
|
|
254
|
-
* @param context The Expression Context.
|
|
255
|
-
* @param axis The XPath axis. Used when the match does not start with the parent.
|
|
256
|
-
* @returns {XNode[]} A list of the found nodes.
|
|
257
|
-
*/
|
|
258
|
-
protected xsltMatch(match: string, context: ExprContext, axis?: string): XNode[];
|
|
259
|
-
/**
|
|
260
|
-
* Sets parameters defined by xsl:with-param child nodes of the
|
|
261
|
-
* current template node, in the current input context. This happens
|
|
262
|
-
* before the operation specified by the current template node is
|
|
263
|
-
* executed.
|
|
264
|
-
* @param context The Expression Context.
|
|
265
|
-
* @param template The template node.
|
|
266
|
-
*/
|
|
267
|
-
protected xsltWithParam(context: ExprContext, template: XNode): Promise<void>;
|
|
268
|
-
/**
|
|
269
|
-
* Test if the given element is an XSLT element, optionally the one with the given name.
|
|
270
|
-
* @param {XNode} element The element.
|
|
271
|
-
* @param {string} opt_wantedName The name for comparison.
|
|
272
|
-
* @returns True, if element is an XSL node. False otherwise.
|
|
273
|
-
*/
|
|
274
|
-
protected isXsltElement(element: XNode, opt_wantedName?: string): boolean;
|
|
275
|
-
}
|