Re: Datatype constraints in DCDs

Dean Roddey (roddey@us.ibm.com)
Fri, 9 Oct 1998 14:09:50 -0400


><AttributeDef Name=3D"Colour" Datatype=3D"string">
> <ValidIf rule=3D"Equals" value=3D"Red"/>
> <ValidIf rule=3D"Equals" value=3D"Green"/>
> <ValidIf rule=3D"Equals" value=3D"Blue"/>
></AttributeDef>
>

It looks like the consensus is definitely that the more wordy XML encod=
ing of
the constraint information is preferable. And I'm not too stressed out =
about
that, since I won't be the one reading them anyway :-) But I would ques=
tion the
above scheme for enumerations. There was some desire to replace the pro=
posed
DCD enumeration mechanism, but I think the above scheme would get way w=
ordy
just to (for instance) check that something was one of the months of th=
e year,
one of the possible XML encodings, one of the countries of the world, e=
tc...
I'd definitely like to have some way to get the possible values all int=
o some
slightly less versbose chunk. Even if human convenience is not an issue=
,
bandwidth still remains a concern, right?

I'd almost, in the name of reuse, argue for an EnumDecl that defined su=
ch enums
for reuse by name, though someone might easily poke holes in that argum=
ent
because I've not thought it out.

----------------------------------------
Dean Roddey
Software Weenie
IBM Center for Java Technology - Silicon Valley
roddey@us.ibm.com
=