[Mono-devel-list] [PATCH] Default attribute removal in XmlElement
Boris Kirzner
borisk at mainsoft.com
Tue Jan 13 04:23:32 EST 2004
Description of Problem:
- If the removed attribute is known to have a default value, an
attribute should immediately appear containing the default value.
- Re-setting an attribute to its default value requires that the
attribute be deleted. New attribute with its Specified property set to
False should be created.
Steps to reproduce the problem :
1. Create DTD file defining some node having default attribute value.
2. Create XML file referencing the DTD, with node inside that attribute
value having default in DTD is not explicitly specified.
3. Load XML document into XmlDocument
4. Remove the attribute
4. Inspect Value and Specified properties of the attribute.
Actual result :
System.NullReferenceException: A null value was found where an object
instance was required in <0x00128>
Expected result :
Yes
False
Enclosed is a small test case and a patch.
Thank you in advance,
Boris Kirzner
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Class1.cs
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040113/5582c6ac/attachment.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: staff.xml
Type: text/xml
Size: 210 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040113/5582c6ac/attachment.xml
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040113/5582c6ac/attachment.html
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: XmlAttributeCollection.cs.diff
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040113/5582c6ac/attachment-0001.pl
More information about the Mono-devel-list
mailing list