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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:26:33+00:00 2026-06-11T16:26:33+00:00

I have a couple problems with generating XML Schema for an XML document. The

  • 0

I have a couple problems with generating XML Schema for an XML document. The XML document should look like this:

<HEADER>
    <ID>64639</ID>
    ....
    <INCIDENT>
        <HEADER>64639</HEADER>
    </INCIDENT>
    <INCIDENT>
        <HEADER>64639</HEADER>
    </INCIDENT>
    ....
</HEADER>

So far I achieved the following structure:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
        elementFormDefault="qualified">

<xsd:element name="HEADER">
    <xsd:complexType>
        <xsd:all>
            <xsd:element minOccurs="1" name="ID" nillable="false" type="xsd:integer"/>
        </xsd:all>
    </xsd:complexType>
    <xsd:key name="SYS_C0032500">
        <xsd:selector xpath="."/>
        <xsd:field xpath="ID"/>
    </xsd:key>
    <xsd:keyref name="SYS_C0032500_HEADER.ID_INCIDENT.HEADER_" refer="SYS_C0032500">
        <xsd:selector xpath="INCIDENT"/>
        <xsd:field xpath="HEADER"/>
    </xsd:keyref>
</xsd:element>

<xsd:element name="INCIDENT">
    <xsd:complexType>
        <xsd:all>
            <xsd:element minOccurs="1" name="HEADER" nillable="false" type="xsd:integer"/>
        </xsd:all>
    </xsd:complexType>
    <xsd:key name="IDK">
        <xsd:selector xpath="."/>
        <xsd:field xpath="HEADER"/>
    </xsd:key>
</xsd:element>

</xsd:schema>

The criteria of this task to use the and elements to simulate database constraints. Currently I get an error message that says:

Engine name: Xerces
Severity: error
Description: cvc-complex-type.2.4.d: Invalid content was found starting with element ‘INCIDENT’. No child element is expected at this point.
Start location: 3:6
End location: 3:14
URL: http://www.w3.org/TR/xmlschema-1/#cvc-complex-type

My other problem comes with the more INCIDENT parts. How can I add more INCIDENT elements, when the has no maxOccurs attribute?

Thanks for every help!

Regards,
Joe

  • 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-11T16:26:35+00:00Added an answer on June 11, 2026 at 4:26 pm

    In your example instance document, the content model for HEADER appears to be “an ID followed by one or more INCIDENTs”. In XSD that is:

    <xsd:element name="HEADER">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="ID" nillable="false" type="xsd:integer"/>
                <xsd:element name="INCIDENT" minOccurs="1" maxOccurs="unbounded" type="..."/>
            </xsd:all>
        </xsd:complexType>
        ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had a look at cx_Oracle but I have a couple of problems with
i have a couple of problems with cfwheels (n:m relationsship) here my database schema
I have a couple other pages on the website that have no problems with
We have a couple of sites which have some memory problems and fairly often
Hello i am having some problems generating random numbers with C# Now i have
I have a couple of problems using facebook graph api. 1). When i try
I have a couple of problems. I'm creating a form inside a table, from
I have a couple of problems when doing blending in WebGL. One of them
I'm getting closer but still have a couple of problems laying out some css.
I have a couple problems understanding how redirect or rather reverse really work. In

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.