Bug #6063
closedIncorrect attribute indentation
100%
Description
The number of spaces output before an indented attribute is one too many. We are seeing, for example
<isee:ISEE-Event xmlns="http://www.example.com/schemas/ex/5.00"
__________________xmlns:isee="http://www.w3.org/2001/XMLSchema-instance/isee"
__________________xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
__________________schemaVersion="5.00">
with 18 spaces rather than 17 on lines 2, 3, and 4.
Problem was raised on StackOverflow, see https://stackoverflow.com/questions/76405207/saxon-he-9-x-11-x-12-x-indentation-differences-depending-on-operating-system/76408103#76408103
and subsequent discussion.
Updated by Michael Kay over 1 year ago
- Status changed from New to Resolved
- Fix Committed on Branch 11, 12, trunk added
Updated by Michael Kay over 1 year ago
Changed XMLIndenter.startElement() from
if (len > getLineLength()) {
int indent = (level - 1) * getIndentation() + 3;
emitter.setIndentForNextAttribute(indent);
}
to
if (len > getLineLength()) {
int indent = (level - 1) * getIndentation() + 2;
emitter.setIndentForNextAttribute(indent);
}
Updated by Michael Kay over 1 year ago
Note, I have not investigated the suggestion that this varies by operating system. It seems too implausible; it seems highly likely that the user was running different Saxon versions on the different platforms.
Updated by O'Neil Delpratt over 1 year ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 12.3 added
Bug fix applied in the Saxon 12.3 maintenance release.
Updated by O'Neil Delpratt over 1 year ago
- Status changed from Closed to Resolved
Leaving this bug issue as resolved until resolved against Saxon 11.
Updated by Debbie Lockett over 1 year ago
- Status changed from Resolved to Closed
- Fixed in Maintenance Release 11.6 added
Bug fix applied in the Saxon 11.6 maintenance release.
Please register to edit this issue