Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 262585 - Last Review: August 8, 2003 - Revision: 2.0
PRB: Do Not Use "xml" Keyword to Begin User-Defined Namespace Prefixes
This article was previously published under Q262585
On This Page
SYMPTOMS
If you use the "xml" keyword (in any combination of uppercase or lowercase letters) in
user-defined namespace prefixes in an XML document, the Microsoft XML (MSXML) parser generates the following error message:
The namespace prefix is not allowed to start with the reserved string "xml."
CAUSE
The xml keyword in any combination of uppercase or lowercase letters is a reserved word, and therefore cannot be specified as the first three characters of a user-defined namespace prefix.
RESOLUTION
Rename the namespace prefix so that it does not begin with the xml keyword.
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
MORE INFORMATION
Steps to Reproduce Behavior
- Open a new file in Microsoft Notepad.
- Cut and paste the following XML code into Notepad:
<?xml version="1.0"?>
<Books xmlns:xmldt="My-Namespace">
<Book>
<xmldt:Title></xmldt:Title>
<xmldt:ISBN></xmldt:ISBN>
</Book>
</Books>
- Save the file as an XML file on your hard drive.
- Open the saved XML file in Internet Explorer, and note that the MSXML parser generates the error message in the "Symptoms" section of this article.
- Change the case of the xml keyword (uppercase and mixedcase) in the prefix name, and then save and open the XML file in Internet Explorer. Note that the same error message appears.
- Rename the namespace prefix so that it does not begin with the xml keyword. Save and open the XML file in Internet Explorer, and note the MSXML parser successfully loads the document in Internet Explorer and displays it by applying the default Extensible Stylesheet Language (XSL) stylesheet.
APPLIES TO
- Microsoft XML Parser 2.0
- Microsoft XML Parser 3.0
- Microsoft XML Core Services 4.0
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
Be the first to leave feedback, to help others about this knowledge base
article.
(Optional) Name
(Optional)
Public URL Or Email
Comments
No
HTML -- Text Only Please