- From: Michael Kay <mike@saxonica.com>
- Date: Tue, 24 Aug 2010 09:05:57 +0100
- To: "McBride, David" <dmcbride@quicinc.com>
- CC: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Received on Tuesday, 24 August 2010 08:06:27 UTC
On 23/08/2010 17:39, McBride, David wrote: > > I'm having difficulties defining a logical relationship within a > complex type. The complex type contains 4 sub-elements. Let's call > them A, B, C, D. The logical relationship is this: > > 1. One, or more of elements B, C, or D are required. > > 2. There may be zero or more instances of element A. > > 3. Element A may never be the only element. In other words, there may > only be an instance of A, if there is also at least one instance of B, > C, or D. > > If I was just dealing with B, C, and D, I could handle that. However, > adding the requirements for A has thrown me. > > Thanks for any responses, in advance. > Are there any ordering constraints? If not, I would think this is stretching XSD 1.0 to the limits. It's obviously easy using XSD 1.1 assertions. Michael Kay Saxonica
Received on Tuesday, 24 August 2010 08:06:27 UTC