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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:31:29+00:00 2026-05-20T13:31:29+00:00

Learning XML Schema, I want to be able to have collections of elements inside

  • 0

Learning XML Schema, I want to be able to have collections of elements inside another element. Seems simple enough, not quite sure how to do it though.

This is the schema:

 <xs:attributeGroup name="ProcedureMappingFragment">
  <xs:attribute name="ParameterName" type="xs:string" />
  <xs:attribute name="TypeName" type="xs:string" />
  <xs:attribute name="PropertyName" type="xs:string" />

<xs:complexType name="ProcedureMappingSection">
  <xs:sequence>
    <xs:element name="ProcMapping" type="ProcedureMapping" /> 
  </xs:sequence>
</xs:complexType>

<xs:complexType name="ProcedureMapping">
  <xs:attributeGroup id="two" ref="ProcedureMappingFragment" />
    <xs:attribute name="ProcedureName" type="xs:string" />
</xs:complexType>

And I am trying to produce something like such:

<MappingSection xmlns="http://tempuri.org/ServiceMapping.xsd">
  <ProcMapping ParameterName="ParameterName1" TypeName="TypeName1" PropertyName="PropertyName1" ProcedureName="ProcedureName1" />
  <ProcMapping ParameterName="ParameterName1" TypeName="TypeName1" PropertyName="PropertyName1" ProcedureName="ProcedureName1" />
  <ProcMapping ParameterName="ParameterName1" TypeName="TypeName1" PropertyName="PropertyName1" ProcedureName="ProcedureName1" />
  <ProcMapping ParameterName="ParameterName1" TypeName="TypeName1" PropertyName="PropertyName1" ProcedureName="ProcedureName1" />
</MappingSection>

However it is telling me that I can only have one ProcMapping inside MappingSection. Specifically it is calling the 2nd ProcMapping element invalid for namespace MappingSection.

  • 1 1 Answer
  • 1 View
  • 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-20T13:31:30+00:00Added an answer on May 20, 2026 at 1:31 pm

    You need to set the minOccurs and maxOccurs. Since they have a default value of 1, only one element is allowed.

    So I would define:

    <xs:complexType name="ProcedureMappingSection">
       <xs:sequence>
          <xs:element name="ProcMapping" type="ProcedureMapping" maxOccurs="unbounded" /> 
       </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'm learning XML, currently of Wikibooks, but that is kinda huge and not oversee-able...
Learning xml, Can anyone help me? I have following XML code: **<book lang=en>name of
I'm still early on in learning XML schema, so hopefully this isn't too easy
I am learning about XML Attributes from W3Schools . The author mentions the following
I've been reading a ton about xml and learning a lot but I am
I am just learning about LINQ to XML in all its glory and frailty,
I'm just learning LINQ and in particular LINQ to XML, and I've written up
I am learning JPA. I read about persistence.xml file. It can contain more that
I am trying to learn about XML literals in VB. In a learning project
I have a crash (Application Stopped Unexpectedly) problem with this main.xml is a HelloWorld

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.