diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2003-07-24 20:19:39 +0400 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2003-07-24 20:19:39 +0400 |
commit | 750f51d4f9f5dd6638da7bc70e359ab7a6c3838b (patch) | |
tree | c912c1e7ee20400eafa7a67b4859576660aa09b8 /mcs/class/System.XML/System.Xml/XmlValidatingReader.cs | |
parent | b3fd8303a68491eb235722063c710b9de1c2aec9 (diff) |
2003-07-24 Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
* XmlTextReader.cs :
Read() now handles parser context stuff (BaseURI, XmlLang and
XmlSpace) correctly for an empty element.
Normalization property now doesn't throw an error. Will be used soon.
* XmlValidatingReader.cs : added ValidationType.None support (wait for
the next DTDValidatingReader update for "not firing event handler).
* XmlNodeReader.cs : jun. 30th commit seems wrong. It keeps its state.
svn path=/trunk/mcs/; revision=16609
Diffstat (limited to 'mcs/class/System.XML/System.Xml/XmlValidatingReader.cs')
-rw-r--r-- | mcs/class/System.XML/System.Xml/XmlValidatingReader.cs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/mcs/class/System.XML/System.Xml/XmlValidatingReader.cs b/mcs/class/System.XML/System.Xml/XmlValidatingReader.cs index ab34aeec63a..e81d6b03dc6 100644 --- a/mcs/class/System.XML/System.Xml/XmlValidatingReader.cs +++ b/mcs/class/System.XML/System.Xml/XmlValidatingReader.cs @@ -79,10 +79,7 @@ namespace System.Xml { [MonoTODO] public EntityHandling EntityHandling { get { return entityHandling; } - set { - throw new NotImplementedException (); -// entityHandling = value; - } + set { entityHandling = value; } } public override bool EOF { @@ -220,9 +217,9 @@ namespace System.Xml { switch (validationType) { case ValidationType.Auto: case ValidationType.DTD: + case ValidationType.None: validationType = value; break; - case ValidationType.None: case ValidationType.Schema: case ValidationType.XDR: throw new NotImplementedException (); @@ -237,7 +234,7 @@ namespace System.Xml { public override string XmlLang { [MonoTODO] - get { return validatingReader == null ? null : validatingReader.XmlLang; } + get { return validatingReader == null ? String.Empty : validatingReader.XmlLang; } } public XmlResolver XmlResolver { @@ -332,11 +329,16 @@ namespace System.Xml { if (ReadState == ReadState.Initial) { switch (ValidationType) { case ValidationType.Auto: + case ValidationType.None: + validatingReader = // new XmlSchemaValidatingReader ( + new DTDValidatingReader (sourceReader, this); + break; case ValidationType.DTD: validatingReader = new DTDValidatingReader (sourceReader, this); break; - case ValidationType.None: case ValidationType.Schema: +// validatingReader = new XmlSchemaValidatingReader (sourceReader, this); +// break; case ValidationType.XDR: throw new NotImplementedException (); } @@ -387,7 +389,7 @@ namespace System.Xml { { if (ValidationEventHandler != null) ValidationEventHandler (o, e); - else + else if (ValidationType != ValidationType.None) throw e.Exception; } #endregion // Methods |