bugDotGNU Portable.NET - Bugs: bug #10853, XmlTextReader does not translate...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #10853: XmlTextReader does not translate entities in values

Submitter:  Erich Kitzmüller <ammoq>
Submitted:  Mon 01 Nov 2004 01:31:16 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Sun 07 Nov 2004 12:11:23 AM UTC, comment #2: 

This is what XmlTextReader.cs from the mono project says:

 // LAMESPEC: Orthodox XML reader should normalize attribute values   

and therefore mono normalizes attributes whether or not Normalize is set. Next time I have access to a machine running Windows, I will double-check how MS .net does it.

The XML specification says:
"Before the value of an attribute is passed to the application or checked for validity, the XML processor MUST normalize the attribute value by applying the algorithm below, or by using some other method such that the value passed to the application is the same as that produced by the algorithm."

Erich Kitzmüller <ammoq>
Sat 06 Nov 2004 11:29:06 PM UTC, comment #1: 

Strange. The property XmlTextReader.Normalization is responsible for that, and default is false (MSDN says so). So, what portable.net does, is correct. (if I insert "xr.Normalization = true;" in the example, it works).
But Mono shows a different behaviour, and I'm quite sure so does MS .net.

Erich Kitzmüller <ammoq>
Mon 01 Nov 2004 01:31:16 AM UTC, original submission:  

See the following example; it should output "nächster", but outputs "n&#228;chster"


using System.Xml;
using System.IO;
using System;

public class XmlDemo {
        public static void Main() {
                StringReader sr = new StringReader("<x value=\"n&#228;chster\"/>");
                XmlTextReader xr = new XmlTextReader (sr);
                xr.Read();
                xr.MoveToAttribute("value");
                Console.Out.WriteLine(xr.Value);
        }
}

Erich Kitzmüller <ammoq>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

No changes have been made to this item

Back to the top

Powered by Savane 3.13-4448.
Corresponding source code