Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 292038 - Last Review: October 16, 2002 - Revision: 1.4
FIX: Duplicate Attributes in XML when DTD Has Attributes with Default Values
This article was previously published under Q292038
When a document type definition (DTD) has attributes with default values, the resulting XML file contains duplicate attributes.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
This bug was corrected in Microsoft XML 3.0 Service Pack 1.
For additional information on other fixes included in Microsoft XML 3.0 Service Pack 1, click the article number below
to view the article in the Microsoft Knowledge Base:
292935Â
(http://kbalertz.com/Feedback.aspx?kbNumber=292935/EN-US/
)
INFO: List of Issues Fixed in Microsoft XML 3.0 Service Pack 1
For the latest information and downloads of MSXML, refer to the following MSDN Web site at:
Steps to Reproduce Behavior
- Paste the following code in a new text document, and save the file as Repro.dtd:
<!ELEMENT root (tag)>
<!ELEMENT tag EMPTY>
<!ATTLIST tag
attr1 (value11|value12) "value11"
attr2 (value21|value22) "value22"
>
- Paste the following text in another new document, and save the file as Repro.xml in the same location as the DTD file you just created:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE root SYSTEM "repro.dtd" >
<root>
<tag attr2="value21"/>
</root>
- Using Microsoft Internet Explorer, browse to Repro.xml.
The following is the expected result:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE root (View Source for full doctype...)>
- <root>
<tag attr2="value21" attr1="value11" />
</root>
However, the actual result is as follows:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE root (View Source for full doctype...)>
- <root>
<tag attr2="value21" attr1="value11" attr2="value22" />
</root>
| kbbug kbfix kbmsxml300sp1fix kbmsxmlnosweep KB292038 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate