SSAP sample files
Ivo Busko
busko at stsci.edu
Wed Feb 2 05:35:25 PST 2005
Hi, Mark
Thanks for catching those errors. Yes, I didn't run the
files thru a XML validator; the only thing I did was to
make shure the "looked similar" to the example in the
SED data model document. My Java IDE also provides some
basic XML validation, and I used that as well. Not enough,
by all means...
I'll fix the errors and re-post the files. Thanks for
the suggestion on XML validator tools.
Cheers,
-Ivo
>
> On Tue, 1 Feb 2005, Ivo Busko wrote:
> 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 apps
mailing list