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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:31:48+00:00 2026-06-01T12:31:48+00:00

Would this be the correct way of declaring that an XML element Cluster contains

  • 0

Would this be the correct way of declaring that an XML element Cluster contains (1 or more instances of) a single XML element type Node:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Cluster" type="Node" minOccurs=2>
    </xs:element>

    <xs:element name="Node"/>
    </xs:element>
</xs:schema>

The textbook that I’m studying and all the online resources that I have come across exclusively discuss more complex arrangements involving <xs:complex> , which I suspect are overkill in this case.

  • 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-01T12:31:50+00:00Added an answer on June 1, 2026 at 12:31 pm

    Actually, your XSD is riddled with all sorts of problems. Try to use a decent XSD/XML editor, it should help you more than you think.

    Problems:

    • cardinality attributes (min/max Occurs) are not applicable to global element declarations.
    • if you reference a type, you should have a definition of that type, simple or complex, somewhere.

    I would start with a sample XML, since you know that already:

    <Cluster>
        <Node>node1</Node>
        <Node>node2</Node>
    </Cluster>
    

    Then you could use the decent tool to generate the XSD, a subject that’s more complicated than the simple XML you just visualized:

    <?xml version="1.0" encoding="utf-8"?>
    <!--W3C Schema generated by QTAssistant/W3C Schema Refactoring Module (http://www.paschidev.com)-->
    <xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:element name="Cluster">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element maxOccurs="unbounded" name="Node" type="xsd:string" />
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>
    

    There you could see the maxOccurs, and then change it to the value you wanted. As you become more familiar with the XSD syntax, you can start edit the working XSD into something that makes more sense; in the end, the XSD inferrence may not always be crowd pleasing…

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

Sidebar

Related Questions

What is the correct way to do this? For example, how would I change
Which would be the correct format for this XML data, are they equivalent or
would this be a correct way extract the algorithm specific values from a pgp
would this be the correct way to display the number or records in a
Would this Android code be a correct way to test for http network availability
Is this code correct? I'm trying to submit it and also I would like
Would this be a proper way to dispose of a BackGroundWorker? I'm not sure
Why would this statement return true? I understand that I'm comparing a Date to
Example: I am wondering what would be the correct way to code an un-ordered
What is the correct way to get a control that was rendered by ASP.NET

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.