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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:22:39+00:00 2026-06-05T06:22:39+00:00

Hi I keep having this error while I try to valide a qti xml

  • 0

Hi I keep having this error while I try to valide a qti xml document.
Here is the xml document:

     <respcondition title="Correct" >
      <conditionvar>
       <not>
         <varequal respident="1">A</varequal>
       </not>
       <varequal respident="1">B</varequal>
       <not>
            <varequal respident="1">C</varequal>
       </not>
      <varequal respident="1">D</varequal>
      </conditionvar>
        <setvar action="Set">1</setvar>
       <displayfeedback linkrefid="Correct"/>
     </respcondition>

Here is the fragment of xsd that valide the xml

       <!-- ******************* -->
            <!-- ** respcondition ** -->
             <!-- ******************* -->
               <xs:complexType name="respconditionThirdPartyType">
               <xs:sequence>
                 <xs:element name="conditionvar" type="conditionvarThirdPartyType"   maxOccurs="1"/>
                 <xs:element name="setvar" type="setvarThirdPartyType" minOccurs="0" maxOccurs="unbounded"/>
                <xs:element name="displayfeedback" type="displayfeedbackThirdPartyType" minOccurs="0" maxOccurs="unbounded"/>
              </xs:sequence>
            <xs:attribute name="title" type="xs:string"/>
      </xs:complexType>


     <!-- ****************** -->
      <!-- ** conditionvar ** -->
       <!-- ****************** -->
       <xs:complexType name="conditionvarThirdPartyType">
          <xs:sequence>
           <xs:choice>
              <xs:element name="not" type="notThirdPartyType" minOccurs="0" maxOccurs="unbounded"/>
             <xs:element name="or" type="orThirdPartyType" minOccurs="0" maxOccurs="unbounded"/>
             <xs:element name="other" type="otherThirdPartyType" minOccurs="0" maxOccurs="unbounded"/>
           </xs:choice>
        <xs:element name="varequal" type="varequalThirdPartyType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
       </xs:complexType>

      <!-- ********* -->
        <!-- ** not ** -->
       <!-- ********* -->
      <xs:complexType name="notThirdPartyType">
          <xs:sequence>
             <xs:element name="varequal" type="varequalThirdPartyType"  minOccurs="0" maxOccurs="unbounded" />
         </xs:sequence>
       </xs:complexType>



      <!-- ************** -->
      <!-- ** varequal ** -->
      <!-- ************** -->
      <xs:complexType name="varequalThirdPartyType">
         <xs:simpleContent>
            <xs:extension base="xs:string">
               <xs:attribute name="respident" type="xs:string" use="optional"/>
               <xs:attribute name="case" default="No">
               <xs:simpleType>
           <xs:restriction base="xs:NMTOKEN">
               <xs:enumeration value="Yes"/>
              <xs:enumeration value="No"/>
          </xs:restriction>
         </xs:simpleType>
       </xs:attribute>
      </xs:extension>
     </xs:simpleContent>
     </xs:complexType>

The element ‘conditionvar’ in namespace ‘test.xsd’ has invalid child element ‘varequal’ in namespace ‘test.xsd’. List of possible elements expected: ‘not’.
The element cannot contain white space. Content model is empty.
The element cannot contain white space. Content model is empty.
The element ‘conditionvar’ in namespace ‘test.xsd’ has invalid child element ‘not’ in namespace ‘test.xsd’. List of possible elements expected: ‘varequal’.

Please can anyone help? I’ve been trying to fix this for for a few days now..
Thanks
Cheers

Found the answer:

Ok I’ve found the answer. i’ve changed conditionvar definition. Now it’s working. Thanks you all for your help

 <!-- ****************** -->
 <!-- ** conditionvar ** -->
  <!-- ****************** -->
 <xs:complexType name="conditionvarThirdPartyType">
 <xs:sequence minOccurs="0" maxOccurs="unbounded">
  <xs:choice  minOccurs="0" maxOccurs="unbounded">
    <xs:element name="not" type="notThirdPartyType" />
    <xs:element name="or" type="orThirdPartyType" />
    <xs:element name="other" type="otherThirdPartyType" />
  </xs:choice>
  <xs:element name="varequal" type="varequalThirdPartyType"   minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>

Thanks for your help.

  • 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-06-05T06:22:41+00:00Added an answer on June 5, 2026 at 6:22 am

    According to your schema, in your <conditionvar> element, either <not> or <or> or <other> is expected. Whichever it is, it may occur zero or more times (minOccurs="0" maxOccurs="unbounded"). However, the <choice> element must be there exactly once, as minOccurs and maxOccurs aren’t set for it (default value is 1 for each). This is followed by zero or more <varequal> elements.

    As I am not sure what you intend to consider valid, I cannot provide a definitive corrected schema fragment, but I think that you actually want to set minOccurs="0" maxOccurs="unbounded" for your <sequence> element in conditionvarThirdPartyType, as in so:

    <xs:complexType name="conditionvarThirdPartyType">
        <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:choice>
                <xs:element name="not" type="notThirdPartyType"/>
                <xs:element name="or" type="orThirdPartyType"/>
                <xs:element name="other" type="otherThirdPartyType"/>
            </xs:choice>
            <xs:element name="varequal" type="varequalThirdPartyType"/>
        </xs:sequence>
    </xs:complexType>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I keep getting this error with HG (Mercurial), it seems like it's having a
I keep having this error when I'm trying to integrate Spring JMS into my
I'm having this problem where I keep getting this error in my console: *
I keep having an error when running my web application. The error does not
I'm having trouble getting my validation to act correctly. I keep getting the error
Keep getting this error after inserting a subdatasheet into a query and trying to
I'm having an issue while trying to generate some Java classes. C:\Users\kon\Desktop>wsimport -keep -verbose
I am having some issues with my code, and keep getting the same error,
Question: Why do I get this error while scanning a users 'My Documents' folder,
There are a few other questions about this error, but I'm having a hard

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.