Kaynağa Gözat

2004-01-14 Atsushi Enomoto <[email protected]>

	* XslVariable.cs : Use new GenericOutputter.ctor() to indicate it is
	  created for variable. (It is required not to output "PI for xmldecl"
	  incorrectly.)
	* XslNumber.cs : trivial code refactoring.
	* XslCopy.cs : comment out WriteLine().

svn path=/trunk/mcs/; revision=22073
Atsushi Eno 22 yıl önce
ebeveyn
işleme
f2b6f9ce4e

+ 8 - 0
mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog

@@ -1,3 +1,11 @@
+2004-01-14 Atsushi Enomoto <[email protected]>
+
+	* XslVariable.cs : Use new GenericOutputter.ctor() to indicate it is
+	  created for variable. (It is required not to output "PI for xmldecl"
+	  incorrectly.)
+	* XslNumber.cs : trivial code refactoring.
+	* XslCopy.cs : comment out WriteLine().
+
 2004-01-08  Nick Drochak <[email protected]>
 
 	* XslAttribute.cs: Removed unused variable

+ 1 - 1
mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslCopy.cs

@@ -104,7 +104,7 @@ namespace Mono.Xml.Xsl.Operations {
 				break;
 
 			default:
-				Console.WriteLine ("unhandled node type {0}", p.CurrentNode.NodeType);
+//				Console.WriteLine ("unhandled node type {0}", p.CurrentNode.NodeType);
 				break;
 			}
 		}

+ 3 - 4
mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslNumber.cs

@@ -82,14 +82,14 @@ namespace Mono.Xml.Xsl.Operations {
 		
 		XslNumberFormatter GetNumberFormatter (XslTransformProcessor p)
 		{
-			string format = "1";
+			string formatStr = "1";
 			string lang = null;
 			string letterValue = null;
 			char groupingSeparatorChar = '\0';
 			int groupingSize = 0;
 			
 			if (this.format != null)
-				format = this.format.Evaluate (p);
+				formatStr = this.format.Evaluate (p);
 			
 			if (this.lang != null)
 				lang = this.lang.Evaluate (p);
@@ -103,7 +103,7 @@ namespace Mono.Xml.Xsl.Operations {
 			if (this.groupingSize != null)
 				groupingSize = int.Parse (this.groupingSize.Evaluate (p));
 			
-			return new XslNumberFormatter (format, lang, letterValue, groupingSeparatorChar, groupingSize);
+			return new XslNumberFormatter (formatStr, lang, letterValue, groupingSeparatorChar, groupingSize);
 		}
 		
 		string GetFormat (XslTransformProcessor p)
@@ -456,7 +456,6 @@ namespace Mono.Xml.Xsl.Operations {
 					string number = num.ToString ("N", nfi);
 					int len = decimalSectionLength;
 					if (len > 1) {
-						// It is hack, but in most case it will work.
 						if (numberBuilder == null)
 							numberBuilder = new StringBuilder ();
 						for (int i = len; i > number.Length; i--)

+ 1 - 1
mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslVariable.cs

@@ -51,7 +51,7 @@ namespace Mono.Xml.Xsl.Operations {
 				return p.Evaluate (select);
 			} else if (content != null) {
 				XmlNodeWriter w = new XmlNodeWriter (false);
-				Outputter outputter = new GenericOutputter(w, p.Outputs);
+				Outputter outputter = new GenericOutputter(w, p.Outputs, null, true);
 				p.PushOutput (outputter);
 				content.Evaluate (p);
 				p.PopOutput ();