Microsoft KB Archive/322844

= FIX: XmlValidatingReader performs incorrect attribute and text nodes normalization with character entities 0xA and 0xD =

Article ID: 322844

Article Last Modified on 2/12/2007

-

APPLIES TO


 * Microsoft .NET Framework 1.0 Service Pack 1
 * Microsoft Visual Studio .NET 2002 Enterprise Architect
 * Microsoft Visual Studio .NET 2002 Enterprise Developer
 * Microsoft Visual Studio .NET 2002 Professional Edition
 * Microsoft .NET Framework 1.0 Service Pack 1

-



This article was previously published under Q322844



SYMPTOMS
With the .NET Framework Service Pack 1 (SP1) release, XmlValidatingReader (System.Xml namespace) performs incorrect attribute or text nodes normalization when the nodes contain character references to the new line characters 0xA and 0xD.



CAUSE
XmlTextReader (and, therefore, XmlValidatingReader) normalizes the attribute value after it is read and all character references and entities are expanded. Because of this, the normalization cannot distinguish between a character reference and the character itself. This also causes incorrect attribute and text normalization.

These problems cause an XML digital signature that is not valid to be generated with the XmlDsigC14NTransform Microsoft .NET Framework class. When you use the XmlDsigC14NTransform class, you see incorrect attribute normalizations.



RESOLUTION
A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next P1 that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question. The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.   Date         Time   Version             Size   File name -  07-Jun-2002  17:17  1.0.3705.286    1,298,432  System.xml.dll 07-Jun-2002 20:25  5.50.4134.600   1,032,464  Ndp10_qfeu_q495_en.exe



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
According to the World Wide Web Consortium (W3C) specification, these new line characters (0xA and 0xD) must be preserved in CDATA normalization of attributes and end of line normalization of text nodes.

For more information, visit the following W3C Web site:

http://www.w3.org/TR/2000/REC-xml-20001006#AVNormalize

XML attribute or text node normalization by XmlValidatingReader or XmlTextReader does not comply with the W3C XML specification when the attribute or text node value contains character references to the new line characters 0xA and 0xD. The attribute or text node value is normalized after it is parsed and after all character references have been replaced by the actual characters.

Keywords: kbbug kbfix kbqfe kbvs2002sp1sweep kbhotfixserver KB322844

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.