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

  • SEARCH
  • Home
  • 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 3497396
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:21:55+00:00 2026-05-18T12:21:55+00:00

In looking at the stanzaerror.xsd from http://xmpp.org/schemas/ in Visual Studio 2010, I’m getting a

  • 0

In looking at the stanzaerror.xsd from http://xmpp.org/schemas/ in Visual Studio 2010, I’m getting a warning on the following line…

<xs:attribute ref='xml:lang' use='optional'/>

Warning:

Namespace ‘http://www.w3.org/XML/1998/namespace‘ is not available to be referenced in this schema.

This seems like a very basic XML warning – any ideas?

<?xml version='1.0' encoding='UTF-8'?>    
<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='urn:ietf:params:xml:ns:xmpp-stanzas'
    xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'
    elementFormDefault='qualified'>

  <xs:element name='bad-request' type='empty'/>
  <xs:element name='conflict' type='empty'/>
  <xs:element name='feature-not-implemented' type='empty'/>
  <xs:element name='forbidden' type='empty'/>
  <xs:element name='gone' type='xs:string'/>
  <xs:element name='internal-server-error' type='empty'/>
  <xs:element name='item-not-found' type='empty'/>
  <xs:element name='jid-malformed' type='empty'/>
  <xs:element name='not-acceptable' type='empty'/>
  <xs:element name='not-allowed' type='empty'/>
  <xs:element name='not-authorized' type='empty'/>
  <xs:element name='payment-required' type='empty'/>
  <xs:element name='policy-violation' type='empty'/>
  <xs:element name='recipient-unavailable' type='empty'/>
  <xs:element name='redirect' type='xs:string'/>
  <xs:element name='registration-required' type='empty'/>
  <xs:element name='remote-server-not-found' type='empty'/>
  <xs:element name='remote-server-timeout' type='empty'/>
  <xs:element name='resource-constraint' type='empty'/>
  <xs:element name='service-unavailable' type='empty'/>
  <xs:element name='subscription-required' type='empty'/>
  <xs:element name='undefined-condition' type='empty'/>
  <xs:element name='unexpected-request' type='empty'/>

  <xs:group name='stanzaErrorGroup'>
    <xs:choice>
      <xs:element ref='bad-request'/>
      <xs:element ref='conflict'/>
      <xs:element ref='feature-not-implemented'/>
      <xs:element ref='forbidden'/>
      <xs:element ref='gone'/>
      <xs:element ref='internal-server-error'/>
      <xs:element ref='item-not-found'/>
      <xs:element ref='jid-malformed'/>
      <xs:element ref='not-acceptable'/>
      <xs:element ref='not-authorized'/>
      <xs:element ref='not-allowed'/>
      <xs:element ref='payment-required'/>
      <xs:element ref='policy-violation'/>
      <xs:element ref='recipient-unavailable'/>
      <xs:element ref='redirect'/>
      <xs:element ref='registration-required'/>
      <xs:element ref='remote-server-not-found'/>
      <xs:element ref='remote-server-timeout'/>
      <xs:element ref='resource-constraint'/>
      <xs:element ref='service-unavailable'/>
      <xs:element ref='subscription-required'/>
      <xs:element ref='undefined-condition'/>
      <xs:element ref='unexpected-request'/>
    </xs:choice>
  </xs:group>

  <xs:element name='text'>
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base='xs:string'>
          <xs:attribute ref='xml:lang' use='optional'/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>    

  <xs:simpleType name='empty'>
    <xs:restriction base='xs:string'>
      <xs:enumeration value=''/>
    </xs:restriction>
  </xs:simpleType>    
