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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:09:15+00:00 2026-05-12T23:09:15+00:00

I am designing a new XSD to capture points information from a business partner.

  • 0

I am designing a new XSD to capture points information from a business partner. For each transaction the partner must provide a value of points for at least one points type. I have the following:

<xs:element name="Points">
   <xs:complexType>
      <xs:sequence>
         <xs:element name="SKUPointsQty" type="xs:int" minOccurs="0"/>
         <xs:element name="WelcomePointsQty" type="xs:int" minOccurs="0"/>
         <xs:element name="ManualPointsQty" type="xs:int" minOccurs="0"/>
         <xs:element name="GreenPointQty" type="xs:int" minOccurs="0"/>
      </xs:sequence>
   </xs:complexType>
</xs:element>

The business rules are:

  • a transaction must provide points from one or more of the points type
  • a transaction cannot provide more than one instance of the same points type

What I have so far is not ideal because it would be possible to provide an XML instance without any points. I can’t use a choice element because it must be possible to provide an XML instance with more that one points type element. The same point type must not be repeated for a single transaction.

Is it possible to enforce this rule in the design of the XSD?

I have a copy of the excellent XML Schema Companion by Neil Bradley. I can’t find the answer in there so I guess it’s not possible but thought I’d share the puzzle!

Thanks

Rob.

  • 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-05-12T23:09:16+00:00Added an answer on May 12, 2026 at 11:09 pm

    I think this kind of constraint logic is beyond XSD. Here are three techniques for checking instance documents for constraints that are not expressable by XML Schemas.

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

Sidebar

Related Questions

I am designing a new dynamic site from a static site. I have the
I am designing new website Jopixels to provide free themes for Twitter Bootstrap. Bootsrap
I am designing a new website from scratch and wondered what cons could have
I am designing a new website (for now it's far from anything) but I
If I were designing a new system, should I have each function open and
Designing a new system from scratch. I'll be using the STL to store lists
While designing a new WPF application I noticed exceptions not being thrown during data
I'm designing a new protocol called DITP. It is a connection oriented protocol that
I am designing a new laboratory database. I want to store the raw results
I'm designing a new web application and I'm aware that the process of registration

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.