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 594385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:56:52+00:00 2026-05-13T15:56:52+00:00

I have an XSD of this form: <?xml version=1.0 encoding=UTF-8?> <schema xmlns=http://www.w3.org/2001/XMLSchema targetNamespace=http://www.example.org/example xmlns:tns=http://www.example.org/example

  • 0

I have an XSD of this form:

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.example.org/example"
    xmlns:tns="http://www.example.org/example" elementFormDefault="qualified">

    <complexType name="bType">
    </complexType>

    <complexType name="aType">
        <choice maxOccurs="unbounded">
            <element name="a" type="tns:aType" />
            <element name="b" type="tns:bType" />
        </choice>
    </complexType>

    <element name="topelement">
        <complexType>
            <sequence>
                <element name="a" type="tns:aType" maxOccurs="1" />
            </sequence>
        </complexType>
    </element>
</schema>

And an XML file that I expect to match it, e.g:

<?xml version="1.0" encoding="UTF-8"?>
<topelement xmlns="http://www.example.org/example"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.example.org/example example.xsd ">
  <a> <!-- Error on this line. -->
    <a/>
    <b/>
    <b/>
    <a/>
  </a>
</topelement>

Unfortunately the XSD says that this is not valid with the following error:

cvc-complex-type.2.4.b: The content of element 'a' is not complete. One of '{"http://www.example.org/example":a, "http://www.example.org/example":b}' is expected.  example.xml line 5

As far as I can tell, I’ve done everything I need to do for the tag to be complete. I’ve filled it with an unbounded choice of ‘a’ and ‘b’ tags. Can anyone see what’s gone wrong?

To clarify, I want there to be only one ‘a’ tag under topelement, and underneath that, a mix of ‘a’ and ‘b’ tags.

  • 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-13T15:56:52+00:00Added an answer on May 13, 2026 at 3:56 pm

    Worked it out… The error is misleading because it’s complaining about the wrong ‘a’.

    Rename the top-level ‘a’ to ‘c’ and it still complains about ‘a’ on line 5.

    The fix is to add minOccurs=0 to the choice element so that not all ‘a’ elements need children.

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

Sidebar

Related Questions

I have this XML at http://localhost/file.xml : <?xml version=1.0 encoding=utf-8?> <val:Root xmlns:val=http://www.hw-group.com/XMLSchema/ste/values.xsd> <Agent> <Version>2.0.3</Version>
I have one xsd file I'd rather not modify (Exceptions.xsd): <xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema xmlns=http://me.com/Exceptions.xsd targetNamespace=http://me.com/Exceptions.xsd
I have this string : <meis xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance uri=localhost/naro-nei onded=flpSW531213 identi=lemenia id=75 lastStop=bendi xsi:noNamespaceSchemaLocation=http://localhost/xsd/postat.xsd xsd/postat.xsd>
hi i have an xml like this <?xml version=1.0?> <DataSetExchangeWMS xmlns=http://tempuri.org/DataSetExchangeWMS.xsd> <dtObjektInfo> <LanguageCode>1031</LanguageCode> <LiegenschaftID>7463</LiegenschaftID>
I have the following elements in my schema: <xs:schema attributeFormDefault=unqualified elementFormDefault=qualified xmlns:xs=http://www.w3.org/2001/XMLSchema> <xs:complexType name=optimizeModelBase>
I have a xml like this: <?xml version=1.0 encoding=utf-8?> <assessment xmlns=http://xml.thinkcentral.com/pub/xml/hsp/assessment xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xhtml=http://www.w3.org/1999/xhtml xmlns:tia=http://xml.thinkcentral.com/pub/xml/hsp/tia
It seems I can't easily have an XSD declaration for this simple XML <root>
I have this big doubt. When ever i use base64Binary in an .xsd schema
Here's my application-security.xml file: <?xml version=1.0 encoding=UTF-8?> <!-- - Sample namespace-based configuration - -
Hi I have xsd schema with base64Binary. when this plugin genereted this elemen looks

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.