Re: Best way to handle a mutually exclusive situation
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
"Rich Weed" <weed_richard@NOhotmSPAMail.com> skrev i meddelandet
> 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
> Approach 1 -- Set up schema to allow only one of 'Physician',
> 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):
> TIA, RW
> Remove NO SPAM to reply
|All times are GMT. The time now is 03:29 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.