http://bugzilla.novell.com/show_bug.cgi?id=549839


           Summary: XmlElement::CloneNode uses incorrect XmlNode creation
                    pattern.
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: i386
               URL: See
                    http://anonsvn.mono-project.com/viewvc/trunk/mcs/class
                    /System.XML/System.Xml/XmlElement.cs?view=markup&sortb
                    y=date
        OS/Version: Kubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: Community User


The XmlElement CloneNode function creates a new node via new XmlNode, whereas I
believe it should instead use OwnerDocument.CreateElement. The problem with the
current implementation is that it doesn't allow for the user to override the
XmlNode creation mechanism (e.g. to create a subclass of XmlNode). IMO all node
creation should go through the (overridable) document factory function
CreateElement. Microsoft .NET does so, and Mono is thus out of alignment with
Microsoft here. This situation may exist in additional code beyond XmlElement.

See
http://anonsvn.mono-project.com/viewvc/trunk/mcs/class/System.XML/System.Xml/XmlElement.cs?view=markup&sortby=date,
line 251.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to