W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2003

At least 1 element out of 4 is required

From: Camilla Brenchley <cbrenchley@transhotel.com>
Date: Thu, 31 Jul 2003 16:32:01 +0200
To: <xmlschema-dev@w3.org>
Message-ID: <JKEGLBMFMFBPIFCOOHHJKEFDCAAA.cbrenchley@transhotel.com>

Hi there,

I have a XML doc that looks like this:

<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>
   <country>some country</country>
   <area>some area</area>
   <city>some city</city>
   <hotel>some hotel</hotel>

I need to write an xml schema that checks that at least one of "Location"'s
four children (country, area, city, hotel) is present. I don't care which
one as long as one of them is there. The order of the child elements doesn't

I have searched and searched, and I'm almost beginning to believe this isn't
possible... Surely that's not the case?
Any help would be greatly appreciated.
Thanks in advance.

Received on Thursday, 31 July 2003 10:38:44 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:02 UTC