Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   Re: Best way to handle a mutually exclusive situation (http://www.velocityreviews.com/forums/t164953-re-best-way-to-handle-a-mutually-exclusive-situation.html)

gabriel 06-25-2003 08:08 AM

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
something).

/Gabriel

"Rich Weed" <weed_richard@NOhotmSPAMail.com> 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





All times are GMT. The time now is 04:52 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.