SSAP sample files

Mark Taylor m.b.taylor at bristol.ac.uk
Wed Feb 2 02:59:39 PST 2005


On Tue, 1 Feb 2005, Ivo Busko wrote:

> Folks,
> 
> I am about to release a new version of Specview with
> the ability to write spectrograms in SSAP format. 
> 
> However, before I do that, I would greatly appreciate
> any comments, cristicisms and the like from the experts
> out there. 
> 
> I tried to follow the specs in the SED Data  Model v 0.92.
> I am sure there are things that are missing, misinterpreted 
> by me, or plainly wrong, in my implementation. Thus, before 
> releasing flawed code, it would be of great help to hear 
> what people have to say about the files created by Specview.
> 
> To that end, I put a few samples at
> 
> http://specview.stsci.edu/SSAP/
> 
> They include a multi-instrument SED, a few orders of a HST 
> STIS echelle spectrogram, two segments of an ISO-LWS spectrum,
> a comparison between data and a template (from the AVO demo),
> and a spectrum retrieved from the VOServices Web Services 
> interface at http://www.voservices.org/.

Ivo,

Validating these documents against the VOTable schema shows that
they have a number of errors - they are well-formed XML but not
valid VOTable documents.  The errors are in two categories:

  - Many FIELD and PARAM elements lack the required "datatype" attribute.
    Note that if you have string-valued PARAMs or FIELDs you should
    use the attributes:

       datatype="char" arraysize="*" 

    or similar (not just datatype="char" without an arraysize, 
    which means a single character!)

  - The values of ID attributes are controlled.  First, the value must 
    be an XML name.  Basically this means it must start with a letter
    or underscore and continue with alphanumerics, underscores, or
    '.', '-', ':'.  So pathnames are not a good choice.

    Furthermore, since the ID values identify a single element in the
    document, they must be unique.  In echelle.xml for instance, 
    several different (though obviously similar) FIELD elements have
    the declaration 'ID="Coord"' - this makes the XML invalid.

    Unless you are deliberately trying to identify a single element in
    the document, for instance to facilitate cross-referencing or
    an XPath query, it's usually safer to stick with the 'name' attribute.

I hadn't looked at the SED data model document up till now, but having
taken a quick look, I note that the missing datatype attribute problem is 
present throughout in the example VOTable serialization presented there,
so you can't really be blamed for this!  There are many other errors 
in this example too (it is not well-formed XML) - please can they 
be fixed!  I can advise if necessary.

In both cases, the errors are easy to spot if you run the VOTable
through an XML validator (checking against the VOTable schema)
Sun's Multi-Schema XML Validator
(http://www.sun.com/software/xml/developers/multischema/) is one tool
that can do this for you, though I'm sure there are others.  
You can check well-formedness (and possibly validate against the DTD,
though this is not normative at VOTable 1.1) using other tools such
as xmllint which comes with RedHat Linux.
Can I encourage people who are publishing VOTables in documentation 
or as data providers to do so!

Mark

-- 
Mark Taylor    Starlink Programmer     Physics,  Bristol University, UK
m.b.taylor at bris.ac.uk +44-117-928-8776 http://www.star.bris.ac.uk/~mbt/



More information about the dal mailing list