</xs:schema>
  • 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-18T12:21:56+00:00Added an answer on May 18, 2026 at 12:21 pm

    Just because you don’t need to declare the xml namespace for instance documents, doesn’t mean the same is true for schemas. I know that seems a bit odd but there it is. You need to define the xml:lang attribute and you need to declare the xml namespace. Generally, I use a simple schema that I import into my schemas. Use the one that the W3C has made available.

    Import that, declare the namespace. All will be well

    <xs:schema
        xmlns:xs='http://www.w3.org/2001/XMLSchema'
        xmlns:xml="http://www.w3.org/XML/1998/namespace" 
        targetNamespace='urn:ietf:params:xml:ns:xmpp-stanzas'
        xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'
        elementFormDefault='qualified'>
    
        <xs:import schemaLocation="http://www.w3.org/2001/xml.xsd" namespace="http://www.w3.org/XML/1998/namespace"/>
    
        <xs:element name='bad-request' type='empty'/>
        <xs:element name='conflict' type='empty'/>
        <xs:element name='feature-not-implemented' type='empty'/>
        <xs:element name='forbidden' type='empty'/>
        <xs:element name='gone' type='xs:string'/>
        <xs:element name='internal-server-error' type='empty'/>
        <xs:element name='item-not-found' type='empty'/>
        <xs:element name='jid-malformed' type='empty'/>
        <xs:element name='not-acceptable' type='empty'/>
        <xs:element name='not-allowed' type='empty'/>
        <xs:element name='not-authorized' type='empty'/>
        <xs:element name='payment-required' type='empty'/>
        <xs:element name='policy-violation' type='empty'/>
        <xs:element name='recipient-unavailable' type='empty'/>
        <xs:element name='redirect' type='xs:string'/>
        <xs:element name='registration-required' type='empty'/>
        <xs:element name='remote-server-not-found' type='empty'/>
        <xs:element name='remote-server-timeout' type='empty'/>
        <xs:element name='resource-constraint' type='empty'/>
        <xs:element name='service-unavailable' type='empty'/>
        <xs:element name='subscription-required' type='empty'/>
        <xs:element name='undefined-condition' type='empty'/>
        <xs:element name='unexpected-request' type='empty'/>
    
        <xs:group name='stanzaErrorGroup'>
            <xs:choice>
                <xs:element ref='bad-request'/>
                <xs:element ref='conflict'/>
                <xs:element ref='feature-not-implemented'/>
                <xs:element ref='forbidden'/>
                <xs:element ref='gone'/>
                <xs:element ref='internal-server-error'/>
                <xs:element ref='item-not-found'/>
                <xs:element ref='jid-malformed'/>
                <xs:element ref='not-acceptable'/>
                <xs:element ref='not-authorized'/>
                <xs:element ref='not-allowed'/>
                <xs:element ref='payment-required'/>
                <xs:element ref='policy-violation'/>
                <xs:element ref='recipient-unavailable'/>
                <xs:element ref='redirect'/>
                <xs:element ref='registration-required'/>
                <xs:element ref='remote-server-not-found'/>
                <xs:element ref='remote-server-timeout'/>
                <xs:element ref='resource-constraint'/>
                <xs:element ref='service-unavailable'/>
                <xs:element ref='subscription-required'/>
                <xs:element ref='undefined-condition'/>
                <xs:element ref='unexpected-request'/>
            </xs:choice>
        </xs:group>
    
        <xs:element name='text'>
            <xs:complexType>
                <xs:simpleContent>
                    <xs:extension base='xs:string'>
                        <xs:attribute ref='xml:lang' use='optional'/>
                    </xs:extension>
                </xs:simpleContent>
            </xs:complexType>
        </xs:element>
    
        <xs:simpleType name='empty'>
            <xs:restriction base='xs:string'>
                <xs:enumeration value=''/>
            </xs:restriction>
        </xs:simpleType>
    
    </xs:schema>
    

    I’m not that familiar with XMPP but I suspect that your schema is intended to be imported into another where the XML namespace will have already been declared.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking through the achievement list for Visual Studio 2010, it says that there is
Looking at the new spring property support in 3.1 ( http://blog.springsource.org/2011/02/15/spring-3-1-m1-unified-property-management/ ), it looks
Looking at a Get-WebFile script over on PoshCode, http://poshcode.org/3226 , I noticed this strange-to-me
Looking for feedback on : http://code.google.com/p/google-perftools/wiki/GooglePerformanceTools
Looking for C# class which wraps calls to do the following: read and write
Looking for a C++ async HTTP library so I can download some zip files
Looking for a better way of extracting a number from the last line in
Looking for simple php class routing, like this: http://fatfree.sourceforge.net/page/routing-engine Is there a ready-made solutions?
Looking to create my first MVC application. Coming from WebForms I'm pretty excited to
looking at the declaration for XDrawString from X11, it is int XDrawString(Display *display, Drawable

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.