Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 1205 [details]
Test case showing XslCompiledTransform ignoring xsl:output properties.
XslCompiledTransform Load method should populate its XmlWritingSettings OutputSettings property by reading <xsl:output> properties.
Attached is a simple test case showing the indent property being ignored.
This XmlWriterSettings is never used in our XslCompiledTransform which is not really a compiled XSL transform engine that was rewritten from scratch in .NET. We just dispatch most of the things in classic XslTransform and this does not accept XmlWriterSettings (especially for non-xml outputs). Filling XmlWriterSettings property is not something impossible, but that does not make real sense in current state.
Since we mark OutputSettings property as [MonoTODO], this would be taken care after someone writes XSLT compiler and/or upgrade this XslCompiledTransform class to take this settings into consideration. => setting as Enhancemnet.
The latest mono master imports referencesource and it compatible with .NET, giving the expected results.
Looks like this bug still exists and has deeper roots, encountered in MONO 4.2.1.
That shouldn't happen:
atsushi:~$ tail test.cs
var xmlReader = XmlReader.Create(new StringReader(xsl));
// Returns true on .NET and False on mono 2.10.2
atsushi:~$ mcs test.cs
atsushi:~$ mono test.exe
Note that you cannot get referencesource behavior on mobiles. Never (WONTFIX). XslCompiledTransform is based on dynamic code generation. It will fall back to XslTransform.