OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

ubl-ndrsc message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Container generation for 0 .. n elements


The current rule is for 1 to many:

Address  1 or more

Would have the following:

AddressList	1
	Address	1 or more

In DTDs this would be:

<!ELEMENT AddressList (Address)+ >

And where ever Address was used parent items will now use AddressList and 
it will be a required element.

The primary "problem" that was documented in the minutes was that the rule 
as proposed would potentially cause an EMPTY element if the container is 
required and the contents remain optional.  To handle this, but still have 
the same positive results of using containers, the 0 to many, the rule 
would be modified as follows:

1) Create a container with elementnameList and make it 0 or 1
2) Content of the container cardinality would be changed to 1 or more

So if I have the following:

Children	0 or more

and

Parent contains Children

I would propose this

ChildrenList	0 or 1
	Children	1 or more

So we would have this:

<!ELEMENT ChildrenList	(Children+) >
<!ELEMENT Parent	(a, ChildrenList?, b) >

This design, still allows a Parent to not have any Children, because the 
container is optional, but if the container is used, then there has to be 
at least one Children element sent. The end result is that Children is 
optional repeating in the data stream.

..dan



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]