Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XML Schema - Must select at least two out of three

Reply
Thread Tools

XML Schema - Must select at least two out of three

 
 
Jim Mellish
Guest
Posts: n/a
 
      02-15-2005
I am trying to put together a schema with some validation on addresses. Three
of the address fields are Flat, HouseName and HouseNumber. I have to ensure
that at least two of the three or all three are present. The only way I can
see to do this is to have a choice between:

Flat and HouseName
Flat and HouseNumber
HouseName and HouseNumber
Flat and HouseName and HouseNumber

I guess this is ok for two out of three but what if I had two out of ten ? Is
there a better way to do this ?

Jim

 
Reply With Quote
 
 
 
 
Stan Kitsis [MSFT]
Guest
Posts: n/a
 
      02-18-2005
Hi Jim,

There is no other way to do it in XML Schema

--
Stan Kitsis
Program Manager, XML Technologies
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

"Jim Mellish" <(E-Mail Removed)> wrote in message
news:4rvQd.2019469$(E-Mail Removed)...
>I am trying to put together a schema with some validation on addresses.
>Three
> of the address fields are Flat, HouseName and HouseNumber. I have to
> ensure
> that at least two of the three or all three are present. The only way I
> can
> see to do this is to have a choice between:
>
> Flat and HouseName
> Flat and HouseNumber
> HouseName and HouseNumber
> Flat and HouseName and HouseNumber
>
> I guess this is ok for two out of three but what if I had two out of ten ?
> Is
> there a better way to do this ?
>
> Jim
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Three Mobile --> Skype on three (Non-three [Symbian - Nokia] handsets) Harry Stottle UK VOIP 0 01-05-2010 08:59 AM
Need regular expression for at least 7 characters and at least 1 special chatacter AAaron123 ASP .Net 0 10-03-2008 01:25 PM
web.xml / XML schema issue, why do some XML schema attributes disappear asciz@starmail.com Java 3 02-20-2007 09:56 AM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
Using XML Schema to Force At Least One Item? Kenneth Love XML 2 04-01-2005 07:05 PM



Advertisments