Re: [xsl] Trimming (formatting-only) leading tabs/spaces from XSLT - issues?
Subject: Re: [xsl] Trimming (formatting-only) leading tabs/spaces from XSLT - issues?|
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 07 Jun 2011 14:59:06 +0100
On 07/06/2011 13:47, Philip Fearon wrote:
more effectively than text-only tools, trimming XSLT of
tabs/spaces therefore shouldn't be a problem a
well so long as the thing that was trimming knew enough xslt syntax not
to trim significant white space, which means knowing the interrelation
between xsl:text xsl:strip-space xsl:preserve-space and xml:space, and
in general (to know if xsl:strip-space or xsl:preserve-space apply), it
needs to know full xslt pattern matching behaviour.
(in practice you might want to assume that xsl:strip-space xsl:preserve
space and xml:space aren't applied to the xsl file, which simplifies
things, but will lead to failures in edge cases).
However even if the white space formatter does only change insignificant
white space, so the reformatting won't affect XML processing, it can be
terribly annoying (and space costly) if the code is being stored in a
source code repository that (essentially) is storing line based diffs.
If every time you touch the file it reflows it (or converts all line
endings or whatever) then that ends up with a much bigger than expected
diff showing up in change log at each stage.
This e-mail has been scanned for all viruses by Star. The service is
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
powered by MessageLabs.