Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6105255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:57:24+00:00 2026-05-23T13:57:24+00:00

I have a rather fundamental question about XML here. When declaring an element’s xmlns

  • 0

I have a rather fundamental question about XML here. When declaring an element’s xmlns attribute, is it ever legal to use http://www.w3.org/2001/XMLSchema? And when declaring the xmlns:xsi attribute, is it legal to use http://www.w3.org/2001/XMLSchema-instance as the value?

I ask this because I have seen XML auto-generated by some XML editors which references these namespaces, and yet (at least on the XMLSchema-instance page) W3C says that “This schema should never be used as such: the XML Schema Recommendation forbids the declaration of attributes in this namespace”.

So I’m confused; is it always illegal to say something like:

<?xml version="1.0" encoding="UTF-8"?>
<myElement xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    [...]
</myElement>

… and if not, why does W3C seem to say that the namespace should never be used? What would one use it for? I’ve tried to read the XML 1.0 spec but it’s extremely verbose and difficult to understand.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:57:25+00:00Added an answer on May 23, 2026 at 1:57 pm

    That namespace should not be used for anything else. It must be used to reference the attributes declared within that namespace.

    You may not declare any elements or attributes within a namespace that belongs to someone else. This means you may not declare your myElement within the “XMLSchema” namespace.


    <?xml version="1.0" encoding="UTF-8"?> 
    <root xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <genericElement xsi:type="xs:string">string</genericElement>
    </root>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question which seems to be rather fundamental but I can't seem
I have rather simple, I imagine, question about CRTP , but I cannot seem
I have rather large input XML files that must be converted to a given
I have a rather large file (150 million lines of 10 chars). I need
We have a rather simple site (minimal JS) with plain html and CSS. It
I have a rather classic UI situation - two ListBoxes named SelectedItems and AvailableItems
I have a rather weak understanding of any of oracle's more advanced functionality but
We have a rather large SVN repository. Doing SVN updates are taking longer and
I have a rather big number of source files that I need parse and
I have a rather complex decorator written by someone else. What I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.