Fwd: Issues with the What section of the VOEvent-1.1 schema
Rob Seaman
seaman at noao.edu
Tue Feb 10 11:05:08 PST 2009
Begin forwarded message:
> From: Bob Denny <rdenny at dc3.com>
> Date: February 6, 2009 3:19:37 AM GMT-07:00
> To: Roy Williams <roy at cacr.caltech.edu>
> Cc: Rob Seaman <seaman at noao.edu>, Andrew Drake <ajd at cacr.caltech.edu>
> Subject: Re: Issues with the What section of the VOEvent-1.1 schema
>
> Roy W:
>> Thank you for your fine work in cleaning up the VOEvent schema. We
>> will
>> certainly tighten things up in VOEvent 2.0.
>>
>
> You're most welcome - I'm thrilled to be able to participate and add
> my two cents worth to this great project.
>
>> Missing out the dataType in the current spec was a mistake, and
>> needs to
>> be rectified in the new version. Without dataType, everything is a
>> string, and so we discover the embarrassing fact that "2" > "19" when
>> what we really meant was that 2 < 19 because they both have
>> dataType=int.
>
> I've been thinking about this... I haven't run into any issues in
> processing Params without a dataType attribute, using a variety of
> languages such as Javascript/ECMA, C$#, and C++. The presence of a
> unit="xxx" implies a numeric quantity, and I can't see a strong case
> for differentiating between integers and real numbers in the
> value="nnn" attribute. Yes, the GCN packets have Params with
> numeric quantities and no unit="xxx", and this could be a problem!
> The simple solution would be to require unit="xxx" on all numeric
> Params. Then you could differentiate between strings and numbers,
> which is all that's really needed, in my opinion. Additionally...
>
> Param contains all of its info as XML attributes. This prevents
> schema-driven validation and conversion of the values. But since
> Param can contain both numbers and strings, it couldn't be validated
> even if the value were expressed as <Param name="foo"
> unit="mag">19.5</Param> because you could also have <Param
> name="bar">Hello</Param> so in the schema the type would have to be
> 'any' any-way. You can't use an XML engine and schema to validate
> and convert a value based on an attribute like "dataType" either. So
> no matter what, in the end, your code has to know about specific
> Params and the types their values are supposed to have. And one
> could argue that this means you don't need dataType as well, if you
> get my drift...
>
> -- Bob
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ivoa.net/pipermail/voevent/attachments/20090210/369f8807/attachment-0001.html>
More information about the voevent
mailing list