Author: atsushi
Date: 2008-02-11 06:28:51 -0500 (Mon, 11 Feb 2008)
New Revision: 95430

Modified:
   trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/ChangeLog
   trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
   trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeNavigator.cs
   trunk/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/ChangeLog
   trunk/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XNodeNavigatorTest.cs
Log:
2008-02-11  Atsushi Enomoto  <[EMAIL PROTECTED]>

        * XNodeNavigator.cs : MoveToId() is not supported in this class.
        * XElement.cs : allow DTD by default.

        * XNodeNavigatorTest.cs : test MoveToId() (NotSupportedException,
          cannot be enabled yet).



Modified: trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/ChangeLog
===================================================================
--- trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/ChangeLog   2008-02-11 
11:01:37 UTC (rev 95429)
+++ trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/ChangeLog   2008-02-11 
11:28:51 UTC (rev 95430)
@@ -1,5 +1,10 @@
 2008-02-11  Atsushi Enomoto  <[EMAIL PROTECTED]>
 
+       * XNodeNavigator.cs : MoveToId() is not supported in this class.
+       * XElement.cs : allow DTD by default.
+
+2008-02-11  Atsushi Enomoto  <[EMAIL PROTECTED]>
+
        * XNode.cs XElement.cs XObject.cs XDocument.cs XContainer.cs :
          support LoadOptions.SetLineInfo and LoadOptions.SetBaseUri.
 

Modified: trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
===================================================================
--- trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs 2008-02-11 
11:01:37 UTC (rev 95429)
+++ trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs 2008-02-11 
11:28:51 UTC (rev 95430)
@@ -356,6 +356,7 @@
                public static XElement Load (string uri, LoadOptions options)
                {
                        XmlReaderSettings s = new XmlReaderSettings ();
+                       s.ProhibitDtd = false;
                        s.IgnoreWhitespace = (options & 
LoadOptions.PreserveWhitespace) == 0;
                        using (XmlReader r = XmlReader.Create (uri, s)) {
                                return LoadCore (r, options);
@@ -370,6 +371,7 @@
                public static XElement Load (TextReader tr, LoadOptions options)
                {
                        XmlReaderSettings s = new XmlReaderSettings ();
+                       s.ProhibitDtd = false;
                        s.IgnoreWhitespace = (options & 
LoadOptions.PreserveWhitespace) == 0;
                        using (XmlReader r = XmlReader.Create (tr, s)) {
                                return LoadCore (r, options);
@@ -384,6 +386,7 @@
                public static XElement Load (XmlReader reader, LoadOptions 
options)
                {
                        XmlReaderSettings s = reader.Settings.Clone ();
+                       s.ProhibitDtd = false;
                        s.IgnoreWhitespace = (options & 
LoadOptions.PreserveWhitespace) == 0;
                        using (XmlReader r = XmlReader.Create (reader, s)) {
                                return LoadCore (r, options);

Modified: trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeNavigator.cs
===================================================================
--- trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeNavigator.cs   
2008-02-11 11:01:37 UTC (rev 95429)
+++ trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeNavigator.cs   
2008-02-11 11:28:51 UTC (rev 95430)
@@ -303,10 +303,9 @@
                        return true;
                }
 
-               [MonoTODO]
                public override bool MoveToId (string id)
                {
-                       return false;
+                       throw new NotSupportedException ("This XPathNavigator 
does not support IDs");
                }
 
                public override bool MoveToNext ()

Modified: trunk/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/ChangeLog
===================================================================
--- trunk/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/ChangeLog      
2008-02-11 11:01:37 UTC (rev 95429)
+++ trunk/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/ChangeLog      
2008-02-11 11:28:51 UTC (rev 95430)
@@ -1,5 +1,10 @@
 2008-02-11  Atsushi Enomoto  <[EMAIL PROTECTED]>
 
+       * XNodeNavigatorTest.cs : test MoveToId() (NotSupportedException,
+         cannot be enabled yet).
+
+2008-02-11  Atsushi Enomoto  <[EMAIL PROTECTED]>
+
        * XObjectTest.cs : new. Test IXmlLineInfo.
 
 2008-02-11  Atsushi Enomoto  <[EMAIL PROTECTED]>

Modified: 
trunk/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XNodeNavigatorTest.cs
===================================================================
--- trunk/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XNodeNavigatorTest.cs  
2008-02-11 11:01:37 UTC (rev 95429)
+++ trunk/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XNodeNavigatorTest.cs  
2008-02-11 11:28:51 UTC (rev 95430)
@@ -48,6 +48,22 @@
                        Assert.IsTrue (nav.MoveToFirstChild (), "#1");
                        Assert.IsTrue (nav.MoveToNext (), "#2");
                }
+
+               [Test]
+               public void MoveToId () // Not supported
+               {
+                       string xml = @"
+<!DOCTYPE root [
+<!ELEMENT foo EMPTY>
+<!ELEMENT bar EMPTY>
+<!ATTLIST foo id ID #IMPLIED>
+<!ATTLIST bar id ID #IMPLIED>
+]>
+<root><foo id='foo' /><bar id='bar' /></root>",
+                       XDocument doc = XDocument.Parse (xml, 
LoadOptions.SetLineInfo);
+                       XPathNavigator nav = doc.CreateNavigator ();
+                       nav.MoveToId ("foo");
+               }
 */
        }
 }

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

Reply via email to