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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:36:34+00:00 2026-06-14T05:36:34+00:00

How would I properly define my element RandomAmount_ //when RandomAmount can be RandomAmount_1 to

  • 0

How would I properly define my element RandomAmount_

//when RandomAmount can be RandomAmount_1 to RandomAmount_N

<xs:element name="RandomAmount">
   <xs:complexType>
       <xs:choice maxOccurs="unbounded" minOccurs="0">
            <xs:element type="xs:float" name="RandomAmount_" />
       </xs:choice>
   </xs:complexType>
 </xs:element>

I feel that RandomAmount should be named = ” RandomAmount_* ” to do the trick, but that doesn’t work.

  • 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-14T05:36:35+00:00Added an answer on June 14, 2026 at 5:36 am

    XSD element declarations must specify a single name for the element; there is no provision for families of names of the kind you apparently are looking for.

    It’s not clear what to advise you to do, mostly because it’s not clear why you want to have numbers in the names of your elements. If you want to return the value of a call to a random-number generator, by naming an element RandomAmount_1419 when the random number generator returns the value 1419, then I’d advise you just to name the element RandomAmount and return the value in the element’s content, or in an attribute.

    If on the other hand you want the numbers so that the children of the parent RandomAmount element will be named RandomAmount_1, RandomAmount_2, RandomAmount_3, etc., then my advice would still be the same: just give all the children the same name, and let your data be (for example):

    <RandomAmount>
      <amount>1419</amount>
      <amount>8676</amount>
      <amount>862</amount>
      <amount>7331</amount>
      <amount>7318</amount>
      ...
    </RandomAmount>
    

    There is no need to give the children different names; indeed, if all the children contain the same kind of information (I’m guessing from your naming that they contain random numbers), it’s almost always better practice not to give them different names. (If you need to be able to refer to the third number in the sequence, XPath has simple ways to do that; if you are mapping into an object system that cannot handle multiple child elements with the same name, get a better object mapping system.)

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

Sidebar

Related Questions

What would be the best way to properly concatenate string with an url inside?
i would like to define a list(List of Bank Customer) from predicate and process
In Javascript you can define an object with properties a and b like so:
I would like to define some properties in my logback.xml config file and saw
Is an event handler bound to an element, so you can trigger the event
Why would the Count property be an explicit interface implementation in System.Array? string[] a
I would like to use the MFMailComposeViewController mailComposeDelegate property with completion block syntax, but
I would like to put newlines in a property value of a manifest. Its
I would like to bind the boolean enabled property of an NSTextField to the
I would like to programmatically set maxLength property of TextView as I don't want

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.