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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:02:35+00:00 2026-06-11T17:02:35+00:00

Apologies if this question is too open ended, and would be better asked somewhere

  • 0

Apologies if this question is too open ended, and would be better asked somewhere else.

I’m currently in discussions about schema design for XML schemas representing sets of questionnaires. The questionnaires are reasonably similar, and contain questions which have a few attributes:

  • Question unique ID
  • Question title
  • Question answer type (text, numeric, date etc.)
  • Answer value

We capture answers to the questionnaires through a website, and now need to send them to other parties via XML messages. I am wondering about the pros and cons of sending XML documents representing filled out questionnaires in:

  1. A ‘repeating and flexible’ format like this:

    <Questionnaire>
        <Questions>
            <Question>
                <QuestionId>1234</QuestionId>
                <Name>Interviewee</Name>
                <Answer>Joe Bloggs</Answer>
            </Question>
            <Question>
                <QuestionId>1235</QuestionId>
                <Name>Date of birth</Name>
                <Answer>1980-03-15</Answer>
            </Question>
            ...
        </Questions>
    </Questionnaire>
    
  2. A more rigid format:

    <Questionnaire>
        <Interviewee>Joe Bloggs</Interviewee>
        <DateOfBirth>1980-03-15</DateOfBirth>
        ...
    </Questionnaire>
    

There are few enough questionnaires that creating a separate XSD each time a new one was produced probably wouldn’t cause too large a headache.

My thoughts are that the second would be much easier to validate, and as the questions have types these would map nicely to schema data types. However the first would naturally be easier to produce from our underlying representation of the questions when we capture responses via the website.

Are there any general best practices for these kind of design decisions, or an obvious reason why one approach would cause fewer headaches than the other, or does this really just depend on the particular set of data being represented and how it will be processed?

  • 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-11T17:02:36+00:00Added an answer on June 11, 2026 at 5:02 pm

    I believe that your question is just the same as abstract vs. concrete, or key/value pair vs. structure, etc. I also think that it is not that specific to XML, as it would equally present itself to an OO programmer; or a database designer; asking about a best practice is the same as asking about the best religion…

    Let’s look at your options:

    Option 1 is a metamodel: it describes what a question is. Option 2 is a model: it describes what you’re asking.

    Option 1 is the sys schema in every database. Option 2 is the user defined schema in a particular database.

    Option 1 is “technical”: is about IT folks building great infrastructure for questionnaires. Option 2 is all about the “business” the questionnaire is about.

    One issue is that 1 is more verbose than 2 (runtime overhead); 2 requires more upfront analysis about what are we asking (design-time overhead). 1 is better positioned to accommodate new questions or extending what a question is about, e.g. a difficulty level or how long it took to get an answer (extensibility). The XSD for 2 is self-contained and self-describing of how to properly consume an instance XML (usability of the spec).

    In my experience, ability to implement cheap, and manage change cheap, is very important (cost of ownership); unfortunately, these may also be perceived differently by providers and consumers of services. Finding that sweet spot, a practicable design – your question basically – will need to take more into account, along the lines I’ve tried to describe above.

    Strictly speaking to some of the issues you mentioned about Option 1: strong typing, as an example, could be alleviated by using simple choices or a substitution group. However, this kind of stuff will not substantially change any of what I said.

    Considering the above then, I’ll annotate your question, to put things right where they belong.

    Are there any general best practices for these kind of design decisions see my reference in choosing a “religion”, or an obvious reason why one approach would cause fewer headaches than the other it all depends on many more things which you didn’t mention, or does this really just depend on the particular set of data being represented and how it will be processed yes, to a high degree?

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

Sidebar

Related Questions

All, Apologies in advance - this question might be too open-ended for SO. Anyway...
Apologies if this is too ignorant a question or has been asked before. A
My apologies if this question has been asked before. I can see there are
Apologies for the open endedness of this question, but I really don't know what
My apologies if this question is too general, as this is my first time
My apologies if this is too subjective of a question. I have a theory
If this question is too broad, my apologies. I am a DBA and I
My apologies if this is too simple a question, I was unable to google
I'm not into bits and bytes too much, so my apologies if this question
Apologies if this is a too basic question but I couldn't find any satisfactory

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.