We (ACORD) also had a need for a rule like this. We would note the
regular choice as an XOR (exclusive OR) and this rule as OR (inclusive
OR). We then used an algorithm to expand this into a more complex set of
choices.
So if I had the OR of the following (A OR B OR C OR D) where at least
one is required, but all could appear, this would map to XML as ((A, B?,
C?, D?) | (B, C?, D?) | (C, D?) | D)
Ugly but I think it gives you what you want. It would be nice if this
construct got added to schemas, but DTDs would not be able to handle it
directly. I think we may have actually inherited this from IFX.
..dan
> -----Original Message-----
> From: Tim McGrath [mailto:]
> Sent: Thursday, August 11, 2005 1:38 PM
> To: Anne Hendry
> Cc:
> Subject: Re: [ubl] use of 'ID' in documents
>
> this comes from trying to implement a rule that goes along the lines
of...
>
> "all documents must have an ID. However with some documents (eg
Order)
> it may be either the BuyersID and/or the SellersID"
>
> unfortunately we dont have schema (or spreadsheet) syntax for "either
> are optional but one must be used" - which is actually a common rule
in
> the real world. What we have don is the best we can.
>
> Anne Hendry wrote:
>
> > We notice that some documents contain an 'ID' element. The 'ID'
> > elements seem to be mandatory. The documents that don't have 'ID'
> > seem to have 'BuyersID' and 'SellersID', but those are optional.
> >
> > Is this an intended modeling aspect that assumes in the documents
that
> > don't have 'ID' the users would implement either a BuyersID or
> > SellersID, even though they are both optional? Do we want to
> > duplicate this model for new documents? When do you determine you
> > want a mandatory ID vs. two optional Buyers|Sellers IDs?
> >
> > Thanks,
> > Anne
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe from this mail list, you must leave the OASIS TC that
> > generates this mail. You may a link to this group and all your TCs
in
> > OASIS
> > at:
> >
https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
> >
>
> --
> regards
> tim mcgrath
> phone: +618 93352228
> postal: po box 1289 fremantle western australia 6160
>
> DOCUMENT ENGINEERING: Analyzing and Designing Documents for Business
> Informatics and Web Services
>
http://mitpress.mit.edu/catalog/item/default.asp?sid=632C40AB-4E94-4930-
> A94E-22FF8CA5641F&ttype=2&tid=10476
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this mail list, you must leave the OASIS TC that
> generates this mail. You may a link to this group and all your TCs in
> OASIS
> at:
> https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php