[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [ubl-ndrsc] Containers
Chin Chee-Kai wrote: > On Fri, 16 May 2003, Eduardo Gutentag wrote: > > >>>Tim, regarding lists: >>> >>>the idea is that if there is an element of name Name and cardinality 1..n >>>in the spreadsheet it is safe to enclose it in a list of name NameList. >>>However, elements of cardinality 0..n should not, because you would then >>>end up with possibly empty Lists, which is not what anybody wants. > > > Agree, dont wanna have a lot of empty baggages carried around. > > > >>>We >>>did look at the spreadsheet, and we did verify that only those that >>>have cardinality of 1..n are the ones one would definitely say are >>>candidates for list items. > > > But what about doc instances of types (present or future ones) > with cardinality permitting 0..n, but whose instances have > non-zero (say, 10) repetitions? Such occurences will appear > the same as instances of types with cardinality permitting 1..n yes, but... > with 10 repetitions. We'd then have a situation where one > group of 10 repetitions is contained, while another group of > 10 repetitions isn't contained in the instance document. yes, but... > > Or could the container for cardinality 0..n be itself of > cardinality 0..1 (0 if instance content is 0 cardinality, > 1 otherwise) instead of 1..1 (always has) or 0..0 (never has)? Hm, must think about this. Think, think, think...Well, I think it's a good idea, but not enforceable. I don't think there is any way to say, in XSD, that an instance is valid if and only if a given kind of list container does not appear in the instance when what it could contain does not appear, and does appear otherwise...IOW, there's no way to specify that it's optional under some circumstances but mandatory under others... Better let the user realize that having a container around order items makes sense while having one around possible street lines does not... > > > > >>>The lists themselves should be of cardinality 1..1, otherwise you may >>>end up with no container to put the list items in. Or you end up with >>>a really ambiguous schema where you can either have List items >>>scattered by themselves OR a container with the List items. Ugh. > > > Agree, too. > > > > > Best Regards, > Chin Chee-Kai > SoftML > Tel: +65-6820-2979 > Fax: +65-6743-7875 > Email: cheekai@SoftML.Net > http://SoftML.Net/ > -- Eduardo Gutentag | e-mail: eduardo.gutentag@Sun.COM Web Technologies and Standards | Phone: +1 510 550 4616 x31442 Sun Microsystems Inc. | 1800 Harrison St. Oakland, CA 94612 W3C AC Rep / OASIS TAB Chair
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]