
Signature
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
FWIW I found out you can do it using XmlWriterSettings.NewLineChars or
XmlWriterSettings.NewLineHandling. here's a sample:
XslCompiledTransform trans = new XslCompiledTransform();
trans.Load(...);
XmlWriterSettings ws = trans.OutputSettings.Clone();
ws.NewLineChars = '\n';
using (XmlWriter xw = XmlWriter.Create(..., ws))
{
trans.Transform(..., xw);
}
Andy
>> any idea how I can control the line endings generated by the XSLT
>> processor?
>
> I am not sure there is a way other than post-processing the result of the
> XSLT transformation.
Martin Honnen - 28 Feb 2008 13:38 GMT
> FWIW I found out you can do it using XmlWriterSettings.NewLineChars or
> XmlWriterSettings.NewLineHandling. here's a sample:
[quoted text clipped - 3 lines]
> XmlWriterSettings ws = trans.OutputSettings.Clone();
> ws.NewLineChars = '\n';
Nice. I tried settings NewLineChars too but did not clone it and then
the properties were read-only and my attempts failed.

Signature
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/