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

Submitted by:  Erich Kitzmüller <ammoq>
Submitted on:  Mon 01 Nov 2004 01:31:16 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned 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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

No Changes Have Been Made to This Item

Back to the top


Powered by Savane 3.1-cleanup1