Skip to content

MCR-3885 handle xsl:message when using Saxon - #3188

Open
Mewel wants to merge 1 commit into
mainfrom
issues/MCR-3885-saxon-xsl-message
Open

Mewel wants to merge 1 commit into
mainfrom
issues/MCR-3885-saxon-xsl-message

Conversation

@Mewel

@Mewel Mewel commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Link to jira.

  • MCRErrorListener.setTo(Transformer): sets the error listener and, for Saxon, a message handler that logs xsl:message via Log4j instead of System.err
  • MCRErrorListener: use the text of a terminating xsl:message (Saxon TerminationException) in getMyMessageAndLocation() and fatalError()
  • MCRXSLTransformer: include the text of a terminating xsl:message in the thrown exception
  • use MCRErrorListener.setTo() in MCRXSLTransformer, MCRObjectCommands (xslt command) and MCRCommandUtils (CLI export transformers)
  • mycore-base: change scope of Saxon-HE from runtime to compile
  • add tests

Pull Request Checklist (Author)

Please go through the following checklist before assigning the PR for review:

Ticket & Documentation

  • The issue in the ticket is clearly described and the solution is documented.
  • Design decisions (if any) are explained.
  • The ticket references the correct source and target branches.
  • The fixed-version is correctly set in the ticket and matches the PR's target branch (main).

Feature & Improvement Specific Checks

  • Instructions on how to test or use the feature are included or linked (e.g. to documentation).
  • For UI changes: before & after screenshots are attached.
  • New features or migrations are documented.
  • Does this change affect existing applications, data, or configurations?
    • Yes: Is a migration required? If yes, describe it.
    • Breaking change is marked in the commit message.

Bugfix-Specific Checks

  • Affected version is listed in the ticket.
  • Minimal code changes were made (no refactoring).
  • This PR truly fixes only the reported bug.
  • No breaking changes are introduced.
  • A relevant test was added (if feasible).

Testing

  • I have tested the changes locally.
  • The feature behaves as described in the ticket.
  • Were existing tests modified?
    • Yes: explain the changes for reviewers.

MCR Conventions & Metadata

  • MCR naming conventions are followed
  • If the public API has changed:
    • Old API is deprecated or a migration is documented.
    • If not, no action needed.
  • Java license headers are added where necessary.
  • Javadoc is written for non-self-explanatory classes/methods (Clean Code).
  • All configuration options are documented in Javadoc and mycore.properties.
  • No default properties are hardcoded — all set via mycore.properties.

Multi-Repo Considerations

  • Is an equivalent PR in MIR required?
    • If yes, is it already created?

- MCRErrorListener.setTo(Transformer): sets the error listener and, for
  Saxon, a message handler that logs xsl:message via Log4j instead of
  System.err
- MCRErrorListener: use the text of a terminating xsl:message (Saxon
  TerminationException) in getMyMessageAndLocation() and fatalError()
- MCRXSLTransformer: include the text of a terminating xsl:message in the
  thrown exception
- use MCRErrorListener.setTo() in MCRXSLTransformer, MCRObjectCommands
  (xslt command) and MCRCommandUtils (CLI export transformers)
- mycore-base: change scope of Saxon-HE from runtime to compile
- add tests
@Mewel
Mewel requested a review from yagee-de October 22, 2026 12:36

@yagee-de yagee-de left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Saxon may not be a compile dependency. No API may be called due to legal reasons (license issues)

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.

2 participants