xslt-processor 2.0.0 → 2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xslt-processor",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "A JavaScript XSLT Processor",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -1,6 +1,7 @@
1
1
  import { XNode } from '../dom';
2
2
  import { XsltDecimalFormatSettings } from '../xslt/xslt-decimal-format-settings';
3
- /** XPath expression evaluation context. An XPath context consists of a
3
+ /**
4
+ * XPath expression evaluation context. An XPath context consists of a
4
5
  * DOM node, a list of DOM nodes that contains this node, a number
5
6
  * that represents the position of the single node in the list, and a
6
7
  * current set of variable bindings. (See XPath spec.)
@@ -39,6 +40,7 @@ export declare class ExprContext {
39
40
  outputPosition: number;
40
41
  outputNodeList: XNode[];
41
42
  outputDepth: number;
43
+ xsltVersion: '1.0' | '2.0' | '3.0';
42
44
  variables: {
43
45
  [name: string]: any;
44
46
  };
@@ -75,7 +77,7 @@ export declare class ExprContext {
75
77
  * @param opt_returnOnFirstMatch TODO
76
78
  * @param opt_ignoreNonElementNodesForNTA TODO
77
79
  */
78
- constructor(nodeList: XNode[], outputNodeList: XNode[], opt_position?: number, opt_outputPosition?: number, opt_outputDepth?: number, opt_decimalFormatSettings?: XsltDecimalFormatSettings, opt_variables?: {
80
+ constructor(nodeList: XNode[], outputNodeList: XNode[], xsltVersion?: '1.0' | '2.0' | '3.0', opt_position?: number, opt_outputPosition?: number, opt_outputDepth?: number, opt_decimalFormatSettings?: XsltDecimalFormatSettings, opt_variables?: {
79
81
  [name: string]: any;
80
82
  }, opt_knownNamespaces?: {
81
83
  [alias: string]: string;
@@ -0,0 +1,4 @@
1
+ import { ExprContext } from "../expr-context";
2
+ import { StringValue } from "../values";
3
+ export declare function upperCase(context: ExprContext): StringValue;
4
+ export declare function lowerCase(context: ExprContext): StringValue;
@@ -3,7 +3,7 @@ export declare class StringValue implements NodeValue {
3
3
  value: any;
4
4
  type: string;
5
5
  constructor(value: any);
6
- stringValue(): any;
6
+ stringValue(): string;
7
7
  booleanValue(): boolean;
8
8
  numberValue(): number;
9
9
  nodeSetValue(): void;
@@ -86,8 +86,8 @@ export declare class Xslt {
86
86
  * sort order specified by xsl:sort child nodes of the current
87
87
  * template node. This happens before the operation specified by the
88
88
  * current template node is executed.
89
- * @param context TODO
90
- * @param template TODO
89
+ * @param context The expression context.
90
+ * @param template The template node.
91
91
  * @todo case-order is not implemented.
92
92
  */
93
93
  protected xsltSort(context: ExprContext, template: XNode): void;