[Mono-bugs] [Bug 588399] New: Argimentexception using WriteAttributeString("xmlns", "o", "", "urn:schemas-microsoft-com:office:office")
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Mar 15 12:15:07 EDT 2010
http://bugzilla.novell.com/show_bug.cgi?id=588399
http://bugzilla.novell.com/show_bug.cgi?id=588399#c0
Summary: Argimentexception using WriteAttributeString("xmlns",
"o", "", "urn:schemas-microsoft-com:office:office")
Classification: Mono
Product: Mono: Class Libraries
Version: 2.6.x
Platform: x86
OS/Version: Windows Vista
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.XML
AssignedTo: atsushi at ximian.com
ReportedBy: kobruleht2 at hot.ee
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Description of Problem:
Exception occurs if WriteAttributeString("xmlns", "o", "",
"urn:schemas-microsoft-com:office:office"); is used
Steps to reproduce the problem:
Run code below
Actual Results:
Unhandled Exception: System.ArgumentException: The 'xmlns' attribute is bound
to the reserved namespace 'http://www.w3.org/
2000/xmlns/'
at System.Xml.XmlTextWriter.WriteStartAttribute (System.String prefix,
System.String localName, System.String namespaceUr
i) [0x00000] in <filename unknown>:0
at System.Xml.XmlWriter.WriteAttributeString (System.String prefix,
System.String localName, System.String ns, System.Str
ing value) [0x00000] in <filename unknown>:0
at Program.Main () [0x00000] in <filename unknown>:0
Expected Results:
no exception
code to reproduce:
using System;
using System.IO;
using System.Xml;
class Program
{
static void Main()
{
XmlWriterSettings settings = new XmlWriterSettings();
settings.Indent = true;
settings.IndentChars = " ";
XmlWriter writer = XmlWriter.Create(new MemoryStream(), settings);
writer.WriteStartDocument();
writer.WriteProcessingInstruction("mso-application",
"progid=\"Excel.Sheet\"");
writer.WriteWhitespace("\n");
writer.WriteStartElement("Workbook",
"urn:schemas-microsoft-com:office:spreadsheet");
writer.WriteAttributeString("xmlns", "o", "",
"urn:schemas-microsoft-com:office:office");
Console.ReadLine();
}
}
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list