@tradik/xslt-processor 1.0.2 → 1.0.3

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": "@tradik/xslt-processor",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "JavaScript implementation of XSLTProcessor for browser environments and CLI",
5
5
  "type": "module",
6
6
  "main": "dist/xslt-processor.cjs",
@@ -47,7 +47,7 @@
47
47
  "javascript"
48
48
  ],
49
49
  "author": "tradik",
50
- "license": "MIT",
50
+ "license": "BSD-3-Clause",
51
51
  "repository": {
52
52
  "type": "git",
53
53
  "url": "git+https://github.com/spagu/XSLT-Processor.git"
@@ -57,7 +57,7 @@
57
57
  },
58
58
  "homepage": "https://github.com/spagu/XSLT-Processor#readme",
59
59
  "engines": {
60
- "node": ">=25.0.0"
60
+ "node": ">=18.0.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "eslint": "^9.0.0",
@@ -618,13 +618,10 @@ export class XsltEngine {
618
618
  // Create result document fragment
619
619
  const fragment = doc.createDocumentFragment();
620
620
 
621
- // Apply templates to root
622
- this.applyTemplates(
623
- [sourceNode.documentElement || sourceNode],
624
- null,
625
- context,
626
- fragment,
627
- );
621
+ // Apply templates to document node (not documentElement)
622
+ // This ensures "/" template has document as context, so paths like
623
+ // "RootElement/child" work correctly
624
+ this.applyTemplates([sourceNode], null, context, fragment);
628
625
 
629
626
  return fragment;
630
627
  }