XML Schema - Must select at least two out of three

J

Jim Mellish

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
 
S

Stan Kitsis [MSFT]

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top