[Mono-bugs] [Bug 77451][Min] Changed - XmlTextWriter doesn't honor
xml:space appropiatelay
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Feb 2 23:37:01 EST 2006
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by atsushi at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=77451
--- shadow/77451 2006-02-02 14:18:39.000000000 -0500
+++ shadow/77451.tmp.28136 2006-02-02 23:37:01.000000000 -0500
@@ -1,14 +1,14 @@
Bug#: 77451
Product: Mono: Class Libraries
Version: 1.0
OS: All
OS Details:
-Status: NEW
-Resolution:
-Severity:
+Status: RESOLVED
+Resolution: NOTABUG
+Severity: Unknown
Priority: Minor
Component: Sys.XML
AssignedTo: atsushi at ximian.com
ReportedBy: dwashington at gmx.net
QAContact: mono-bugs at ximian.com
TargetMilestone: ---
@@ -18,6 +18,35 @@
The current implementation of XmlTextWriter doesn't seem to honor the
xml:space attribute if set to "preserve" in an element. It only preserves
spaces in the element in which the element is defined, and not also in the
sub-elements like defined in the W3C's XML recommendation
(http://www.w3.org/TR/REC-xml/#sec-white-space).
+
+------- Additional Comments From atsushi at ximian.com 2006-02-02 23:37 -------
+It works on my box. Notet that XML namespace URI is required:
+
+XmlTextWriter xtw = new XmlTextWriter (Console.Out);
+xtw.WriteStartElement ("out");
+xtw.WriteStartElement ("test");
+xtw.WriteAttributeString ("xml:space", "default");
+xtw.WriteWhitespace (" ");
+Console.Error.WriteLine ("******:" + xtw.XmlSpace);
+xtw.WriteEndElement ();
+xtw.WriteStartElement ("test");
+xtw.WriteAttributeString ("xml", "space",
+"http://www.w3.org/XML/1998/namespace", "preserve");
+xtw.WriteWhitespace (" ");
+Console.Error.WriteLine ("******:" + xtw.XmlSpace);
+xtw.WriteStartElement ("foo");
+Console.Error.WriteLine ("******:" + xtw.XmlSpace);
+xtw.WriteEndElement ();
+xtw.WriteEndElement ();
+xtw.WriteEndElement ();
+
+
+$ mono ./xmlspacewrite.exe
+<out><test xml:space="default"> ******:None
+</test><test xml:space="preserve"> ******:Preserve
+<foo******:Preserve
+ /></test></out>
+
More information about the mono-bugs
mailing list