[Mono-devel-list] Re: test not-wf-sa-030

Atsushi Eno atsushi at ximian.com
Wed Jun 15 11:38:40 EDT 2005


Hi,

Note that XmlTextReader does not check validity of characters
by default. It is not checked unless Normalization property is
set to true. You will see what happens to the results if you set
Normalization = true in your xmlconf.cs.

(Yes, that is bad design of XmlTextReader. Daniel Veillard
pointed out that nearly 3 years ago:
http://www.advogato.org/person/DV/diary.html?start=129 )

Atsushi Eno

Andrew Skiba wrote:
> Hi!
> 
> It seems that r35085 broke the test in subj. The test is not well 
> formed, that is an XML parser is required to throw an exception. To save 
> your time, this is the change I'm talking about (you can svn diff 
> -r35084:35085 as well):
> 
> Index: XmlTextReader.cs
> ===================================================================
> --- XmlTextReader.cs    (revision 45937)
> +++ XmlTextReader.cs    (working copy)
> @@ -1515,7 +1515,7 @@
>                          AppendValueChar ('\n');
>                      // and in case of "\r\n", discard '\r'.
>                  } else {
> -                    if (CharacterChecking && XmlChar.IsInvalid (ch))
> +                    if (XmlChar.IsInvalid (ch))
>                          throw NotWFError ("Not allowed character was 
> found.");
>                      ch = ReadChar ();
>                  }
> 
> and this is the testcase:
> 
> <doc>A form feed () is not legal in data</doc>
> 
> The character in parenthesis is Form Feed (0xC) - illegal in XML documents.
> 
> Thank you,
> Andrew.
> 
> 




More information about the Mono-devel-list mailing list