Just for clarification of my previous answer ( https://stackoverflow.com/questions/3366181/sharepoint-designer-keeps-turning-xa-within-source-code-into-literal-new-line )
Running this stylesheet (same as Dimitre):
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:variable name="vNL" select="'
'"/>
<xsl:template match="xsl:value-of">
<xsl:value-of select=
"string-length(@select)
-
string-length(translate(@select, $vNL, ''))"/>
</xsl:template>
</xsl:stylesheet>
With itself as input, output:
0
It only works with input like this:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:variable name="vNL" select="'
'"/>
<xsl:template match="xsl:value-of">
<xsl:value-of select=
"string-length(@select)

-

string-length(translate(@select, $vNL, ''))"/>
</xsl:template>
</xsl:stylesheet>
Output:
2