[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Source code formatting

Subject: Source code formatting
From: "Willem Van Lishout willemvanlishout@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 28 Jul 2020 21:17:49 -0000
 Source code formatting
Hi list,

Like many of you, I assume, I use a version control system when working on
XSLT projects. I'm working together with multiple people, and we run the
code through an XML formatter before checking it in to avoid formatting
differences showing up in the diffs.

The problem is that, due to attribute value normalization, carriage returns
are removed from attribute nodes during XML parsing. When using long XPath
expressions (and this has become very common in XSLT 3, especially with
higher order functions), which are split in multiple lines, this results in
huge single line outputs which are impossible to read.

It seems any sort of XML processing will irreversibly transform the
whitespace, therefore I have to choose between:
- No formatting
- Formatting using non-XML tools?
- Finding a parser that bends the rules...

Have any of you experienced the same problem and did you find a solution?

Thanks.

Willem Van Lishout
willemvanlishout@xxxxxxxxx

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.