Re: Best way to handle a mutually exclusive situation

Discussion in 'XML' started by gabriel, Jun 25, 2003.

  1. gabriel

    gabriel Guest

    It's just a design question.. do as you like pretty much.
    Keep in mind though, that if you go with option 3 it will be easiest to
    expand it later on, if you for instance want subelements to the chosen
    proffession (maybe how long they have worked in that proffession or
    something).

    /Gabriel

    "Rich Weed" <> skrev i meddelandet
    news:Xns93A3DA154399EweedrichardNOhotmSPA@24.24.2.166...
    >
    > Hi all,
    > I'm just getting into XML, so I'll have a lot of these newb questions, if
    > you don't mind...
    >
    > I have a situtation where a user has to pick one of a set of items...in
    > this case, a medical profession. What's the best way to represent this in
    > XML?
    >
    > Approach 1 -- Set up schema to allow only one of 'Physician',

    'Podiatrist',
    > and 'Chiropractor' in an element:
    >
    > <Profession>Physician</Profession> (Note: I would probably use a
    > standardized code instead of the profession spelled out)
    >
    > Approach 2 -- Similar to #1, but use an attribute:
    >
    > <Profession type="Physician"/>
    >
    > Approach 3 -- Set up schema to allow only one of the following elements
    > (this is how I currently have it):
    >
    > <Physician/>
    > <Podiatrist/>
    > <Chiropractor/>
    >
    >
    > TIA, RW
    >
    >
    > --
    > Remove NO SPAM to reply
     
    gabriel, Jun 25, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ALuPin

    Mutually exclusive

    ALuPin, Sep 7, 2004, in forum: VHDL
    Replies:
    2
    Views:
    773
    Mike Treseler
    Sep 7, 2004
  2. js
    Replies:
    2
    Views:
    918
  3. Stimp
    Replies:
    2
    Views:
    818
    Stimp
    Oct 24, 2005
  4. Stimp
    Replies:
    5
    Views:
    6,016
    Greg Burns
    Nov 8, 2005
  5. Replies:
    0
    Views:
    644
Loading...

Share This Page