Author: atsushi
Date: 2006-09-11 07:02:03 -0400 (Mon, 11 Sep 2006)
New Revision: 65219

Modified:
   trunk/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog
   trunk/mcs/class/System.XML/Mono.Xml.XPath/XPathEditableDocument.cs
   trunk/mcs/class/System.XML/Test/System.Xml.XPath/ChangeLog
   
trunk/mcs/class/System.XML/Test/System.Xml.XPath/XPathEditableNavigatorTests.cs
Log:
2006-09-11  Atsushi Enomoto <[EMAIL PROTECTED]>

        * XPathEditableDocument.cs : DocumentFragment should also be allowed
          to have a child.

        * XPathEditableNavigatorTests.cs : added test fro AppendChild() from
          a document fragment.



Modified: trunk/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog 2006-09-11 10:33:35 UTC 
(rev 65218)
+++ trunk/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog 2006-09-11 11:02:03 UTC 
(rev 65219)
@@ -1,3 +1,8 @@
+2006-09-11  Atsushi Enomoto <[EMAIL PROTECTED]>
+
+       * XPathEditableDocument.cs : DocumentFragment should also be allowed
+         to have a child.
+
 2006-09-08  Atsushi Enomoto <[EMAIL PROTECTED]>
 
        * DTMXPathDocumentWriter2.cs : fill String.Empty for null ns in

Modified: trunk/mcs/class/System.XML/Mono.Xml.XPath/XPathEditableDocument.cs
===================================================================
--- trunk/mcs/class/System.XML/Mono.Xml.XPath/XPathEditableDocument.cs  
2006-09-11 10:33:35 UTC (rev 65218)
+++ trunk/mcs/class/System.XML/Mono.Xml.XPath/XPathEditableDocument.cs  
2006-09-11 11:02:03 UTC (rev 65219)
@@ -85,6 +85,7 @@
                        case XmlNodeType.Document:
                                current = ((XmlDocument) 
parent).CreateDocumentFragment ();
                                break;
+                       case XmlNodeType.DocumentFragment:
                        case XmlNodeType.Element:
                                current = 
parent.OwnerDocument.CreateDocumentFragment ();
                                break;

Modified: trunk/mcs/class/System.XML/Test/System.Xml.XPath/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/Test/System.Xml.XPath/ChangeLog  2006-09-11 
10:33:35 UTC (rev 65218)
+++ trunk/mcs/class/System.XML/Test/System.Xml.XPath/ChangeLog  2006-09-11 
11:02:03 UTC (rev 65219)
@@ -1,3 +1,8 @@
+2006-09-11  Atsushi Enomoto <[EMAIL PROTECTED]>
+
+       * XPathEditableNavigatorTests.cs : added test fro AppendChild() from
+         a document fragment.
+
 2006-09-01  Atsushi Enomoto <[EMAIL PROTECTED]>
 
        * XPathNavigatorReaderTests.cs : added test for MoveToFirstAttribute()

Modified: 
trunk/mcs/class/System.XML/Test/System.Xml.XPath/XPathEditableNavigatorTests.cs
===================================================================
--- 
trunk/mcs/class/System.XML/Test/System.Xml.XPath/XPathEditableNavigatorTests.cs 
    2006-09-11 10:33:35 UTC (rev 65218)
+++ 
trunk/mcs/class/System.XML/Test/System.Xml.XPath/XPathEditableNavigatorTests.cs 
    2006-09-11 11:02:03 UTC (rev 65219)
@@ -739,6 +739,17 @@
                        // should first move to owner element and go on.
                        Assert.IsTrue (nav.MoveToFollowing ("foo", 
String.Empty));
                }
+
+               [Test]
+               public void AppendChildInDocumentFragment ()
+               {
+                       XmlDocumentFragment f = new XmlDocument 
().CreateDocumentFragment ();
+                       XmlWriter w = f.CreateNavigator ().AppendChild ();
+                       w.WriteStartElement ("foo");
+                       w.WriteEndElement ();
+                       w.Close ();
+                       Assert.IsNotNull (f.FirstChild as XmlElement);
+               }
        }
 }
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to