diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2005-12-08 07:06:22 +0300 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2005-12-08 07:06:22 +0300 |
commit | b78ca0c16432e36e438bccef3c9dca5e51b60acc (patch) | |
tree | 783a732e8949397d3e54aba43f9ebb184d92b20f /mcs/class/System.XML | |
parent | a77b98bdd609e7a0d3297bbd00ab937d958fcabf (diff) |
2005-12-08 Atsushi Enomoto <atsushi@ximian.com>
* XmlReaderSettings.cs : ProhibitDtd is set as default.
* XmlWriterSettings.cs : no set_OutputMethod.
* XmlReaderCommonTests.cs : use ProhibitDtd=false in CreateSimple()
and added CreateSimpleProhibitDtd().
svn path=/trunk/mcs/; revision=54090
Diffstat (limited to 'mcs/class/System.XML')
5 files changed, 23 insertions, 3 deletions
diff --git a/mcs/class/System.XML/System.Xml/ChangeLog b/mcs/class/System.XML/System.Xml/ChangeLog index de117fc44a7..de7516aab36 100644 --- a/mcs/class/System.XML/System.Xml/ChangeLog +++ b/mcs/class/System.XML/System.Xml/ChangeLog @@ -1,3 +1,8 @@ +2005-12-08 Atsushi Enomoto <atsushi@ximian.com> + + * XmlReaderSettings.cs : ProhibitDtd is set as default. + * XmlWriterSettings.cs : no set_OutputMethod. + 2005-11-30 Konstantin Triger <kostat@mainsoft.com> * IXmlNamespaceResolver.cs: TARGET_JVM namespace change. diff --git a/mcs/class/System.XML/System.Xml/XmlReaderSettings.cs b/mcs/class/System.XML/System.Xml/XmlReaderSettings.cs index 0750904bc0f..5a34775568f 100644 --- a/mcs/class/System.XML/System.Xml/XmlReaderSettings.cs +++ b/mcs/class/System.XML/System.Xml/XmlReaderSettings.cs @@ -97,7 +97,7 @@ namespace System.Xml ignoreWhitespace = false; lineNumberOffset = 0; linePositionOffset = 0; - prohibitDtd = false; // ? not documented + prohibitDtd = true; schemas = new XmlSchemaSet (); validationFlags = XsValidationFlags.ProcessIdentityConstraints; diff --git a/mcs/class/System.XML/System.Xml/XmlWriterSettings.cs b/mcs/class/System.XML/System.Xml/XmlWriterSettings.cs index a78cae1ca37..7fd5522e7d3 100644 --- a/mcs/class/System.XML/System.Xml/XmlWriterSettings.cs +++ b/mcs/class/System.XML/System.Xml/XmlWriterSettings.cs @@ -154,7 +154,7 @@ namespace System.Xml // does it affect only on XmlTextWriter? public XmlOutputMethod OutputMethod { get { return outputMethod; } - set { outputMethod = value; } + //set { outputMethod = value; } } } } diff --git a/mcs/class/System.XML/Test/System.Xml/ChangeLog b/mcs/class/System.XML/Test/System.Xml/ChangeLog index 5c847a51be2..f34580c14ae 100644 --- a/mcs/class/System.XML/Test/System.Xml/ChangeLog +++ b/mcs/class/System.XML/Test/System.Xml/ChangeLog @@ -1,3 +1,8 @@ +2005-12-08 Atsushi Enomoto <atsushi@ximian.com> + + * XmlReaderCommonTests.cs : use ProhibitDtd=false in CreateSimple() + and added CreateSimpleProhibitDtd(). + 2005-11-09 Atsushi Enomoto <atsushi@ximian.com> * XmlWriterSettingsTests.cs : NormalizeNewLines does not exist anymore diff --git a/mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs index b0cb9aa06a8..453330b959f 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs @@ -1447,7 +1447,9 @@ namespace MonoTests.System.Xml [Test]
public void CreateSimple ()
{
- XmlReader xr = XmlReader.Create ("Test/XmlFiles/nested-dtd-test.xml");
+ XmlReaderSettings s = new XmlReaderSettings ();
+ s.ProhibitDtd = false;
+ XmlReader xr = XmlReader.Create ("Test/XmlFiles/nested-dtd-test.xml", s);
xr.Read ();
AssertEquals ("#1", XmlNodeType.DocumentType, xr.NodeType);
xr.Read ();
@@ -1455,6 +1457,14 @@ namespace MonoTests.System.Xml xr.Read ();
AssertEquals ("#3", XmlNodeType.Element, xr.NodeType);
}
+
+ [Test]
+ [ExpectedException (typeof (XmlException))]
+ public void CreateSimpleProhibitDtd ()
+ {
+ XmlReader xr = XmlReader.Create ("Test/XmlFiles/nested-dtd-test.xml");
+ xr.Read ();
+ }
#endif
}
}
|