Skip to content

Addressing bug reported at https://github.com/DesignLiquido/xslt-processor/issues/183.#185

Merged
leonelsanchesdasilva merged 2 commits intomainfrom
issue-183
Mar 19, 2026
Merged

Addressing bug reported at https://github.com/DesignLiquido/xslt-processor/issues/183.#185
leonelsanchesdasilva merged 2 commits intomainfrom
issue-183

Conversation

@leonelsanchesdasilva
Copy link
Copy Markdown
Collaborator

Resolves #183.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 19, 2026

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
79.04% (+0.64% 🔼)
3345/4232
🟡 Branches
68.97% (+0.57% 🔼)
1965/2849
🟡 Functions
72.16% (+0.26% 🔼)
394/546
🟡 Lines
79.18% (+0.69% 🔼)
3203/4045

Test suite run success

650 tests passing in 64 suites.

Report generated by 🧪jest coverage report action from fe4fe14

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds regression coverage and adjusts default template application so templates can match nested elements (issue #183) when no explicit root template matches.

Changes:

  • Add tests covering match="//message" for nested and non-nested XML structures.
  • Simplify the “no template matched root context” branch to use applyBuiltInTemplate(...).
  • Update the src/xpath/lib submodule pointer.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/xslt/issue-183.test.ts Adds regression tests for nested template matching scenarios from issue #183.
src/xslt/xslt.ts Replaces manual child/grandchild traversal with a call to the built-in template application helper.
src/xpath/lib Updates the XPath submodule revision used by the processor.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/xslt/issue-183.test.ts
Comment thread tests/xslt/issue-183.test.ts Outdated
Comment thread src/xslt/xslt.ts
@leonelsanchesdasilva leonelsanchesdasilva merged commit ec0bd46 into main Mar 19, 2026
3 checks passed
@leonelsanchesdasilva leonelsanchesdasilva deleted the issue-183 branch March 19, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Template match does not obey xpath

2 participants