Bug 2917

Summary: XslCompiledTransform.Load ignoring xsl:output properties
Product: [Mono] Class Libraries Reporter: Tom Hindle <mono>
Component: System.XMLAssignee: Bugzilla <bugzilla>
Severity: enhancement CC: atsushi, hhblaze, mono-bugs+mono
Priority: ---    
Version: 2.10.x   
Target Milestone: Untriaged   
Hardware: PC   
OS: Windows   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: Test case showing XslCompiledTransform ignoring xsl:output properties.

Description Tom Hindle 2012-01-16 14:48:07 UTC
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.
Comment 1 Atsushi Eno 2012-01-19 07:09:02 UTC
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.
Comment 2 Atsushi Eno 2015-03-17 06:25:39 UTC
The latest mono master imports referencesource and it compatible with .NET, giving the expected results.
Comment 3 Alex Solovyov 2015-11-26 04:44:43 UTC
Looks like this bug still exists and has deeper roots, encountered in MONO 4.2.1.
Comment 4 Atsushi Eno 2015-11-26 08:54:13 UTC
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.