[vodml] EnumLiterals and vodml-id

Markus Demleitner msdemlei at ari.uni-heidelberg.de
Tue Jan 12 15:40:32 CET 2016


Hi,

[my last mail to IVOA mailing lists today, promised]

On Tue, Jan 12, 2016 at 08:43:45AM -0500, CresitelloDittmar, Mark wrote:
> I'm not sure Marcus was voting against having a label as much as not sure
> where it would be used.  The pattern of having an enumeration literal with

Yes, that would be a fitting summary.

> a code and label seems pretty common and fits what we are talking about.
> The description field is not appropriate as that is more than just an
> alternate representation of the enum literal name.
> 
> For example, the SpectralBandType  (again)
>     name    label          description
>    OPTICAL  Optical      "0.3 microns <= wavelength <= 1 micron"
>    UV       UltraViolet  "100 Angstrom <= wavelength <= 3000 Angstrom"
>    XRAY     X-ray        "0.1 Angstrom <= wavelength <= 100 Angstrom"

So, the idea would be that name is used in code, whereas label ends
up in a UI?

Well... I am... not convinced :-)

Why?  Well, I can totally see VO-DML having a role in code
generation, e.g., producing enum declarations.  I'm *really* not
convinced we're doing VO-DML a favour if we add UI generation to what
we want from it.

If that's what we want, it should show up in the VO-DML standard
somewhere, and ideally we should have a halfway clear idea how to
come from VO-DML to what sort of UI.  I'm skeptical.  I'd rather
propose to leave the mapping from model to presentation to the
application.  But that could be because I've never built an
application on a data model, so I may be wrong.

If, on the other hand, the labels would be useful outside of UI
generation -- what are you thinking of there?

Cheers,

          Markus


More information about the dm mailing list