Project

Profile

Help

Bug #5289

closed

xsl:message adds an unnecessary new line

Added by Johan Gheys almost 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Diagnostics
Sprint/Milestone:
-
Start date:
2022-02-05
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
11, trunk
Fix Committed on Branch:
11, trunk
Fixed in Maintenance Release:
Platforms:

Description

With version 10.6, the output of xsl:message looks like this:

whereas with version 11.1 unnecessary new lines are added:


Files

message-10.6-ok.png (13.5 KB) message-10.6-ok.png Johan Gheys, 2022-02-05 19:18
message-11.1-nok.png (15 KB) message-11.1-nok.png Johan Gheys, 2022-02-05 19:21
Actions #1

Updated by Martin Honnen almost 3 years ago

So, with Saxon 11 you get a new, blank line after each output of a single xsl:message instruction? Or new lines inserted between the several lines of a single xsl:message?

Actions #2

Updated by Michael Kay almost 3 years ago

The StandardMessageHandler writes by default to a Writer that sends messages to the configured Logger, and the default Logger is adding a newline to each message. But the StandardMessageHandler is adding a newline as well, because it doesn't know that the Logger is adding one. Solution not obvious.

Actions #3

Updated by Michael Kay almost 3 years ago

Simplest solution is for the standard message handler to refrain from adding the extra newline; if output is to a Logger then you'll get the newline, if it is to a user-supplied Writer destination, then the writer can decide whether to add one or not.

Actions #4

Updated by Michael Kay almost 3 years ago

  • Category set to Diagnostics
  • Status changed from New to Resolved
  • Assignee set to Michael Kay
  • Priority changed from Low to Normal
  • Applies to branch 11, trunk added
  • Fix Committed on Branch 11, trunk added
Actions #5

Updated by Debbie Lockett almost 3 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 11.2 added

Bug fix applied in the Saxon 11.2 maintenance release.

Please register to edit this issue

Also available in: Atom PDF