-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Konstantin,
On 3/25/19 16:24, Konstantin Kolinko wrote: > пн, 25 мар. 2019 г. в 20:13, Mark Thomas <ma...@apache.org>: >> >> On 25/03/2019 16:02, Christopher Schultz wrote: >>> Mark, >>> >>> You don't like leading whitespace, now? >>> >>> This diff looks ... WAY bigger than it should have been. >> >> Different Java versions generate different output. I'm not aware >> there is a way to configure the behaviour one way or the other >> but if there is big +1 for configuring it explicitly. I have no >> preference for which way it is configured. >> >> Mark > > See previous commits, > http://svn.apache.org/viewvc?view=revision&revision=1855896 > http://svn.apache.org/viewvc?view=revision&revision=1855831 > > the formatting is oscillating. > > (1) Any clue, what versions of Java and Apache Ant were used here? > What is actually triggering the issue. > > My first though was that maybe an IDE is performing > auto-formatting, but (see below) ... > > (2) The XSLT stylesheet (tomcat-site.xsl) has `indent="yes"`. > > <xsl:output method="html" html-version="5.0" encoding="UTF-8" > indent="yes" doctype-system="about:legacy-compat"/> > > There was a switch from indent="no" to indent="yes" in > http://svn.apache.org/viewvc?view=revision&revision=1521874 Wed Sep > 11 14:30:22 2013 UTC (5 years, 6 months ago) > > and previously from "yes" to "no" in > http://svn.apache.org/viewvc?view=revision&revision=1521594 Tue Sep > 10 19:21:22 2013 UTC (5 years, 6 months ago) > > Technically, indent="no" should provide a more predictable result, > but looking at those commits it looks that setting it to "no" did > broke something. > > (3) Technically, I think it is possible to download a specific > version of Apache Xalan and configure the "xslt" task of Apache Ant > to use it. > > https://ant.apache.org/manual-1.9.x/Tasks/style.html See attributes > "classpath", "factory" > > Though it looks as a bit of an overkill. Using indent="no" looks > more promising. Generally speaking, XSLT processors should not add any whitespace that isn't already there. I suspect that indent="yes" is a way of producing "pretty" XML/XHTML output. Both XML and XSLT are allowed so re-flow "optional" whitespace, and most processors will simply remove the extraneous "optional" whitespace, forcing you to use <xsl:text>[whitespace]</xsl:text> all over the place to produce deterministic (and present) whitespace. This is a lot of work, but I suppose it could be done incrementally. - -chris -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlyixhUACgkQHPApP6U8 pFhmIBAAoX0NkUHI7Vvhwzn/C1WDk4kNOrYPQ8Q32HqkHvdTHLHiwa0SsNvQXB0w dfIQN6b8lW37S/DtoTtzZhQ2yZthrzdb9DMiZFvwzFYeT1Bu7ZVUKBiiAjzdd7dN V1Q7FQqwFiAKIUPYqG8PL+XFmpQHdzZavBfdh7Kk7IB999ASmuusBY2q61FMQSVk JTsRfabBbCwX8RNfg4qBYrTKXsj/ppRCHReZMAkpu/8NHI7BFmRnz1GLZzGPMDJV bdu/DCdZxJyir2OuQaUgIEy8gAseDjl0v2dIkY/P0gvuSCZWJBKCiSj+wfvcG1gi 5IzCgyWEu/PtlLg3Lz1TYxO42BM0dnzZ1GQV40WcvsQKouds/h7RQWeVsWkuK57O YpdgUMGf7v9YnHK3+2rBzxXMrH2nQRlPFLu/JkXFO1FJQ3iUcqdmAL7Ne5i6xwBT VuqahDcb7UT+dZpFLyfCBx7WRZFrX8JI7O3sWYaLPiEMdKbmsBaQlm3rkJBluVyR DxtY2nsHnLonwF7hSNljG8A2FF+bHu+ntW/rQ+lonDClyaMKxEw60xlQyHh+cnFq G+wzkVwUxOUnsuiYtEwQ4Yf56+0YJYijE/Ijc9i+rsuUbWFzXX3YVkBkc8Zif6Jh R3ljGiUlEzU/brgvbQyoJYIG/jGl1eYf5OPQcw3yhX2KL0lncbs= =v/iP -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org