diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2008-05-22 17:45:29 +0400 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2008-05-22 17:45:29 +0400 |
commit | dad3095d0139109556236b9e74834823f14ae8e4 (patch) | |
tree | 65e3ddd2ee225544a13285a9e85c3a50f96f7b44 /mcs/class/System.XML/System.Xml.Xsl | |
parent | d24de5e71b61b6273c68af6c1a4a5ceb08ef1c82 (diff) |
2008-05-22 Atsushi Enomoto <atsushi@ximian.com>
* XslCompiledTransform.cs : in XmlWriterSettings, use
ConformanceLevel.Fragment to allow fragment output.
In Transform(string,string), use TextWriter output instead of
XmlWriter to control xml declaration output.
Fixed bug #391424.
* XslTransformTests.cs : added test for bug #391424.
* 391424.xml, 391424.xsl : new test files.
* Makefile : more simplification (and I forgot the syntax again :/)
svn path=/trunk/mcs/; revision=103783
Diffstat (limited to 'mcs/class/System.XML/System.Xml.Xsl')
-rw-r--r-- | mcs/class/System.XML/System.Xml.Xsl/ChangeLog | 8 | ||||
-rw-r--r-- | mcs/class/System.XML/System.Xml.Xsl/XslCompiledTransform.cs | 7 |
2 files changed, 11 insertions, 4 deletions
diff --git a/mcs/class/System.XML/System.Xml.Xsl/ChangeLog b/mcs/class/System.XML/System.Xml.Xsl/ChangeLog index 93012578f35..4e06e111847 100644 --- a/mcs/class/System.XML/System.Xml.Xsl/ChangeLog +++ b/mcs/class/System.XML/System.Xml.Xsl/ChangeLog @@ -1,3 +1,11 @@ +2008-05-22 Atsushi Enomoto <atsushi@ximian.com> + + * XslCompiledTransform.cs : in XmlWriterSettings, use + ConformanceLevel.Fragment to allow fragment output. + In Transform(string,string), use TextWriter output instead of + XmlWriter to control xml declaration output. + Fixed bug #391424. + 2007-12-27 Atsushi Enomoto <atsushi@ximian.com> * XslCompiledTransform.cs : when loading XmlReader as an input to diff --git a/mcs/class/System.XML/System.Xml.Xsl/XslCompiledTransform.cs b/mcs/class/System.XML/System.Xml.Xsl/XslCompiledTransform.cs index 714052ed9d5..0b12b3c56cf 100644 --- a/mcs/class/System.XML/System.Xml.Xsl/XslCompiledTransform.cs +++ b/mcs/class/System.XML/System.Xml.Xsl/XslCompiledTransform.cs @@ -64,6 +64,7 @@ namespace System.Xml.Xsl enable_debug = enableDebug; if (enable_debug) debugger = new NoOperationDebugger (); + output_settings.ConformanceLevel = ConformanceLevel.Fragment; } [MonoTODO] @@ -82,10 +83,8 @@ namespace System.Xml.Xsl public void Transform (string inputfile, string outputfile) { - using (XmlReader reader = XmlReader.Create (inputfile)) { - using (XmlWriter writer = XmlWriter.Create (outputfile, output_settings)) { - Transform (reader, writer); - } + using (Stream outStream = File.Create (outputfile)) { + Transform (new XPathDocument (inputfile, XmlSpace.Preserve), null, outStream); } } |