Nowadays, XmlDeclaratoin.WriteTo() writes PI instead of raw.
[mono.git] / mcs / class / System.XML / System.Xml / XmlValidatingReader.cs
index 92145b55005331ffb87f75a9f0d76860539353f0..de12750f0abf45f025b3286367be2114c2815e41 100644 (file)
@@ -305,7 +305,8 @@ namespace System.Xml
                }
 #endif
 
-               [MonoTODO ("We decided not to support XDR schema that spec is obsolete.")]
+               [MonoTODO]
+               // We decided not to support XDR schema; it is obsolete.
                public ValidationType ValidationType {
                        get { return validationType; }
                        set {
@@ -382,7 +383,12 @@ namespace System.Xml
                }
 
                XmlParserContext IHasXmlParserContext.ParserContext {
-                       get { return dtdReader != null ? dtdReader.ParserContext : null; }
+                       get {
+                               if (dtdReader != null)
+                                       return dtdReader.ParserContext;
+                               IHasXmlParserContext i = sourceReader as IHasXmlParserContext;
+                               return i != null ? i.ParserContext : null;
+                       }
                }
 
 #if NET_2_0
@@ -468,7 +474,8 @@ namespace System.Xml
                        return validatingReader.MoveToNextAttribute ();
                }
 
-               [MonoTODO ("We decided not to support XDR schema that spec is obsolete.")]
+               [MonoTODO]
+               // We decided not to support XDR schema; it is obsolete.
                public override bool Read ()
                {
                        if (validatingReader == null) {
@@ -571,7 +578,7 @@ namespace System.Xml
                }
 
 #if NET_2_0
-               [MonoTODO ("Check how expanded entity is handled here.")]
+               [MonoTODO] // FIXME: Check how expanded entity is handled here.
                public override int ReadContentAsBase64 (byte [] buffer, int offset, int length)
                {
                        if (validatingReader != null)
@@ -580,7 +587,7 @@ namespace System.Xml
                                return sourceReader.ReadContentAsBase64 (buffer, offset, length);
                }
 
-               [MonoTODO ("Check how expanded entity is handled here.")]
+               [MonoTODO] // FIXME: Check how expanded entity is handled here.
                public override int ReadContentAsBinHex (byte [] buffer, int offset, int length)
                {
                        if (validatingReader != null)
@@ -589,7 +596,7 @@ namespace System.Xml
                                return sourceReader.ReadContentAsBinHex (buffer, offset, length);
                }
 
-               [MonoTODO ("Check how expanded entity is handled here.")]
+               [MonoTODO] // FIXME: Check how expanded entity is handled here.
                public override int ReadElementContentAsBase64 (byte [] buffer, int offset, int length)
                {
                        if (validatingReader != null)
@@ -598,7 +605,7 @@ namespace System.Xml
                                return sourceReader.ReadElementContentAsBase64 (buffer, offset, length);
                }
 
-               [MonoTODO ("Check how expanded entity is handled here.")]
+               [MonoTODO] // FIXME: Check how expanded entity is handled here.
                public override int ReadElementContentAsBinHex (byte [] buffer, int offset, int length)
                {
                        if (validatingReader != null)