Просмотр исходного кода

2003-07-02 Zoltan Varga <[email protected]>

	* XslTransform.cs (Transform): Call xsltSaveResultToFilename instead
	of first reading the result into a string to conserve memory.

svn path=/trunk/mcs/; revision=15857
Zoltan Varga 22 лет назад
Родитель
Сommit
403b2501f8

+ 5 - 0
mcs/class/System.XML/System.Xml.Xsl/ChangeLog

@@ -1,3 +1,8 @@
+2003-07-02  Zoltan Varga  <[email protected]>
+
+	* XslTransform.cs (Transform): Call xsltSaveResultToFilename instead
+	of first reading the result into a string to conserve memory.
+
 2003-06-30  Zoltan Varga  <[email protected]>
 
 	* XslTransform.cs (GetStringFromDocument): Read the result using

+ 1 - 7
mcs/class/System.XML/System.Xml.Xsl/XslTransform.cs

@@ -182,14 +182,8 @@ namespace System.Xml.Xsl
 
 				resultDocument = ApplyStylesheet (xmlDocument, null, null);
 
-				/*
-				 * If I do this, the <?xml version=... is always present *
 				if (-1 == xsltSaveResultToFilename (outputfile, resultDocument, stylesheet, 0))
-					throw new XmlException ("Error xsltSaveResultToFilename");
-				*/
-				StreamWriter writer = new StreamWriter (new FileStream (outputfile, FileMode.Create));
-				writer.Write (GetStringFromDocument (resultDocument, stylesheet));
-				writer.Close ();
+					throw new XmlException ("Error in xsltSaveResultToFilename");
 			} finally {
 				if (xmlDocument != IntPtr.Zero)
 					xmlFreeDoc (xmlDocument);