Project

Profile

Help

Support #3903

closed

Line-length feature breaks preformatted texts in HTML output

Added by Matthias Schäfer about 6 years ago. Updated almost 3 years ago.

Status:
Won't fix
Priority:
Normal
Assignee:
Category:
Serialization
Sprint/Milestone:
-
Start date:
2018-09-12
Due date:
% Done:

0%

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

Description

I have been working on an XSL transformation for XHTML output which includes some preformatted texts. I have realized just a few days ago that Saxon has a built-in feature to automatically break lines in that output mode. Obviously this feature is incompatible with preformatted text as it inserts arbitrary lines breaks. After doing some research several questions about the feature came to my mind.

  1. Is Saxonica aware of the fact that enabling a feature by default that alters the transformed data silently is probably a bad idea? One would expect that such a feature must explicitly be turned on. One would also expect that Saxon gives you a conspicuous warning once it messes with your data in that way.

  2. Is it correct that I can get rid of that harmful feature only by buying and paying for the Professional or Enterprise Edition?

  3. Which is the proper way to disable the feature on a element-by-element basis? The person who had the idea to enable the feature by default sure will also have had an idea in mind what to do if I realized that I actually want to use the automatic line breaks wherever possible, but not on spots where it would break my preformatted texts, e.g. in a HTML pre element or when using the CSS white-space pre formatting.

Regards


Files

1.png (5.43 KB) 1.png Matthias Schäfer, 2018-09-13 10:06
suppress-div-indentation-xhtml-method1.xsl (390 Bytes) suppress-div-indentation-xhtml-method1.xsl Martin Honnen, 2018-09-13 14:46
suppress-div-indentation-xml-method1.xsl (388 Bytes) suppress-div-indentation-xml-method1.xsl Martin Honnen, 2018-09-13 14:46
suppress-indentation-xml-method2.xq (277 Bytes) suppress-indentation-xml-method2.xq Martin Honnen, 2018-09-13 14:46
suppress-indentation-xhtml-method2.xq (279 Bytes) suppress-indentation-xhtml-method2.xq Martin Honnen, 2018-09-13 14:46
unindented-xhtml-doc1.xml (198 Bytes) unindented-xhtml-doc1.xml sample XHTML input doc Martin Honnen, 2018-09-13 14:46
unindented-xhtml-frag1.xml (142 Bytes) unindented-xhtml-frag1.xml sample XHTML fragment Martin Honnen, 2018-09-13 14:46
Data.xml (540 Bytes) Data.xml Matthias Schäfer, 2018-09-24 10:21
Transform.xsl (698 Bytes) Transform.xsl Matthias Schäfer, 2018-09-24 10:21

Please register to edit this issue

Also available in: Atom PDF